/* =========================
   FLOATING BUTTONS
========================= */

.floating-buttons{
    position:fixed;
    right:20px;
    bottom:20px;
    display:flex;
    flex-direction:column;
    gap:15px;
    z-index:9999;
}

/* =========================
   WHATSAPP BUTTON
========================= */

.whatsapp-btn{
    width:60px;
    height:60px;
    border-radius:50%;
    background:#25D366;
    color:#fff;
    display:flex;
    align-items:center;
    justify-content:center;
    text-decoration:none;
    font-size:28px;
    box-shadow:0 4px 15px rgba(0,0,0,.25);
    transition:.3s;
}

.whatsapp-btn:hover{
    transform:scale(1.08);
}

/* =========================
   CHAT BUTTON
========================= */

.chat-toggle{
    width:60px;
    height:60px;
    border:none;
    border-radius:50%;
    background:#0d6efd;
    color:#fff;
    font-size:26px;
    cursor:pointer;
    box-shadow:0 4px 15px rgba(0,0,0,.25);
    transition:.3s;
}

.chat-toggle:hover{
    transform:scale(1.08);
}

/* =========================
   CHAT BOX
========================= */

.chat-box{
    position:fixed;
    right:90px;
    bottom:100px;
    width:380px;
    height:550px;
    background:#fff;
    border-radius:20px;
    overflow:hidden;
    display:none;
    flex-direction:column;
    z-index:9999;
    box-shadow:0 15px 40px rgba(0,0,0,.20);
}

/* =========================
   HEADER
========================= */

.chat-header{
    background:linear-gradient(135deg,#0d6efd,#198754);
    color:#fff;
    padding:15px;
}

.chat-title{
    font-size:17px;
    font-weight:600;
}

.chat-status{
    font-size:12px;
    opacity:.9;
    margin-top:3px;
}

/* =========================
   MESSAGE AREA
========================= */

.chat-messages{
    flex:1;
    overflow-y:auto;
    padding:15px;
    background:#f5f7fb;
    display:flex;
    flex-direction:column;
}

.chat-messages::-webkit-scrollbar{
    width:6px;
}

.chat-messages::-webkit-scrollbar-thumb{
    background:#ccc;
    border-radius:10px;
}

/* =========================
   MESSAGE COMMON
========================= */

.message{
    margin:10px 0;
    max-width:85%;
    word-wrap:break-word;
    font-size:14px;
}

/* =========================
   USER MESSAGE
========================= */

.user-message{
    align-self:flex-end;
    background:#0d6efd;
    color:#fff;
    padding:12px 16px;
    border-radius:18px 18px 5px 18px;
    box-shadow:0 3px 10px rgba(0,0,0,.08);
}

/* =========================
   BOT MESSAGE
========================= */

.bot-message{
    align-self:flex-start;
    background:#fff;
    color:#222;
    padding:15px;
    border-radius:18px 18px 18px 5px;
    border-left:4px solid #0d6efd;
    box-shadow:0 3px 12px rgba(0,0,0,.08);
}

.bot-message p{
    margin:0;
    line-height:1.7;
    color:#222;
}

/* =========================
   MENU BUTTONS
========================= */

.chat-menu{
    display:flex;
    flex-wrap:wrap;
    gap:8px;
    margin-top:12px;
}

.chat-menu button{
    border:none;
    outline:none;
    background:#0d6efd;
    color:#fff;
    padding:8px 14px;
    border-radius:20px;
    cursor:pointer;
    font-size:13px;
    font-weight:500;
    transition:.3s;
}

.chat-menu button:hover{
    background:#0b5ed7;
    transform:translateY(-2px);
}

/* SUPPORT BUTTON */

.chat-menu .support-btn{
    background:#198754;
}

.chat-menu .support-btn:hover{
    background:#157347;
}

/* =========================
   INPUT AREA
========================= */

.chat-input{
    display:flex;
    align-items:center;
    padding:10px;
    background:#fff;
    border-top:1px solid #e5e7eb;
}

.chat-input input{
    flex:1;
    border:1px solid #ddd;
    border-radius:25px;
    padding:12px 15px;
    outline:none;
    font-size:14px;
}

.chat-input input:focus{
    border-color:#0d6efd;
}

/* SEND BUTTON */

.chat-input button{
    width:48px;
    height:48px;
    margin-left:10px;
    border:none;
    border-radius:50%;
    background:#0d6efd;
    color:#fff;
    cursor:pointer;
    font-size:18px;
    display:flex;
    align-items:center;
    justify-content:center;
    transition:.3s;
}

.chat-input button:hover{
    background:#0b5ed7;
    transform:translateY(-2px);
}

/* =========================
   TYPING ANIMATION
========================= */

.typing{
    display:flex;
    gap:5px;
    align-items:center;
}

.typing span{
    width:8px;
    height:8px;
    border-radius:50%;
    background:#999;
    animation:typing 1s infinite;
}

.typing span:nth-child(2){
    animation-delay:.2s;
}

.typing span:nth-child(3){
    animation-delay:.4s;
}

@keyframes typing{

    0%,100%{
        opacity:.3;
        transform:translateY(0);
    }

    50%{
        opacity:1;
        transform:translateY(-4px);
    }
}

/* =========================
   MOBILE
========================= */

@media(max-width:768px){

    .chat-box{
        width:95%;
        height:70vh;
        right:2.5%;
        bottom:90px;
    }

    .floating-buttons{
        right:15px;
        bottom:15px;
    }

    .chat-toggle,
    .whatsapp-btn{
        width:55px;
        height:55px;
    }
}