/* =========================
   ROOT – FLOAT CHAT
========================= */
#al-chat-widget {
    position: fixed;
    right: 20px;
    bottom: 20px;
    z-index: 2147483647;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

/* =========================
   FLOAT ICON (NÚT CHAT)
========================= */
#al-chat-fab {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: #3b85ca;
    color: #fff;
    font-size: 22px;
    cursor: pointer;

    display: flex;
    align-items: center;
    justify-content: center;

    box-shadow: 0 10px 26px rgba(59,133,202,.45);
    transition: all .25s ease;
}

#al-chat-fab:hover {
    transform: translateY(-2px);
    box-shadow: 0 14px 34px rgba(59,133,202,.55);
}

/* =========================
   CHAT BOX
========================= */
#al-chat-box {
    position: absolute;
    right: 0;
    bottom: 72px;
    width: 340px;
    height: 420px;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0px 5px 9px rgb(0 109 165 / 39%);
    display: none;
    overflow: hidden;
    animation: alChatFadeUp .25s ease;
}

@keyframes alChatFadeUp {
    from {
        opacity: 0;
        transform: translateY(8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* =========================
   HEADER
========================= */
.al-chat-header {
    background: linear-gradient(135deg, #3b85ca, #2f6fa8);
    color: #fff;
    padding: 14px;

    display: flex;
    justify-content: space-between;
    align-items: center;
}

.al-chat-title strong {
    font-size: 15px;
    display: block;
    line-height: 1.2;
}

.al-chat-title small {
    font-size: 12px;
    opacity: .85;
}

#al-chat-close {
    background: none;
    border: none;
    color: #fff;
    font-size: 13px;
    cursor: pointer;
    margin: 0px !important;
    border-radius: 8px;
    padding: 4px;
}

/* =========================
   BODY (SCROLL)
========================= */
.al-chat-body {
    flex: 1;
    padding: 14px;
    background: #f4f7fb;
    overflow-y: auto;
}

/* Ẩn scrollbar xấu */
.al-chat-body::-webkit-scrollbar {
    width: 6px;
}
.al-chat-body::-webkit-scrollbar-thumb {
    background: #c9d9ec;
    border-radius: 4px;
}

/* =========================
   WELCOME
========================= */
.al-chat-welcome p {
    background: #fff;
    padding: 10px 12px;
    border-radius: 12px;
    font-size: 14px;
    color: #333;
    margin-bottom: 10px;
}

/* =========================
   MESSAGE LIST
========================= */
#al-chat-messages {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* BUBBLE CHUNG */
.al-chat-bubble {
    max-width: 75%;
    padding: 8px 12px;
    border-radius: 14px;
    font-size: 14px;
    line-height: 1.4;
    word-break: break-word;
}

/* USER */
.al-chat-bubble.user {
    background: #3b85ca;
    color: #fff;
    margin-left: auto;
}

/* ADMIN */
.al-chat-bubble.admin {
    background: #e9f1fb;
    color: #1f3a57;
    margin-right: auto;
}

/* SYSTEM */
.al-chat-bubble.system {
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffeeba;
    font-style: italic;
    text-align: center;
    margin: 4px auto;
}

/* =========================
   INPUT
========================= */
.al-chat-input {
    display: flex;
    gap: 6px;
    padding: 10px;
    border-top: 1px solid #e6e9ee;
    background: #fff;
}

.al-chat-input input {
    flex: 1;
    border-radius: 20px;
    border: 1px solid #ccd6e2;
    padding: 8px 12px;
    font-size: 14px;
    outline: none;
}

.al-chat-input input:focus {
    border-color: #3b85ca;
}

.al-chat-input button {
    width: 36px;
    height: 36px;
    border-radius: 10%;
    border: none;
    background: #3b85ca;
    color: #fff;
    font-size: 16px;
    cursor: pointer;
    transition: background .2s ease;
    margin: 0px !important;
    padding: 0px !important;
}

.al-chat-input button:hover {
    background: #2f6fa8;
}
.al-chat-input input#al-chat-text {
    margin-bottom: 0px !important;
}
#al-chat-box {
    display: flex;
    flex-direction: column;
}
.al-chat-body {
    flex: 1;
    min-height: 0; 
    overflow-y: auto;
}
.al-chat-input {
    flex-shrink: 0;
}

/* =========================
   MOBILE
========================= */
@media (max-width: 480px) {

    #al-chat-widget {
        right: 14px;
        bottom: 14%;
    }

    #al-chat-box {
        width: calc(100vw - 28px);
        height: 65vh;
        right: 0px;
        bottom: 120%;
        border-radius: 10px;
    }

    #al-chat-fab {
        width: 52px;
        height: 52px;
        font-size: 20px;
    }
}
thanh si