﻿/* Limart AI chat widget — from Liyanawap support reference */
#aiChatPanel .ai-chat-logo.ai-chat-logo--icon {
    font-size: 0.95rem !important;
    color: #1e40af !important;
    background: linear-gradient(145deg, #ffffff, #dbeafe) !important;
}

body > #aiChatPanel,
body > .ai-chat-panel {
    z-index: 12050;
}

/* AI chat open — blur everything except panel + FAB (same as support hub) */
body.ai-chat-open .promo-strip,
body.ai-chat-open .navbar,
body.ai-chat-open .navbar .nav-links,
body.ai-chat-open #site-content,
body.ai-chat-open .footer-main,
body.ai-chat-open header.page-header,
body.ai-chat-open .site-energy-bg {
    filter: blur(14px) saturate(110%);
    pointer-events: none;
    user-select: none;
}

body.ai-chat-open .floating-buttons {
    filter: none !important;
    z-index: 100000 !important;
}

body.ai-chat-open .floating-buttons .floating-btn,
body.ai-chat-open .floating-buttons .floating-chat-wrap {
    pointer-events: auto !important;
}
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.floating-buttons {
    position: fixed;
    bottom: max(18px, env(safe-area-inset-bottom, 0px));
    right: max(18px, env(safe-area-inset-right, 0px));
    left: auto;
    z-index: 99999;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 10px;
    pointer-events: none;
}

.floating-buttons .floating-btn,
.floating-buttons .floating-chat-wrap {
    pointer-events: auto;
}

.floating-btn {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-size: 1rem;
    border: none;
    box-shadow: 0 4px 16px rgba(2, 132, 199, 0.4), 0 2px 6px rgba(0, 0, 0, 0.12);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    cursor: pointer;
    text-decoration: none;
}

.floating-btn i {
    font-size: 1.05rem;
    color: #ffffff;
}

.floating-btn:hover {
    transform: scale(1.08);
}

.floating-btn.chat {
    background: linear-gradient(145deg, #0284c7 0%, #0ea5e9 100%) !important;
    border: 2px solid rgba(255, 255, 255, 0.35);
}

.floating-btn.chat:hover {
    background: linear-gradient(145deg, #0369a1 0%, #0284c7 100%) !important;
}

.floating-btn:focus-visible {
    outline: 2px solid var(--white);
    outline-offset: 2px;
}

/* Scroll to top â€“ purple-blue; show after scroll */
.floating-btn.scroll-top {
    background: linear-gradient(145deg, #6366f1 0%, #4f46e5 100%);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
}

.floating-btn.scroll-top.visible {
    opacity: 1;
    pointer-events: auto;
}

.floating-btn.scroll-top:hover {
    background: linear-gradient(145deg, #818cf8 0%, #6366f1 100%);
}

/* Chat â€“ same blue as scroll-to-top */
.floating-btn.chat {
    background: linear-gradient(145deg, #6366f1 0%, #4f46e5 100%);
}

.floating-btn.chat:hover {
    background: linear-gradient(145deg, #818cf8 0%, #6366f1 100%);
    box-shadow: 0 4px 14px rgba(99, 102, 241, 0.35), 0 6px 20px rgba(0, 0, 0, 0.12);
}
.floating-chat-wrap {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.5rem;
}

.ai-chat-scroll-hint {
    position: absolute;
    right: calc(100% + 0.55rem);
    top: 50%;
    transform: translateY(-50%) translateX(8px);
    margin: 0;
    padding: 0.45rem 0.75rem;
    white-space: nowrap;
    font-family: var(--font-ui);
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: -0.01em;
    color: #ffffff;
    background: linear-gradient(145deg, #2563eb, #3b82f6);
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 999px;
    box-shadow: 0 8px 24px rgba(37, 99, 235, 0.35);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.22s ease, transform 0.22s ease, visibility 0.22s ease;
    z-index: 2;
}

.ai-chat-scroll-hint.is-visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(-50%) translateX(0);
}

.ai-chat-scroll-hint::after {
    content: '';
    position: absolute;
    right: -5px;
    top: 50%;
    width: 8px;
    height: 8px;
    background: #3b82f6;
    border-right: 1px solid rgba(255, 255, 255, 0.22);
    border-top: 1px solid rgba(255, 255, 255, 0.22);
    transform: translateY(-50%) rotate(45deg);
}

.floating-btn.chat {
    position: relative;
    background: linear-gradient(145deg, #2563eb, #3b82f6) !important;
}

.floating-btn.chat:hover {
    background: linear-gradient(145deg, #1d4ed8, #2563eb) !important;
}

.floating-btn.chat.is-active {
    background: linear-gradient(145deg, #1d4ed8, #2563eb) !important;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.35), 0 6px 20px rgba(37, 99, 235, 0.42) !important;
}

.floating-btn.chat.is-active::after {
    content: '';
    position: absolute;
    top: 1px;
    right: 1px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #4ade80;
    border: 2px solid #ffffff;
    box-shadow: 0 0 0 2px rgba(74, 222, 128, 0.35);
    animation: aiChatPulse 2s ease infinite;
}

body.site-premium .floating-btn.chat {
    background: linear-gradient(145deg, #2563eb, #3b82f6) !important;
}

body.site-premium .floating-btn.chat.is-active {
    background: linear-gradient(145deg, #1d4ed8, #2563eb) !important;
}

.ai-chat-panel {
    position: fixed;
    inset: 0;
    z-index: 12050;
    display: flex;
    align-items: flex-end;
    justify-content: flex-end;
    padding: 0 1rem calc(76px + env(safe-area-inset-bottom)) 1rem;
    background: rgba(15, 23, 42, 0.35);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

.ai-chat-panel.is-open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.ai-chat-panel-inner {
    width: min(100%, 380px);
    max-height: min(72vh, 520px);
    display: flex;
    flex-direction: column;
    background: #ffffff;
    border-radius: 18px;
    box-shadow: 0 20px 50px rgba(15, 23, 42, 0.22);
    border: 1px solid rgba(220, 228, 240, 0.95);
    overflow: hidden;
    transform: translateY(12px) scale(0.98);
    transition: transform 0.28s cubic-bezier(0.22, 1, 0.36, 1);
}

.ai-chat-panel.is-open .ai-chat-panel-inner {
    transform: translateY(0) scale(1);
}

.ai-chat-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.85rem 1rem;
    background: linear-gradient(135deg, #1e40af, #2563eb);
    color: #fff;
}

.ai-chat-header-brand {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    min-width: 0;
}

.ai-chat-avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.25rem;
    height: 2.25rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.2);
    font-size: 1rem;
}

.ai-chat-header h2 {
    margin: 0;
    font-family: var(--font-heading);
    font-size: 0.95rem;
    font-weight: 700;
    line-height: 1.2;
    color: #fff;
}

.ai-chat-header p {
    margin: 0.12rem 0 0;
    font-size: 0.72rem;
    opacity: 0.9;
    color: #fff;
}

.ai-chat-close {
    border: none;
    background: rgba(255, 255, 255, 0.18);
    color: #fff;
    width: 2rem;
    height: 2rem;
    border-radius: 999px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.ai-chat-messages {
    flex: 1;
    min-height: 200px;
    max-height: 320px;
    overflow-y: auto;
    padding: 0.85rem;
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
    background: #f8fafc;
}

.ai-chat-msg {
    display: flex;
    max-width: 92%;
}

.ai-chat-msg--user {
    align-self: flex-end;
}

.ai-chat-msg--bot {
    align-self: flex-start;
}

.ai-chat-bubble {
    padding: 0.5rem 0.65rem;
    border-radius: 14px;
    font-size: 13.2px;
    line-height: 1.38;
}

.ai-chat-msg--user .ai-chat-bubble {
    background: linear-gradient(135deg, #2563eb, #3b82f6);
    color: #fff;
    border-bottom-right-radius: 4px;
}

.ai-chat-msg--bot .ai-chat-bubble {
    background: #ffffff;
    color: var(--text-color);
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-bottom-left-radius: 4px;
}

.ai-chat-action {
    display: inline-block;
    margin-top: 0.45rem;
    padding: 0.28rem 0.65rem;
    border-radius: 999px;
    background: rgba(37, 99, 235, 0.1);
    color: #2563eb;
    font-size: 0.76rem;
    font-weight: 600;
    text-decoration: none;
}

.ai-chat-quick {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    padding: 0.55rem 0.85rem 0;
    background: #fff;
}

.ai-chat-quick button {
    border: 1px solid rgba(37, 99, 235, 0.2);
    background: #fff;
    color: #2563eb;
    border-radius: 999px;
    padding: 0.28rem 0.65rem;
    font-size: 0.72rem;
    font-weight: 600;
    cursor: pointer;
    font-family: var(--font-ui);
}

.ai-chat-form {
    display: flex;
    gap: 0.45rem;
    padding: 0.65rem 0.85rem 0.85rem;
    background: #fff;
    border-top: 1px solid rgba(15, 23, 42, 0.06);
}

.ai-chat-form input {
    flex: 1;
    min-width: 0;
    border: 1px solid rgba(15, 23, 42, 0.12);
    border-radius: 999px;
    padding: 0.55rem 0.85rem;
    font-family: var(--font-ui);
    font-size: 0.84rem;
}

.ai-chat-form button[type="submit"] {
    width: 2.35rem;
    height: 2.35rem;
    border: none;
    border-radius: 999px;
    background: linear-gradient(135deg, #2563eb, #3b82f6);
    color: #fff;
    cursor: pointer;
    flex-shrink: 0;
}

@media (max-width: 480px) {
    .ai-chat-scroll-hint {
        position: absolute;
        right: calc(100% + 0.5rem);
        top: 50%;
        bottom: auto;
        left: auto;
        transform: translateY(-50%) translateX(8px);
        font-size: clamp(0.62rem, 2.8vw, 0.72rem);
        padding: 0.36rem 0.58rem;
        max-width: calc(100vw - 5.25rem);
        width: max-content;
        white-space: nowrap !important;
        text-align: left;
        line-height: 1.2;
        letter-spacing: -0.02em;
        z-index: 3;
    }

    .ai-chat-scroll-hint.is-visible {
        transform: translateY(-50%) translateX(0);
    }

    .ai-chat-scroll-hint::after {
        right: -5px;
        left: auto;
        top: 50%;
        margin-top: 0;
        transform: translateY(-50%) rotate(45deg);
    }

    .ai-chat-panel {
        padding: 0 0.45rem calc(72px + env(safe-area-inset-bottom));
    }

    .ai-chat-panel-inner {
        width: 100%;
        max-height: min(78vh, 560px);
    }
}
/* =============================================================
   AI Assistant â€” premium UI upgrades
   ============================================================= */
.ai-chat-panel-inner {
    width: min(100%, 400px);
    max-height: min(78vh, 560px);
    border-radius: 20px;
    box-shadow: 0 24px 64px rgba(15, 23, 42, 0.28), 0 0 0 1px rgba(255, 255, 255, 0.08);
}

.ai-chat-header {
    padding: 1rem 1.05rem;
    background: linear-gradient(135deg, #0f172a 0%, #1e40af 48%, #2563eb 100%);
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.ai-chat-avatar {
    width: 2.5rem;
    height: 2.5rem;
    background: linear-gradient(145deg, rgba(255,255,255,0.28), rgba(255,255,255,0.08));
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.15);
    font-size: 1.05rem;
}

.ai-chat-status {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    margin: 0.15rem 0 0 !important;
    font-size: 0.68rem !important;
    opacity: 0.92 !important;
}

.ai-chat-status-dot {
    width: 7px;
    height: 7px;
    border-radius: 999px;
    background: #4ade80;
    box-shadow: 0 0 0 2px rgba(74, 222, 128, 0.35);
    animation: aiChatPulse 2s ease infinite;
}

@keyframes aiChatPulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.55; }
}

.ai-chat-messages {
    min-height: 220px;
    max-height: 340px;
    padding: 1rem 0.85rem;
    gap: 0.65rem;
    background: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%);
}

.ai-chat-msg {
    display: flex;
    align-items: flex-end;
    gap: 0.4rem;
    max-width: 94%;
}

.ai-chat-msg-avatar {
    flex-shrink: 0;
    width: 1.65rem;
    height: 1.65rem;
    border-radius: 999px;
    background: linear-gradient(135deg, #2563eb, #3b82f6);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.65rem;
}

.ai-chat-msg--user {
    flex-direction: row-reverse;
    align-self: flex-end;
}

.ai-chat-msg--user .ai-chat-bubble {
    background: linear-gradient(135deg, #1d4ed8, #2563eb);
    border-bottom-right-radius: 4px;
}

.ai-chat-msg--bot .ai-chat-bubble {
    background: #ffffff;
    border: 1px solid rgba(15, 23, 42, 0.07);
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04);
    border-bottom-left-radius: 4px;
}

.ai-chat-bubble {
    padding: 0.45rem 0.62rem;
    font-size: 13.2px;
    line-height: 1.38;
}

.ai-chat-bubble strong {
    font-weight: 600;
    color: inherit;
}

.ai-chat-typing {
    display: flex;
    gap: 4px;
    padding: 0.7rem 0.85rem !important;
}

.ai-chat-typing span {
    width: 6px;
    height: 6px;
    border-radius: 999px;
    background: #94a3b8;
    animation: aiChatDot 1.2s ease infinite;
}

.ai-chat-typing span:nth-child(2) { animation-delay: 0.15s; }
.ai-chat-typing span:nth-child(3) { animation-delay: 0.3s; }

@keyframes aiChatDot {
    0%, 80%, 100% { transform: translateY(0); opacity: 0.45; }
    40% { transform: translateY(-4px); opacity: 1; }
}

.ai-chat-suggest {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    padding: 0 0.85rem 0.45rem;
    background: #fff;
    min-height: 0;
}

.ai-chat-suggest:empty {
    display: none;
}

.ai-chat-suggest button {
    border: 1px solid rgba(37, 99, 235, 0.22);
    background: rgba(37, 99, 235, 0.06);
    color: #1d4ed8;
    border-radius: 999px;
    padding: 0.24rem 0.45rem;
    font-size: 0.62rem;
    font-weight: 600;
    cursor: pointer;
    font-family: var(--font-ui);
}

.ai-chat-quick {
    padding: 0.45rem 0.85rem 0.35rem;
    gap: 0.32rem;
    overflow-x: auto;
    flex-wrap: nowrap;
    scrollbar-width: none;
    background: #fff;
}

.ai-chat-quick::-webkit-scrollbar {
    display: none;
}

.ai-chat-quick button {
    flex-shrink: 0;
    white-space: nowrap;
}

.ai-chat-form {
    padding: 0.7rem 0.85rem 0.9rem;
    background: #fff;
    border-top: 1px solid rgba(15, 23, 42, 0.06);
}

.ai-chat-form input {
    box-shadow: inset 0 1px 2px rgba(15, 23, 42, 0.04);
}

.ai-chat-form button[type="submit"] {
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.35);
}

.ai-chat-action {
    margin-top: 0.5rem;
    padding: 0.32rem 0.75rem;
    background: linear-gradient(135deg, #2563eb, #3b82f6);
    color: #fff !important;
    border-radius: 999px;
    font-size: 0.74rem;
    font-weight: 600;
    text-decoration: none;
    display: inline-block;
}
#aiChatPanel,
.ai-chat-panel {
    position: fixed !important;
    inset: 0 !important;
    z-index: 12050 !important;
    margin: 0 !important;
    padding: 0 1rem calc(76px + env(safe-area-inset-bottom, 0px)) 1rem !important;
    width: auto !important;
    height: auto !important;
    max-height: none !important;
    pointer-events: none !important;
}

#aiChatPanel.is-open,
.ai-chat-panel.is-open {
    pointer-events: auto !important;
}

#aiChatPanel .ai-chat-panel-inner {
    pointer-events: auto !important;
}
/* =============================================================
   Chat window UI v2 â€” LW logo, responsive, no overlap
   ============================================================= */
.ai-chat-panel-inner {
    display: flex !important;
    flex-direction: column !important;
    min-height: 0 !important;
    max-height: min(85dvh, 560px) !important;
    overflow: hidden !important;
}

.ai-chat-header {
    flex-shrink: 0;
    padding: 0.85rem 0.9rem !important;
    background: linear-gradient(135deg, #0f172a 0%, #1e40af 48%, #2563eb 100%) !important;
}

.ai-chat-header-brand {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    min-width: 0;
    flex: 1;
}

.ai-chat-logo {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.35rem;
    height: 2.35rem;
    flex-shrink: 0;
    border-radius: 10px;
    background: linear-gradient(145deg, #ffffff, #dbeafe);
    color: #1e40af;
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 0.72rem;
    letter-spacing: -0.04em;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}

.ai-chat-title-block {
    min-width: 0;
    flex: 1;
}

.ai-chat-title-row {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    min-width: 0;
}

.ai-chat-title-row h2,
.ai-chat-header h2,
#aiChatTitle {
    margin: 0 !important;
    padding: 0 !important;
    font-family: var(--font-heading) !important;
    font-size: clamp(0.78rem, 3.4vw, 0.92rem) !important;
    font-weight: 700 !important;
    line-height: 1.25 !important;
    color: #ffffff !important;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: 0;
    flex: 1 1 auto;
}

.ai-chat-status-dot--title {
    flex-shrink: 0;
    width: 8px;
    height: 8px;
    margin: 0;
}

.ai-chat-status-text {
    margin: 0.15rem 0 0 !important;
    padding: 0 !important;
    font-size: 0.68rem !important;
    line-height: 1.3 !important;
    color: rgba(255, 255, 255, 0.88) !important;
    opacity: 1 !important;
}

.ai-chat-close {
    flex-shrink: 0;
    margin-left: 0.35rem;
}

.ai-chat-messages {
    flex: 1 1 auto !important;
    min-height: 0 !important;
    max-height: none !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch;
}

.ai-chat-bubble {
    word-break: break-word;
    overflow-wrap: anywhere;
    hyphens: auto;
}

.ai-chat-msg {
    max-width: 100% !important;
}

.ai-chat-msg .ai-chat-bubble {
    max-width: 100%;
}

.ai-chat-action {
    display: inline-block;
    max-width: 100%;
    white-space: normal;
    text-align: center;
    word-break: break-word;
}

.ai-chat-suggest {
    flex-shrink: 0;
    flex-wrap: wrap;
    gap: 0.32rem;
    padding: 0.35rem 0.75rem 0.4rem;
    max-height: 5.5rem;
    overflow-y: auto;
}

.ai-chat-header {
    display: flex !important;
    align-items: center !important;
    padding: 0.72rem 0.75rem !important;
    background: linear-gradient(135deg, #0f172a 0%, #1e40af 48%, #2563eb 100%) !important;
    color: #fff !important;
}

.ai-chat-header-row {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    width: 100%;
    min-width: 0;
}

.ai-chat-header-title,
.ai-chat-header-row #aiChatTitle {
    flex: 1 1 auto;
    min-width: 0;
    margin: 0 !important;
    padding: 0 !important;
    font-family: var(--font-heading) !important;
    font-size: clamp(0.72rem, 3.1vw, 0.88rem) !important;
    font-weight: 700 !important;
    line-height: 1.2 !important;
    color: #ffffff !important;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ai-chat-header-row .ai-chat-close {
    margin-left: auto;
    flex-shrink: 0;
    width: 2rem;
    height: 2rem;
    border: none;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.ai-chat-header-row .ai-chat-close:hover {
    background: rgba(255, 255, 255, 0.32);
}

.ai-chat-panel-inner {
    max-height: min(88dvh, 580px) !important;
}

.ai-chat-messages {
    flex: 1 1 auto !important;
    min-height: 160px !important;
    max-height: min(52vh, 400px) !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    overscroll-behavior: contain;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
}

@media (max-width: 480px) {
    .ai-chat-header-title,
    .ai-chat-header-row #aiChatTitle {
        font-size: 0.74rem !important;
    }

    .ai-chat-messages {
        min-height: 140px !important;
        max-height: min(48vh, 340px) !important;
    }
}
#aiChatPanel .ai-chat-panel-inner {
    display: flex !important;
    flex-direction: column !important;
    background: #ffffff !important;
    overflow: hidden !important;
    height: min(560px, 85dvh) !important;
    max-height: min(560px, 85dvh) !important;
    min-height: 280px !important;
    width: min(100%, 400px) !important;
    pointer-events: auto !important;
}

#aiChatPanel .ai-chat-header {
    display: flex !important;
    align-items: center !important;
    flex-shrink: 0 !important;
    width: 100% !important;
    padding: 0.72rem 0.8rem !important;
    background: linear-gradient(135deg, #0f172a 0%, #1e40af 48%, #2563eb 100%) !important;
    color: #ffffff !important;
    border: none !important;
    box-shadow: none !important;
}

#aiChatPanel .ai-chat-header-row {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 0.5rem !important;
    width: 100% !important;
    min-width: 0 !important;
}

#aiChatPanel .ai-chat-header-brand-group {
    display: flex !important;
    align-items: center !important;
    gap: 0.42rem !important;
    min-width: 0 !important;
    flex: 1 1 auto !important;
}

#aiChatPanel .ai-chat-logo {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 2.15rem !important;
    height: 2.15rem !important;
    flex-shrink: 0 !important;
    border-radius: 9px !important;
    background: linear-gradient(145deg, #ffffff, #dbeafe) !important;
    color: #1e40af !important;
    font-family: var(--font-heading) !important;
    font-weight: 800 !important;
    font-size: 0.68rem !important;
    letter-spacing: -0.04em !important;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.12) !important;
}

#aiChatPanel .ai-chat-header-title,
#aiChatPanel #aiChatTitle {
    margin: 0 !important;
    padding: 0 !important;
    font-family: var(--font-heading) !important;
    font-size: clamp(0.72rem, 3vw, 0.86rem) !important;
    font-weight: 700 !important;
    line-height: 1.2 !important;
    color: #ffffff !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    min-width: 0 !important;
    flex: 0 1 auto !important;
    background: transparent !important;
}

#aiChatPanel .ai-chat-status-dot--title {
    flex-shrink: 0 !important;
    width: 8px !important;
    height: 8px !important;
    border-radius: 999px !important;
    background: #4ade80 !important;
    box-shadow: 0 0 0 2px rgba(74, 222, 128, 0.35) !important;
}

#aiChatPanel .ai-chat-close {
    flex-shrink: 0 !important;
    width: 2.05rem !important;
    height: 2.05rem !important;
    margin: 0 !important;
    padding: 0 !important;
    border: none !important;
    border-radius: 999px !important;
    background: rgba(255, 255, 255, 0.22) !important;
    color: #ffffff !important;
    cursor: pointer !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 1rem !important;
    line-height: 1 !important;
}

#aiChatPanel .ai-chat-close:hover {
    background: rgba(255, 255, 255, 0.35) !important;
}

#aiChatPanel .ai-chat-messages {
    flex: 1 1 0 !important;
    min-height: 0 !important;
    height: auto !important;
    max-height: none !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
    overscroll-behavior: contain !important;
    scroll-behavior: smooth !important;
    -webkit-overflow-scrolling: touch !important;
    touch-action: pan-y !important;
    scrollbar-width: thin !important;
    scrollbar-color: rgba(37, 99, 235, 0.45) rgba(15, 23, 42, 0.06) !important;
    padding: 0.65rem 0.55rem !important;
    gap: 0.5rem !important;
}

#aiChatPanel .ai-chat-msg--bot {
    align-self: stretch !important;
    max-width: 100% !important;
    width: 100% !important;
}

#aiChatPanel .ai-chat-msg--user {
    max-width: 88% !important;
    align-self: flex-end !important;
}

#aiChatPanel .ai-chat-msg--bot .ai-chat-bubble {
    flex: 1 1 auto !important;
    width: calc(100% - 2.05rem) !important;
    max-width: none !important;
    min-width: 0 !important;
    box-sizing: border-box !important;
    word-break: break-word !important;
    overflow-wrap: anywhere !important;
}

#aiChatPanel .ai-chat-bubble .ai-chat-para,
#aiChatPanel .ai-chat-bubble .ai-chat-list {
    max-width: 100% !important;
}

#aiChatPanel .ai-chat-body {
    display: flex !important;
    flex-direction: column !important;
    flex: 1 1 0 !important;
    min-height: 0 !important;
    overflow: hidden !important;
    justify-content: flex-end !important;
}

#aiChatPanel .ai-chat-form {
    flex: 0 0 auto !important;
    flex-shrink: 0 !important;
    margin: 0 !important;
    padding: 0.5rem 0.55rem 0.5rem !important;
    border-top: 1px solid rgba(15, 23, 42, 0.06) !important;
    background: #fff !important;
}

#aiChatPanel .ai-chat-bubble-chips {
    display: flex !important;
    flex-direction: column !important;
    gap: 0.32rem !important;
    margin-top: 0.5rem !important;
    padding-top: 0.48rem !important;
    border-top: 1px solid rgba(15, 23, 42, 0.08) !important;
    width: 100% !important;
    box-sizing: border-box !important;
}

#aiChatPanel .ai-chat-bubble-chip {
    width: 100% !important;
    min-width: 0 !important;
    border: 1px solid rgba(37, 99, 235, 0.28) !important;
    background: rgba(37, 99, 235, 0.06) !important;
    color: #1d4ed8 !important;
    border-radius: 10px !important;
    padding: 0.38rem 0.55rem !important;
    font-size: 13.2px !important;
    font-weight: 600 !important;
    line-height: 1.35 !important;
    cursor: pointer !important;
    font-family: var(--font-ui) !important;
    white-space: normal !important;
    text-align: left !important;
    display: block !important;
    overflow: visible !important;
    word-break: break-word !important;
    box-sizing: border-box !important;
    transition: background 0.15s ease, border-color 0.15s ease !important;
}

#aiChatPanel .ai-chat-messages::-webkit-scrollbar {
    width: 6px;
}

#aiChatPanel .ai-chat-messages::-webkit-scrollbar-thumb {
    background: rgba(37, 99, 235, 0.35);
    border-radius: 999px;
}

#aiChatPanel .ai-chat-bubble,
#aiChatPanel .ai-chat-msg--user .ai-chat-bubble,
#aiChatPanel .ai-chat-msg--bot .ai-chat-bubble,
#aiChatPanel .ai-chat-bubble .ai-chat-para,
#aiChatPanel .ai-chat-bubble .ai-chat-list,
#aiChatPanel .ai-chat-bubble .ai-chat-list li,
#aiChatPanel .ai-chat-bubble strong {
    font-size: 13.2px !important;
}

#aiChatPanel .ai-chat-bubble {
    line-height: 1.38 !important;
    padding: 0.45rem 0.62rem !important;
}

#aiChatPanel .ai-chat-bubble-chip {
    font-size: 13.2px !important;
    max-height: none;
}

#aiChatPanel .ai-chat-msg-time {
    display: block !important;
    width: 100% !important;
    margin-top: 0.38rem !important;
    padding-top: 0.3rem !important;
    border-top: 1px solid rgba(15, 23, 42, 0.07) !important;
    font-size: 10px !important;
    line-height: 1.3 !important;
    font-weight: 500 !important;
    letter-spacing: 0.01em !important;
    font-family: var(--font-ui) !important;
}

#aiChatPanel .ai-chat-msg--user .ai-chat-msg-time {
    color: rgba(255, 255, 255, 0.82) !important;
    border-top-color: rgba(255, 255, 255, 0.18) !important;
}

#aiChatPanel .ai-chat-msg--bot .ai-chat-msg-time {
    color: rgba(15, 23, 42, 0.42) !important;
}

#aiChatPanel .ai-chat-action {
    font-size: 12px !important;
    padding: 0.24rem 0.52rem !important;
    margin-top: 0.38rem !important;
}

/* Suggestion chips live inside bot reply bubbles, not above the input */
#aiChatPanel .ai-chat-suggest {
    display: none !important;
    height: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
    overflow: hidden !important;
}

#aiChatPanel .ai-chat-bubble-chip:hover {
    background: rgba(37, 99, 235, 0.12) !important;
    border-color: rgba(37, 99, 235, 0.45) !important;
    color: #1e40af !important;
}

#aiChatPanel .ai-chat-suggest-btn,
#aiChatPanel .ai-chat-suggest button {
    font-size: 13.2px !important;
}

#aiChatPanel .ai-chat-header-actions {
    display: flex !important;
    align-items: center !important;
    gap: 0.35rem !important;
    flex-shrink: 0 !important;
}

#aiChatPanel .ai-chat-minimize {
    flex-shrink: 0 !important;
    width: 2.05rem !important;
    height: 2.05rem !important;
    margin: 0 !important;
    padding: 0 !important;
    border: none !important;
    border-radius: 999px !important;
    background: rgba(255, 255, 255, 0.22) !important;
    color: #ffffff !important;
    cursor: pointer !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 0.85rem !important;
    line-height: 1 !important;
}

#aiChatPanel .ai-chat-minimize:hover {
    background: rgba(255, 255, 255, 0.35) !important;
}

#aiChatPanel .ai-chat-bubble .ai-chat-para {
    margin: 0 0 0.38rem !important;
}

#aiChatPanel .ai-chat-bubble .ai-chat-para:last-child {
    margin-bottom: 0 !important;
}

#aiChatPanel .ai-chat-bubble .ai-chat-list {
    margin: 0.28rem 0 0.45rem !important;
    padding-left: 1rem !important;
    font-size: inherit !important;
}

#aiChatPanel .ai-chat-bubble .ai-chat-list li {
    margin-bottom: 0.22rem !important;
    line-height: 1.36 !important;
}

#aiChatPanel .ai-chat-bubble .ai-chat-list li:last-child {
    margin-bottom: 0 !important;
}

#aiChatPanel.is-minimized.ai-chat-panel.is-open {
    background: transparent !important;
    pointer-events: none !important;
}

#aiChatPanel.is-minimized .ai-chat-panel-inner {
    display: none !important;
    height: 0 !important;
    min-height: 0 !important;
    max-height: 0 !important;
    overflow: hidden !important;
    pointer-events: none !important;
    border: none !important;
    box-shadow: none !important;
}

#aiChatPanel.is-minimized .ai-chat-body {
    display: none !important;
}

#aiChatPanel .ai-chat-form,
#aiChatPanel .ai-chat-form input,
#aiChatPanel .ai-chat-suggest button,
#aiChatPanel .ai-chat-minimize,
#aiChatPanel .ai-chat-close {
    pointer-events: auto !important;
}

#aiChatPanel .ai-chat-form input {
    pointer-events: auto !important;
    touch-action: manipulation !important;
    -webkit-user-select: text !important;
    user-select: text !important;
}

#aiChatPanel.ai-chat-panel.is-open {
    background: rgba(15, 23, 42, 0.4) !important;
}

#aiChatPanel .ai-chat-header {
    display: flex !important;
    align-items: center !important;
    flex-shrink: 0 !important;
    width: 100% !important;
    padding: 0.78rem 0.85rem !important;
    background: linear-gradient(135deg, #1d4ed8 0%, #2563eb 55%, #3b82f6 100%) !important;
    color: #ffffff !important;
    border: none !important;
    box-shadow: none !important;
}

#aiChatPanel .ai-chat-messages {
    background: #f4f7fb !important;
    padding: 0.75rem 0.65rem !important;
}

#aiChatPanel .ai-chat-msg--bot .ai-chat-bubble {
    background: #ffffff !important;
    border: 1px solid rgba(148, 163, 184, 0.35) !important;
    border-radius: 14px !important;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04) !important;
    padding: 0.62rem 0.72rem !important;
}

#aiChatPanel .ai-chat-action {
    display: inline-block !important;
    margin-top: 0.55rem !important;
    padding: 0.38rem 0.9rem !important;
    background: linear-gradient(135deg, #2563eb, #3b82f6) !important;
    color: #ffffff !important;
    border-radius: 999px !important;
    font-size: 12px !important;
    font-weight: 600 !important;
    text-decoration: none !important;
    line-height: 1.25 !important;
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.28) !important;
}

#aiChatPanel .ai-chat-action:hover {
    filter: brightness(1.05) !important;
    color: #ffffff !important;
}

#aiChatPanel .ai-chat-msg-time {
    margin-top: 0.45rem !important;
    padding-top: 0.35rem !important;
}

#aiChatPanel .ai-chat-bubble-chips {
    margin-top: 0.42rem !important;
    padding-top: 0.42rem !important;
    border-top: 1px solid rgba(148, 163, 184, 0.22) !important;
}

#aiChatPanel .ai-chat-form input {
    border-radius: 999px !important;
    border: 1px solid rgba(148, 163, 184, 0.45) !important;
    background: #f8fafc !important;
    padding: 0.58rem 0.9rem !important;
}

#aiChatPanel .ai-chat-form button[type="submit"] {
    width: 2.4rem !important;
    height: 2.4rem !important;
    box-shadow: 0 3px 10px rgba(37, 99, 235, 0.32) !important;
}

#aiChatQuick {
    display: none !important;
}

/* Mobile — smaller FABs, tight to bottom-right */
@media (max-width: 768px) {
    .floating-buttons {
        bottom: max(10px, env(safe-area-inset-bottom, 0px)) !important;
        right: max(8px, env(safe-area-inset-right, 0px)) !important;
        gap: 6px !important;
    }

    .floating-btn {
        width: 36px !important;
        height: 36px !important;
        font-size: 0.85rem !important;
        box-shadow: 0 3px 10px rgba(2, 132, 199, 0.32), 0 1px 4px rgba(0, 0, 0, 0.1) !important;
    }

    .floating-btn i {
        font-size: 0.88rem !important;
    }

    .floating-btn.chat.is-active::after {
        width: 8px !important;
        height: 8px !important;
        top: 0 !important;
        right: 0 !important;
    }

    .ai-chat-panel {
        padding: 0 0.45rem calc(58px + env(safe-area-inset-bottom, 0px)) 0.45rem !important;
    }
}

@media (max-width: 480px) {
    .floating-buttons {
        bottom: max(8px, env(safe-area-inset-bottom, 0px)) !important;
        right: max(6px, env(safe-area-inset-right, 0px)) !important;
        gap: 5px !important;
    }

    .floating-btn {
        width: 34px !important;
        height: 34px !important;
    }

    .floating-btn i {
        font-size: 0.82rem !important;
    }
}

@media (max-width: 480px) {
    #aiChatPanel .ai-chat-header-title,
    #aiChatPanel #aiChatTitle {
        font-size: 0.72rem !important;
    }

    #aiChatPanel .ai-chat-messages {
        min-height: 0 !important;
        max-height: none !important;
    }

    #aiChatPanel .ai-chat-form {
        padding-bottom: 0.45rem !important;
    }
}
