﻿/* ===============================
   FLOATING CHAT BUTTON
================================ */
#chatToggle {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: #25d366;
    color: #fff;
    padding: 14px 18px;
    border-radius: 50px;
    cursor: pointer;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    z-index: 10000;
    box-shadow: 0 4px 12px rgba(0,0,0,0.25);
}

/* ===============================
   CHAT POPUP CONTAINER
================================ */
#chatBox {
    position: fixed;
    bottom: 90px;
    right: 20px;
    width: 420px;
    height: min(520px, 85vh);
    background: #f0f2f5;
    border-radius: 16px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    z-index: 10001;
    box-shadow: 0 10px 40px rgba(0,0,0,0.25);
}

/* ===============================
   HEADER
================================ */
.chat-header {
   
    background: #1f1f1f;
    color: #fff;
    padding: 14px 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-shrink: 0;
    box-shadow: 0 2px 6px rgba(0,0,0,0.3);
}

    .chat-header strong {
        font-size: 16px;
    }

.chat-subtitle {
    font-size: 12px;
    opacity: 0.85;
}

#closeChat {
    cursor: pointer;
    font-size: 22px;
    line-height: 1;
}

/* ===============================
   CHAT BODY (SCROLLABLE)
================================ */
.chat-body {
    flex: 1;
    min-height: 0;
    padding: 16px;
    background: #efeae2;
    overflow-y: auto;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

    /* SCROLLBAR */
    .chat-body::-webkit-scrollbar {
        width: 6px;
    }

    .chat-body::-webkit-scrollbar-thumb {
        background: #bdbdbd;
        border-radius: 10px;
    }

    .chat-body::-webkit-scrollbar-track {
        background: transparent;
    }

/* ===============================
   MESSAGE BUBBLES
================================ */
.bot-msg {
    background: #ffffff;
    max-width: 80%;
    padding: 10px 14px;
    border-radius: 12px 12px 12px 4px;
    font-size: 14px;
    line-height: 1.4;
    align-self: flex-start;
    margin-right: auto;
}

.user-msg {
    background: #dcf8c6;
    max-width: 80%;
    padding: 10px 14px;
    border-radius: 12px 12px 4px 12px;
    font-size: 14px;
    line-height: 1.4;
    align-self: flex-end;
    margin-left: auto;
    text-align: right;
}

/* ===============================
   FAQ QUESTION BUTTONS
================================ */
#questionList {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.question-btn {
    background: #ffffff;
    padding: 12px 14px;
    border-radius: 12px;
    font-size: 14px;
    cursor: pointer;
    transition: background 0.2s ease;
}

    .question-btn:hover {
        background: #f5f5f5;
    }

/* ===============================
   INPUT BAR
================================ */
.chat-input {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    padding: 10px;
    background: #ffffff;
    border-top: 1px solid #ddd;
}

    .chat-input input {
        flex: 1;
        border: none;
        outline: none;
        padding: 12px 16px;
        border-radius: 22px;
        background: #f1f1f1;
        font-size: 14px;
    }

    .chat-input button {
        width: 44px;
        height: 44px;
        margin-left: 8px;
        border-radius: 50%;
        border: none;
        background: #25d366;
        cursor: pointer;
        display: flex;
        align-items: center;
        justify-content: center;
    }

        .chat-input button svg {
            width: 20px;
            height: 20px;
            fill: #ffffff;
        }

    /* ===============================
   INPUT HIGHLIGHT (NO ANSWER)
================================ */
    .chat-input.highlight {
        box-shadow: 0 0 0 2px #ff9800;
        border-radius: 30px;
    }

/* ===============================
   MOBILE FULLSCREEN MODE
================================ */
@media (max-width: 576px) {

    #chatBox {
        width: calc(100% - 20px);
        height: min(350px, 70vh);
        right: 10px;
        bottom: 90px;
        border-radius: 16px;
    }

    #chatToggle {
        bottom: 16px;
        right: 16px;
    }
}
