/* ==========================================================================
   DXC LIVECHAT - STYLESHEET CHÍNH (CÔ LẬP TOÀN BỘ, TIỀN TỐ DXC-LC-)
   ========================================================================== */

/* TRIỆT TIÊU TOÀN BỘ GIAO DIỆN CHATBOT CŨ CỦA THEME (NẾU CÒN SÓT LẠI TRÊN HOST) */
#dxc-chatbot-wrapper,
#dxc-chat-widget,
#dxc-badger-bot,
#dxc-simple-chat-btn,
.dxc-chatbot-wrapper,
.dxc-chatbot-widget,
.bot-container,
.dxc-simple-chat-btn,
.dxc-badger-bot {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    pointer-events: none !important;
    height: 0 !important;
    width: 0 !important;
    position: absolute !important;
    overflow: hidden !important;
    clip: rect(0 0 0 0) !important;
    clip-path: inset(50%) !important;
    z-index: -9999 !important;
}

:root {
    --dxc-lc-primary: #0284c7;
    --dxc-lc-primary-hover: #0369a1;
    --dxc-lc-primary-rgb: 2, 132, 199;
    --dxc-lc-bg: #f8fafc;
    --dxc-lc-text: #0f172a;
    --dxc-lc-text-muted: #64748b;
    --dxc-lc-border: #e2e8f0;
}

/* RESET CỤC BỘ BẢO VỆ CHỐNG BỊ THEME ĐÈ */
.dxc-lc-root,
.dxc-lc-root *,
.dxc-lc-root *::before,
.dxc-lc-root *::after {
    box-sizing: border-box !important;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif !important;
    -webkit-font-smoothing: antialiased;
}

.dxc-lc-root {
    position: fixed;
    bottom: 24px; /* Sát góc dưới phải để Robot đứng tự nhiên ở đầu trang */
    right: 24px;
    z-index: 999999;
}

/* ==========================================================================
   1. LAUNCHER: ROBOT DXC & NÚT CHAT TRÒN
   ========================================================================== */
.dxc-lc-launcher {
    position: relative;
    display: flex;
    align-items: flex-end;
    justify-content: flex-end;
}

/* ROBOT DXC TO (HIỆN KHI CHƯA CUỘN SÂU) */
.dxc-lc-robot-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    cursor: pointer;
    transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s;
    transform-origin: bottom center;
    user-select: none;
}

/* BONG BÓNG THOẠI CẠNH ROBOT */
.dxc-lc-speech-bubble {
    background: #ffffff;
    padding: 10px 16px;
    border-radius: 16px;
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.12);
    color: #1e293b;
    font-size: 13.5px;
    line-height: 1.4;
    font-weight: 600;
    width: max-content;
    max-width: 260px;
    text-align: center;
    position: absolute;
    bottom: 35px;
    right: 100%;
    margin-right: 14px;
    border: 2px solid var(--dxc-lc-primary);
    animation: dxcLcFloatBubble 2.8s ease-in-out infinite;
}

.dxc-lc-speech-bubble::after {
    content: '';
    position: absolute;
    bottom: 22px;
    right: -10px;
    border-width: 8px 0 8px 10px;
    border-style: solid;
    border-color: transparent transparent transparent var(--dxc-lc-primary);
    display: block;
    width: 0;
}

/* CẤU TRÚC HÌNH ẢNH ROBOT */
.dxc-lc-robot {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.dxc-lc-head {
    width: 76px;
    height: 56px;
    background: linear-gradient(145deg, #38bdf8, var(--dxc-lc-primary));
    border-radius: 18px 18px 12px 12px;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 4px 10px rgba(2, 132, 199, 0.3);
    z-index: 2;
    transform-origin: bottom center;
    animation: dxcLcHeadWobble 2.5s ease-in-out infinite;
}

.dxc-lc-antenna {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    width: 4px;
    height: 12px;
    background: var(--dxc-lc-primary);
}

.dxc-lc-antenna::before {
    content: '';
    position: absolute;
    top: -6px;
    left: -4px;
    width: 12px;
    height: 12px;
    background: #f59e0b;
    border-radius: 50%;
    box-shadow: 0 0 8px #f59e0b;
}

.dxc-lc-face {
    display: flex;
    gap: 16px;
}

.dxc-lc-eye {
    width: 12px;
    height: 12px;
    background: #ffffff;
    border-radius: 50%;
    animation: dxcLcBlink 3.5s infinite;
}

.dxc-lc-body-part {
    width: 86px;
    height: 66px;
    background: linear-gradient(145deg, var(--dxc-lc-primary), #0369a1);
    border-radius: 12px 12px 22px 22px;
    margin-top: 4px;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 6px 14px rgba(0, 0, 0, 0.18);
    animation: dxcLcBodyBob 2.5s ease-in-out infinite;
}

.dxc-lc-badge-text {
    font-size: 11px;
    font-weight: 800;
    color: #ffffff;
    background: rgba(255, 255, 255, 0.25);
    padding: 3px 8px;
    border-radius: 6px;
    letter-spacing: 1px;
}

.dxc-lc-arm {
    position: absolute;
    top: 14px;
    width: 13px;
    height: 32px;
    background: #38bdf8;
    border-radius: 8px;
}
.dxc-lc-arm.dxc-lc-left { left: -14px; }
.dxc-lc-arm.dxc-lc-right { right: -14px; }

/* NÚT TRÒN ĐƠN GIẢN KHI CUỘN TRANG */
.dxc-lc-simple-btn {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--dxc-lc-primary);
    color: #ffffff;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 16px rgba(var(--dxc-lc-primary-rgb), 0.45);
    opacity: 0;
    visibility: hidden;
    transform: scale(0.6) translateY(20px);
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    position: absolute;
    bottom: 66px; /* Nhấc cao hơn để nằm phía trên nút scroll-to-top (30px + 48px = 78px) */
    right: 5px;   /* Canh giữa trục dọc với nút scroll-to-top */
}

.dxc-lc-simple-btn:hover {
    background: var(--dxc-lc-primary-hover);
    transform: scale(1.08) translateY(-2px);
    box-shadow: 0 6px 20px rgba(var(--dxc-lc-primary-rgb), 0.55);
}

/* KHI CUỘN XUỐNG SÂU (.is-scrolled) */
.dxc-lc-root.is-scrolled .dxc-lc-robot-box {
    opacity: 0;
    pointer-events: none;
    transform: scale(0.5) translateY(20px);
    visibility: hidden;
}

.dxc-lc-root.is-scrolled .dxc-lc-simple-btn {
    opacity: 1;
    visibility: visible;
    transform: scale(1) translateY(0);
}

/* CHẤM ĐỎ ĐẾM SỐ TIN CHƯA ĐỌC */
.dxc-lc-unread-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    background: #ef4444;
    color: #ffffff;
    font-size: 11px;
    font-weight: 700;
    min-width: 20px;
    height: 20px;
    padding: 0 5px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #ffffff;
    box-shadow: 0 2px 6px rgba(239, 68, 68, 0.5);
    animation: dxcLcBadgePulse 2s infinite;
    z-index: 10;
}

/* KHI MỞ KHUNG CHAT: ẨN HOÀN TOÀN LAUNCHER (ROBOT DXC & NÚT CHAT TRÒN) ĐỂ TRÁNH ĐÈ LÊN KHUNG CHAT HOẶC PHÓNG TO */
.dxc-lc-root.is-chat-open .dxc-lc-launcher,
.dxc-lc-root.is-chat-open .dxc-lc-robot-box,
.dxc-lc-root.is-chat-open .dxc-lc-simple-btn,
.dxc-lc-root:has(.dxc-lc-widget.is-active) .dxc-lc-launcher,
.dxc-lc-root:has(.dxc-lc-widget.is-active) .dxc-lc-robot-box,
.dxc-lc-root:has(.dxc-lc-widget.is-active) .dxc-lc-simple-btn {
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;
    transform: scale(0.6) translateY(20px) !important;
    transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s !important;
    z-index: -1 !important;
}

/* ==========================================================================
   2. WIDGET CONTAINER: KHUNG TRÒ CHUYỆN
   ========================================================================== */
.dxc-lc-widget {
    display: none;
    position: fixed;
    bottom: 24px;
    right: 90px;
    width: 380px;
    max-width: calc(100vw - 40px);
    height: 600px;
    max-height: calc(100vh - 48px);
    background: #ffffff;
    border-radius: 18px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.18);
    flex-direction: column;
    overflow: hidden;
    border: 1px solid var(--dxc-lc-border);
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    z-index: 1000;
}

.dxc-lc-widget.is-active {
    display: flex;
    animation: dxcLcWidgetPop 0.35s cubic-bezier(0.25, 0.8, 0.25, 1);
}

/* KHI PHÓNG TO TOÀN MÀN HÌNH */
.dxc-lc-widget.is-fullscreen {
    bottom: 0 !important;
    right: 0 !important;
    width: 100vw !important;
    max-width: 100vw !important;
    height: 100vh !important;
    max-height: 100vh !important;
    border-radius: 0 !important;
    border: none !important;
    z-index: 9999999 !important;
}

.dxc-lc-widget.is-fullscreen .dxc-lc-header {
    padding: 16px 28px;
}

.dxc-lc-widget.is-fullscreen .dxc-lc-messages {
    padding: 24px 32px;
}

.dxc-lc-widget.is-fullscreen .dxc-lc-footer {
    padding: 18px 28px;
}

.dxc-lc-widget.is-fullscreen .dxc-lc-offline-notice {
    max-width: 520px;
    width: 100%;
    margin: 0 auto;
}

/* ==========================================================================
   3. HEADER CỦA WIDGET
   ========================================================================== */
.dxc-lc-header {
    background: linear-gradient(135deg, var(--dxc-lc-primary), var(--dxc-lc-primary-hover));
    color: #ffffff;
    padding: 14px 18px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    z-index: 5;
}

.dxc-lc-header-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.dxc-lc-avatar-wrapper {
    position: relative;
}

.dxc-lc-header-avatar {
    width: 38px;
    height: 38px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 13px;
    letter-spacing: 0.5px;
    border: 1.5px solid rgba(255, 255, 255, 0.4);
}

.dxc-lc-status-dot {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 10px;
    height: 10px;
    background: #10b981; /* Xanh lá: active */
    border-radius: 50%;
    border: 2px solid #ffffff;
}

.dxc-lc-status-dot.is-waiting {
    background: #f59e0b; /* Vàng: hàng đợi */
}

.dxc-lc-status-dot.is-offline {
    background: #94a3b8; /* Xám: offline */
}

.dxc-lc-header-info {
    display: flex;
    flex-direction: column;
}

.dxc-lc-title {
    font-weight: 700;
    font-size: 15px;
    line-height: 1.2;
}

.dxc-lc-status-text {
    font-size: 12px;
    opacity: 0.85;
    margin-top: 2px;
}

.dxc-lc-header-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.dxc-lc-action-btn {
    background: none;
    border: none;
    color: #ffffff;
    opacity: 0.8;
    cursor: pointer;
    padding: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    border-radius: 4px;
}

.dxc-lc-action-btn:hover {
    opacity: 1;
    background: rgba(255, 255, 255, 0.15);
    transform: scale(1.1);
}

/* ==========================================================================
   4. CẢNH BÁO MẠNG & THẺ HÀNG ĐỢI (QUEUE CARD)
   ========================================================================== */
.dxc-lc-network-banner {
    background: #fef2f2;
    color: #991b1b;
    border-bottom: 1px solid #fecaca;
    padding: 8px 16px;
    font-size: 12.5px;
    text-align: center;
    font-weight: 600;
}

.dxc-lc-queue-card {
    background: #fffbeb;
    border-bottom: 1px solid #fef3c7;
    padding: 14px 18px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.dxc-lc-queue-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.dxc-lc-queue-badge {
    font-size: 11px;
    font-weight: 800;
    color: #b45309;
    background: #fef3c7;
    padding: 3px 8px;
    border-radius: 6px;
    letter-spacing: 0.5px;
}

.dxc-lc-leave-btn {
    background: none;
    border: none;
    color: #dc2626;
    font-size: 12px;
    cursor: pointer;
    text-decoration: underline;
    padding: 0;
}

.dxc-lc-leave-btn:hover {
    color: #991b1b;
}

.dxc-lc-queue-info {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    color: #78350f;
}

.dxc-lc-queue-progress {
    width: 100%;
    height: 6px;
    background: #fef3c7;
    border-radius: 3px;
    overflow: hidden;
}

.dxc-lc-queue-bar {
    width: 40%;
    height: 100%;
    background: #f59e0b;
    border-radius: 3px;
    animation: dxcLcProgressIndeterminate 2s infinite linear;
}

.dxc-lc-queue-tip {
    font-size: 11.5px;
    color: #92400e;
    line-height: 1.4;
}

/* ==========================================================================
   5. KHUNG TIN NHẮN (MESSAGES BODY)
   ========================================================================== */
.dxc-lc-messages {
    flex: 1;
    padding: 18px 16px;
    background: var(--dxc-lc-bg);
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 14px;
    scroll-behavior: smooth;
}

#dxc-lc-messages-stream {
    display: flex;
    flex-direction: column;
    gap: 14px;
    width: 100%;
}

.dxc-lc-msg-group {
    display: flex;
    gap: 10px;
    max-width: 85%;
    width: auto;
}

.dxc-lc-msg-group.dxc-lc-agent {
    align-self: flex-start;
    margin-right: auto;
}

.dxc-lc-msg-group.dxc-lc-visitor {
    align-self: flex-end;
    margin-left: auto;
    flex-direction: row-reverse;
}

.dxc-lc-msg-group.dxc-lc-visitor .dxc-lc-msg-content {
    align-items: flex-end;
}

.dxc-lc-msg-group.dxc-lc-system {
    align-self: center;
    max-width: 90%;
    margin: 6px 0;
}

.dxc-lc-msg-avatar {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: var(--dxc-lc-primary);
    color: #ffffff;
    font-size: 10.5px;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    margin-top: 2px;
}

.dxc-lc-msg-content {
    display: flex;
    flex-direction: column;
}

.dxc-lc-bubble {
    padding: 12px 16px;
    font-size: 14px;
    line-height: 1.5;
    word-break: break-word;
}

/* BONG BÓNG TƯ VẤN VIÊN */
.dxc-lc-agent .dxc-lc-bubble {
    background: #ffffff;
    color: #1e293b;
    border: 1px solid var(--dxc-lc-border);
    border-radius: 16px 16px 16px 4px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.03);
}

/* BONG BÓNG KHÁCH TRUY CẬP */
.dxc-lc-visitor .dxc-lc-bubble {
    background: linear-gradient(135deg, var(--dxc-lc-primary), var(--dxc-lc-primary-hover));
    color: #ffffff;
    border-radius: 16px 16px 4px 16px;
    box-shadow: 0 3px 10px rgba(var(--dxc-lc-primary-rgb), 0.25);
}

/* TIN NHẮN HỆ THỐNG */
.dxc-lc-system .dxc-lc-bubble {
    background: #e2e8f0;
    color: #475569;
    font-size: 12px;
    padding: 5px 14px;
    border-radius: 14px;
    text-align: center;
    border: none;
}

.dxc-lc-time {
    font-size: 11px;
    color: #94a3b8;
    margin-top: 4px;
}
.dxc-lc-visitor .dxc-lc-time {
    text-align: right;
}

/* GỢI Ý CÂU HỎI NHANH (CHIPS) */
.dxc-lc-quick-replies {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 6px;
}

.dxc-lc-chip-btn {
    background: #ffffff;
    border: 1px solid #cbd5e1;
    color: #0f172a;
    padding: 7px 14px;
    border-radius: 18px;
    font-size: 12.5px;
    cursor: pointer;
    transition: all 0.2s;
    font-weight: 500;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.04);
}

.dxc-lc-chip-btn:hover {
    border-color: var(--dxc-lc-primary);
    color: var(--dxc-lc-primary);
    background: #f0f9ff;
    transform: translateY(-1px);
}

/* TYPING INDICATOR */
.dxc-lc-typing {
    display: flex;
    align-items: center;
    gap: 10px;
    align-self: flex-start;
}

.dxc-lc-typing-bubble {
    background: #ffffff;
    border: 1px solid var(--dxc-lc-border);
    padding: 10px 14px;
    border-radius: 16px 16px 16px 4px;
    display: flex;
    gap: 5px;
}

.dxc-lc-dot {
    width: 6px;
    height: 6px;
    background: #94a3b8;
    border-radius: 50%;
    animation: dxcLcBounceDot 1.4s infinite ease-in-out both;
}
.dxc-lc-dot:nth-child(1) { animation-delay: -0.32s; }
.dxc-lc-dot:nth-child(2) { animation-delay: -0.16s; }

/* NÚT CUỘN XUỐNG ĐÁY */
.dxc-lc-scroll-bottom-btn {
    position: absolute;
    bottom: 80px;
    left: 50%;
    transform: translateX(-50%);
    background: #1e293b;
    color: #ffffff;
    border: none;
    padding: 6px 14px;
    border-radius: 16px;
    font-size: 12px;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0,0,0,0.25);
    z-index: 10;
    animation: dxcLcFadeIn 0.2s;
}

/* ==========================================================================
   6. KHỐI THÔNG BÁO NGOÀI GIỜ / TẠM KHÓA & ĐÁNH GIÁ (RATING)
   ========================================================================== */
.dxc-lc-offline-container {
    flex: 1;
    width: 100%;
    padding: 30px 20px;
    background: #ffffff;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.dxc-lc-offline-notice {
    text-align: center;
    width: 100%;
    max-width: 440px;
    margin: 0 auto;
}

.dxc-lc-offline-icon {
    font-size: 40px;
    margin-bottom: 8px;
}

.dxc-lc-offline-title {
    font-weight: 700;
    font-size: 17px;
    color: #0f172a;
}

.dxc-lc-offline-desc {
    font-size: 13.5px;
    color: #64748b;
    margin: 8px 0 16px;
    line-height: 1.5;
}

/* ==========================================================================
   TẤT CẢ CÁC ĐƯỜNG LINK TRONG LIVECHAT DÙNG MÀU CHỦ ĐẠO #0284c7
   ========================================================================== */
.dxc-lc-root a,
.dxc-lc-widget a,
.dxc-lc-bubble a {
    color: #0284c7 !important;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s ease, text-decoration 0.2s ease;
}

.dxc-lc-root a:hover,
.dxc-lc-widget a:hover,
.dxc-lc-bubble a:hover {
    color: #0369a1 !important;
    text-decoration: underline !important;
}

/* Link trong bong bóng của khách (nền xanh, chữ trắng) để tương phản */
.dxc-lc-visitor .dxc-lc-bubble a {
    color: #ffffff !important;
    text-decoration: underline;
}

/* Nút truy cập dịch vụ dạng button (selector đủ mạnh để thắng quy tắc link chung) */
.dxc-lc-root a.dxc-lc-service-btn {
    display: inline-block;
    background: #0284c7 !important;
    background: linear-gradient(135deg, #0284c7, #0369a1) !important;
    color: #ffffff !important;
    text-decoration: none !important;
    padding: 12px 24px;
    border-radius: 24px;
    font-size: 14px;
    font-weight: 600;
    box-shadow: 0 4px 14px rgba(2, 132, 199, 0.35);
    transition: all 0.25s ease;
}

.dxc-lc-root a.dxc-lc-service-btn:hover {
    background: #0369a1 !important;
    text-decoration: none !important;
    color: #ffffff !important;
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(2, 132, 199, 0.45);
}

/* Link dịch vụ dạng inline text link */
.dxc-lc-root a.dxc-lc-service-link {
    color: #0284c7 !important;
    text-decoration: none !important;
    font-size: 13.5px;
    font-weight: 600;
    display: inline-block;
    transition: color 0.2s ease, text-decoration 0.2s ease;
}

.dxc-lc-root a.dxc-lc-service-link:hover {
    color: #0369a1 !important;
    text-decoration: underline !important;
}

/* KHUNG ĐÁNH GIÁ */
.dxc-lc-rating-card {
    background: #f1f5f9;
    border-top: 1px solid #e2e8f0;
    padding: 16px 20px;
    text-align: center;
}

.dxc-lc-rating-title {
    font-weight: 700;
    font-size: 14px;
    color: #0f172a;
}

.dxc-lc-rating-card p {
    font-size: 13px;
    color: #64748b;
    margin: 6px 0 12px;
}

.dxc-lc-rating-actions {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-bottom: 12px;
}

.dxc-lc-rate-btn {
    background: #ffffff;
    border: 1px solid #cbd5e1;
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.dxc-lc-rate-btn:hover {
    border-color: var(--dxc-lc-primary);
    color: var(--dxc-lc-primary);
}

.dxc-lc-restart-btn {
    background: none;
    border: none;
    color: var(--dxc-lc-primary);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: underline;
}

/* ==========================================================================
   7. FOOTER SOẠN THẢO VÀ GỬI TIN NHẮN
   ========================================================================== */
.dxc-lc-footer {
    padding: 12px 16px;
    background: #ffffff;
    border-top: 1px solid var(--dxc-lc-border);
    display: flex;
    align-items: flex-end;
    gap: 10px;
    z-index: 5;
}

.dxc-lc-input-wrapper {
    flex: 1;
}

.dxc-lc-input {
    width: 100%;
    padding: 10px 16px;
    border: 1px solid #cbd5e1;
    border-radius: 20px;
    outline: none;
    font-size: 14px;
    line-height: 1.4;
    resize: none;
    max-height: 120px;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.dxc-lc-input:focus {
    border-color: var(--dxc-lc-primary);
    box-shadow: 0 0 0 3px rgba(var(--dxc-lc-primary-rgb), 0.15);
}

.dxc-lc-send-btn {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: var(--dxc-lc-primary);
    color: #ffffff;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all 0.2s;
    box-shadow: 0 2px 8px rgba(var(--dxc-lc-primary-rgb), 0.35);
}

.dxc-lc-send-btn:hover {
    background: var(--dxc-lc-primary-hover);
    transform: scale(1.06);
}

.dxc-lc-send-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.dxc-lc-watermark {
    background: #ffffff;
    padding: 4px 16px 8px;
    font-size: 11px;
    color: #94a3b8;
    text-align: center;
    border-top: none;
}

/* ==========================================================================
   8. KEYFRAMES ANIMATION
   ========================================================================== */
@keyframes dxcLcHeadWobble {
    0%, 100% { transform: rotate(0deg); }
    25% { transform: rotate(-7deg) translateX(-2px); }
    75% { transform: rotate(7deg) translateX(2px); }
}

@keyframes dxcLcBodyBob {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(3px) scaleY(0.97); }
}

@keyframes dxcLcFloatBubble {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-5px); }
}

@keyframes dxcLcBlink {
    0%, 90%, 100% { transform: scaleY(1); }
    95% { transform: scaleY(0.1); }
}

@keyframes dxcLcWidgetPop {
    0% { opacity: 0; transform: scale(0.9) translateY(20px); }
    100% { opacity: 1; transform: scale(1) translateY(0); }
}

@keyframes dxcLcBadgePulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.15); }
    100% { transform: scale(1); }
}

@keyframes dxcLcBounceDot {
    0%, 80%, 100% { transform: scale(0); }
    40% { transform: scale(1); }
}

@keyframes dxcLcProgressIndeterminate {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(250%); }
}

@keyframes dxcLcFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* ==========================================================================
   9. RESPONSIVE CHO MÀN HÌNH NHỎ (MOBILE)
   ========================================================================== */
@media (max-width: 640px) {
    .dxc-lc-root {
        bottom: 20px;
        right: 16px;
    }

    .dxc-lc-simple-btn {
        bottom: 64px;
        right: 2px;
    }

    .dxc-lc-widget {
        right: 10px !important;
        bottom: 16px !important;
        width: calc(100vw - 20px) !important;
        max-width: calc(100vw - 20px) !important;
        height: calc(100vh - 32px) !important;
        max-height: calc(100vh - 32px) !important;
        border-radius: 14px;
    }

    .dxc-lc-speech-bubble {
        display: none !important; /* Ẩn bong bóng dài trên mobile để tránh chật */
    }
}
