/* ==========================================================================
   Azoogi AI Floating Chat Widget Styles
   Matches Azoogi Design System: Glassmorphism, Dark/Light Theme, Accent #67d04e
   ========================================================================== */

:root {
    --chat-accent: #67d04e;
    --chat-accent-hover: #7ae65f;
    --chat-accent-glow: rgba(103, 208, 78, 0.42);
    --chat-bold-color: #67d04e;
    --chat-bg: #0f0f11;
    --chat-header-bg: #161619;
    --chat-input-bg: #141416;
    --chat-bubble-user: #222226;
    --chat-bubble-ai: rgba(255, 255, 255, 0.05);
    --chat-card-bg: rgba(255, 255, 255, 0.04);
    --chat-card-border: rgba(255, 255, 255, 0.1);
    --chat-text: #f3f3f3;
    --chat-muted: #9a9a9a;
    --chat-border: rgba(255, 255, 255, 0.12);
    --chat-shadow: 0 24px 60px rgba(0, 0, 0, 0.65), 0 0 0 1px rgba(255, 255, 255, 0.1);
}

[data-theme="light"] {
    --chat-accent: #3aa028;
    --chat-accent-hover: #2d7a1e;
    --chat-accent-glow: rgba(58, 160, 40, 0.32);
    --chat-bold-color: #2d7a1e;
    --chat-bg: #ffffff;
    --chat-header-bg: #ffffff;
    --chat-input-bg: #ffffff;
    --chat-bubble-user: #f1f5f9;
    --chat-bubble-ai: #ffffff;
    --chat-card-bg: #ffffff;
    --chat-card-border: #e2e8f0;
    --chat-text: #0f172a;
    --chat-muted: #64748b;
    --chat-border: rgba(0, 0, 0, 0.08);
    --chat-shadow: 0 20px 50px rgba(0, 0, 0, 0.14), 0 0 0 1px rgba(0, 0, 0, 0.06);
}

/* Floating Launcher Button */
.azoogi-chat-launcher {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 99999;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 18px 12px 14px;
    background: var(--chat-header-bg);
    color: var(--chat-text);
    border: 1px solid var(--chat-border);
    border-radius: 50px;
    cursor: pointer;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4), 0 0 0 1px var(--chat-border);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
    font-family: var(--font-sans, 'Inter', sans-serif);
    font-size: 13px;
    font-weight: 500;
    user-select: none;
}

.azoogi-chat-launcher:hover {
    transform: translateY(-3px) scale(1.02);
    border-color: var(--chat-accent);
    box-shadow: 0 14px 40px var(--chat-accent-glow), 0 0 0 1px var(--chat-accent);
}

.azoogi-chat-launcher-icon {
    position: relative;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--chat-accent);
    color: #0b0b0b;
    border-radius: 50%;
    transition: transform 0.3s ease;
}

.azoogi-chat-launcher:hover .azoogi-chat-launcher-icon {
    transform: rotate(12deg) scale(1.08);
}

.azoogi-chat-launcher-pulse {
    position: absolute;
    inset: -4px;
    border-radius: 50%;
    border: 2px solid var(--chat-accent);
    opacity: 0.8;
    animation: chatLauncherPulse 2.4s cubic-bezier(0.24, 0, 0.38, 1) infinite;
}

@keyframes chatLauncherPulse {
    0% { transform: scale(0.85); opacity: 0.9; }
    70%, 100% { transform: scale(1.8); opacity: 0; }
}

/* Launcher when widget is open: smoothly hide so the chat container has full focus */
.azoogi-chat-widget.is-open .azoogi-chat-launcher {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(12px) scale(0.85);
}

/* Chat Main Drawer Container */
.azoogi-chat-container {
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 480px;
    max-width: calc(100vw - 48px);
    height: 660px;
    max-height: calc(100vh - 48px);
    background: var(--chat-bg);
    border: 1px solid var(--chat-border);
    border-radius: 20px;
    box-shadow: var(--chat-shadow);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    z-index: 99998;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px) scale(0.96);
    transform-origin: bottom right;
    transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
    font-family: var(--font-sans, 'Inter', sans-serif);
}

.azoogi-chat-widget.is-open .azoogi-chat-container {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

/* Chat Header */
.azoogi-chat-header {
    position: relative;
    padding: 16px 20px;
    background: var(--chat-header-bg);
    border-bottom: 1px solid var(--chat-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-shrink: 0;
    min-height: 72px;
    box-sizing: border-box;
}

.azoogi-chat-header-brand {
    display: flex;
    align-items: center;
    gap: 12px;
}

.azoogi-chat-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--chat-header-bg);
    border: 1px solid var(--chat-border);
    color: var(--chat-accent);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
    flex-shrink: 0;
}

.azoogi-chat-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

.azoogi-chat-avatar svg {
    color: var(--chat-accent);
}

.azoogi-chat-status-dot {
    position: absolute;
    bottom: 1px;
    right: 1px;
    width: 10px;
    height: 10px;
    background: #10b981;
    border: 2px solid var(--chat-header-bg);
    border-radius: 50%;
    box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.05);
}

.azoogi-chat-title-wrap {
    display: flex;
    flex-direction: column;
    justify-content: center;
    margin: 0;
    padding: 0;
}

.azoogi-chat-title-wrap h3 {
    margin: 0;
    padding: 0;
    font-size: 15px;
    font-weight: 700;
    color: var(--chat-text);
    line-height: 1.25;
    letter-spacing: -0.01em;
}

.azoogi-chat-title-wrap p {
    margin: 2px 0 0 0;
    padding: 0;
    font-size: 12px;
    line-height: 1.3;
    color: var(--chat-muted);
    font-weight: 400;
}

.azoogi-chat-header-actions {
    display: flex;
    align-items: center;
    gap: 6px;
}

#azoogi-chat-sound-toggle {
    display: none !important;
}

.azoogi-chat-header-btn {
    width: 32px;
    height: 32px;
    background: transparent;
    border: none;
    color: var(--chat-muted);
    cursor: pointer;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    margin: 0;
    transition: all 0.2s ease;
}

.azoogi-chat-header-btn:hover {
    color: var(--chat-text);
    background: var(--chat-bubble-ai);
}

#azoogi-chat-reset svg {
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

#azoogi-chat-reset:hover {
    color: var(--chat-text);
}

#azoogi-chat-reset:hover svg {
    transform: rotate(90deg);
}

.azoogi-chat-header-close-btn {
    color: var(--chat-text);
}

.azoogi-chat-header-close-btn:hover {
    color: var(--chat-accent);
    background: var(--chat-bubble-ai);
    transform: scale(1.05);
}

/* Chat Messages Scroll Body */
.azoogi-chat-body {
    flex: 1;
    overflow-y: auto;
    padding: 20px 18px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    scroll-behavior: smooth;
}

.azoogi-chat-body::-webkit-scrollbar {
    width: 5px;
}
.azoogi-chat-body::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.15);
    border-radius: 10px;
}

/* Welcome Screen Container matching Alfred design */
.azoogi-chat-welcome-container {
    display: flex;
    flex-direction: column;
    gap: 14px;
    animation: chatMsgFadeIn 0.35s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.azoogi-chat-welcome-msg {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.azoogi-chat-welcome-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 1px solid var(--chat-border);
    background: var(--chat-header-bg);
    color: var(--chat-accent);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    overflow: hidden;
    margin-top: 3px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.05);
}

.azoogi-chat-welcome-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

.azoogi-chat-welcome-bubble {
    flex: 1;
    background: var(--chat-bubble-ai);
    border: 1px solid var(--chat-card-border);
    border-radius: 18px;
    padding: 14px 18px;
    font-size: 14px;
    line-height: 1.55;
    color: var(--chat-text);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.03);
}

.azoogi-chat-welcome-bubble p {
    margin: 0;
}

/* Suggestion Chips list */
.azoogi-chat-chip-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    padding-left: 44px;
}

@media (max-width: 480px) {
    .azoogi-chat-chip-list {
        padding-left: 0;
    }
}

.azoogi-chat-chip {
    background: var(--chat-card-bg);
    border: 1.5px solid var(--chat-accent);
    box-shadow: 0 0 14px var(--chat-accent-glow);
    color: var(--chat-text);
    font-size: 13px;
    font-weight: 600;
    padding: 8px 16px;
    border-radius: 9999px;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    text-align: left;
    display: inline-flex;
    align-items: center;
    line-height: 1.35;
    font-family: inherit;
}

.azoogi-chat-chip svg {
    flex-shrink: 0;
}

.azoogi-chat-chip:hover {
    border-color: var(--chat-accent-hover);
    box-shadow: 0 0 20px var(--chat-accent-glow);
    transform: translateY(-1px);
}

/* Featured / Glowing Chip (with green accent glow) */
.azoogi-chat-chip.is-featured {
    border: 1.5px solid var(--chat-accent);
    box-shadow: 0 0 14px var(--chat-accent-glow);
    color: var(--chat-text);
    font-weight: 600;
}

.azoogi-chat-chip.is-featured:hover {
    box-shadow: 0 0 20px var(--chat-accent-glow);
    border-color: var(--chat-accent-hover);
}

/* Welcome Actions CTA Block */
.azoogi-chat-welcome-actions {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    margin-top: 14px;
    padding-left: 44px;
}

@media (max-width: 480px) {
    .azoogi-chat-welcome-actions {
        padding-left: 0;
    }
}

.azoogi-chat-cta-btn {
    width: 100%;
    height: 46px;
    border-radius: 12px;
    background: #0f172a;
    color: #ffffff;
    border: none;
    font-size: 14px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
    font-family: inherit;
}

[data-theme="dark"] .azoogi-chat-cta-btn {
    background: #1c2128;
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.15);
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.4);
}

.azoogi-chat-cta-btn:hover {
    background: #1e293b;
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.18);
}

[data-theme="dark"] .azoogi-chat-cta-btn:hover {
    background: #2d3748;
}

.azoogi-chat-report-link {
    background: transparent;
    border: none;
    font-size: 12px;
    color: var(--chat-muted);
    cursor: pointer;
    text-decoration: underline;
    transition: color 0.2s ease;
    padding: 4px;
    font-family: inherit;
}

.azoogi-chat-report-link:hover {
    color: var(--chat-text);
}

/* Message Bubbles */
.azoogi-chat-msg {
    display: flex;
    flex-direction: column;
    max-width: 86%;
    animation: chatMsgFadeIn 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes chatMsgFadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

.azoogi-chat-msg.is-user {
    align-self: flex-end;
    align-items: flex-end;
}

.azoogi-chat-msg.is-assistant {
    align-self: flex-start;
    align-items: flex-start;
}

.azoogi-chat-bubble {
    padding: 12px 16px;
    border-radius: 16px;
    font-size: 13.5px;
    line-height: 1.55;
    color: var(--chat-text);
    word-break: break-word;
}

.azoogi-chat-bubble strong,
.azoogi-chat-bubble b,
.azoogi-chat-bold {
    color: var(--chat-bold-color, #67d04e);
    font-weight: 700;
}

.azoogi-chat-bubble p,
.azoogi-chat-bubble .azoogi-chat-p {
    margin: 0 0 8px 0;
}

.azoogi-chat-bubble p:last-child,
.azoogi-chat-bubble .azoogi-chat-p:last-child {
    margin-bottom: 0;
}

.azoogi-chat-bubble .azoogi-chat-heading,
.azoogi-chat-bubble h2,
.azoogi-chat-bubble h3,
.azoogi-chat-bubble h4 {
    margin: 10px 0 6px 0;
    font-family: var(--font-sans, 'Inter', sans-serif);
    font-weight: 700;
    line-height: 1.35;
    color: var(--chat-bold-color, #67d04e);
}

.azoogi-chat-bubble h2,
.azoogi-chat-bubble .azoogi-chat-h2 {
    font-size: 15px;
    color: var(--chat-text);
}

.azoogi-chat-bubble h3,
.azoogi-chat-bubble .azoogi-chat-h3 {
    font-size: 14px;
}

.azoogi-chat-bubble h4,
.azoogi-chat-bubble .azoogi-chat-h4 {
    font-size: 13.5px;
}

.azoogi-chat-bubble ul,
.azoogi-chat-bubble ol,
.azoogi-chat-bubble .azoogi-chat-list {
    margin: 6px 0 8px 0;
    padding-left: 20px;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.azoogi-chat-bubble ul:last-child,
.azoogi-chat-bubble ol:last-child,
.azoogi-chat-bubble .azoogi-chat-list:last-child {
    margin-bottom: 0;
}

.azoogi-chat-bubble li {
    line-height: 1.5;
    margin-bottom: 2px;
}

.azoogi-chat-bubble li::marker {
    color: var(--chat-bold-color, #67d04e);
    font-weight: 700;
}

.azoogi-chat-bubble a.azoogi-chat-link {
    color: var(--chat-accent);
    text-decoration: underline;
    text-underline-offset: 2px;
    font-weight: 500;
    cursor: pointer;
    word-break: break-word;
}

.azoogi-chat-bubble a.azoogi-chat-link:hover {
    color: var(--chat-accent-hover);
}

.azoogi-chat-bubble code.azoogi-chat-inline-code {
    background: rgba(255, 255, 255, 0.08);
    color: var(--chat-bold-color, #67d04e);
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 12px;
    font-family: monospace;
}

[data-theme="light"] .azoogi-chat-bubble code.azoogi-chat-inline-code {
    background: rgba(0, 0, 0, 0.06);
}

.azoogi-chat-bubble pre.azoogi-chat-codeblock {
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid var(--chat-border);
    border-radius: 8px;
    padding: 10px 12px;
    overflow-x: auto;
    margin: 8px 0;
    font-size: 12px;
}

.azoogi-chat-msg.is-user .azoogi-chat-bubble {
    background: var(--chat-bubble-user);
    border-bottom-right-radius: 4px;
    border: 1px solid var(--chat-border);
}

.azoogi-chat-msg.is-assistant .azoogi-chat-bubble {
    background: var(--chat-bubble-ai);
    border-bottom-left-radius: 4px;
    border: 1px solid var(--chat-border);
}

.azoogi-chat-msg-time {
    font-size: 10px;
    color: var(--chat-muted);
    margin-top: 4px;
    padding: 0 4px;
}

/* Product Cards Carousel in Chat - Exactly Matching Website .prod-card */
.azoogi-chat-products-carousel {
    display: flex;
    gap: 14px;
    overflow-x: auto;
    padding: 8px 2px 14px;
    width: 100%;
    margin-top: 10px;
    scrollbar-width: thin;
    scrollbar-color: var(--line, rgba(255, 255, 255, 0.15)) transparent;
    scroll-snap-type: x mandatory;
    box-sizing: border-box;
}

.azoogi-chat-products-carousel::-webkit-scrollbar {
    height: 4px;
}

.azoogi-chat-products-carousel::-webkit-scrollbar-thumb {
    background: var(--line, rgba(255, 255, 255, 0.2));
    border-radius: 4px;
}

.azoogi-chat-products-carousel .prod-card {
    flex: 0 0 190px;
    scroll-snap-align: start;
    position: relative;
    border: 1px solid var(--border-light, rgba(255, 255, 255, 0.08));
    background: var(--card-bg, rgba(255, 255, 255, 0.03));
    overflow: hidden;
    border-radius: 3px;
    transition: border-color .25s ease, transform .25s ease;
    cursor: pointer;
    min-width: 0;
    display: flex;
    flex-direction: column;
    text-align: left;
    box-sizing: border-box;
}

.azoogi-chat-products-carousel .prod-card:hover {
    border-color: var(--accent, #67d04e);
    transform: translateY(-2px);
}

.azoogi-chat-products-carousel .prod-card-img {
    position: relative;
    width: 100%;
    aspect-ratio: 1/1;
    overflow: hidden;
    background-color: var(--bg-2, #111111);
    display: flex;
    align-items: center;
    justify-content: center;
}

.azoogi-chat-products-carousel .prod-card .prod-card-img img,
.azoogi-chat-products-carousel .prod-swatch {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    background-color: var(--bg-2, #111111);
    transition: transform 1.2s ease;
    display: block;
}

.azoogi-chat-products-carousel .prod-card:hover .prod-card-img img,
.azoogi-chat-products-carousel .prod-card:hover .prod-swatch {
    transform: scale(1.08);
}

.azoogi-chat-products-carousel .prod-swatch.is-fallback {
    filter: grayscale(100%);
    opacity: 0.7;
}

.azoogi-chat-products-carousel .prod-card-title {
    padding: 12px 14px 14px;
    font-size: var(--fs-meta, 13px);
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 8px;
    line-height: 1.3;
    flex-grow: 1;
}

.azoogi-chat-products-carousel .prod-card-title-text {
    flex: 1;
    min-width: 0;
    white-space: pre-line;
    line-height: 1.3;
    color: var(--ink, #f3f3f3);
}

.azoogi-chat-products-carousel .prod-card-name {
    display: block;
    color: var(--ink, #f3f3f3);
    font-size: 13px;
    font-weight: 500;
}

.azoogi-chat-products-carousel .cat-label {
    display: block;
    font-size: var(--fs-caption, 11px);
    color: var(--accent, #67d04e);
    text-transform: uppercase;
    letter-spacing: .08em;
    margin-bottom: 4px;
    font-weight: 600;
}

.azoogi-chat-category-badge {
    position: absolute;
    left: 8px;
    bottom: 8px;
    z-index: 2;
    padding: 3px 7px;
    border-radius: 3px;
    background: rgba(11, 11, 11, 0.78);
    border: 1px solid rgba(255, 255, 255, 0.14);
    color: #f3f3f3;
    font-size: 10px;
    font-weight: 500;
    letter-spacing: 0.04em;
    backdrop-filter: blur(6px);
}

.azoogi-chat-category-desc {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-top: 4px;
    font-size: 11px;
    line-height: 1.35;
    color: var(--muted, #9a9a9a);
}

.azoogi-chat-category-arrow {
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: 1px solid var(--border-light, rgba(255, 255, 255, 0.14));
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--accent, #67d04e);
    font-size: 13px;
    transition: background-color .2s ease, color .2s ease, transform .2s ease;
}

.azoogi-chat-category-card:hover .azoogi-chat-category-arrow {
    background: var(--accent, #67d04e);
    color: #0b0b0b;
    transform: translateX(2px);
}

.azoogi-chat-products-carousel .add-quote-btn {
    background: var(--accent, #67d04e);
    border: 1px solid var(--line, rgba(255, 255, 255, 0.12));
    color: var(--pure-bg, #0b0b0b);
    width: 28px;
    height: 28px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all .2s;
    flex-shrink: 0;
    font-size: 16px;
    font-weight: 300;
    padding: 0;
    line-height: 1;
}

.azoogi-chat-products-carousel .add-quote-btn:hover {
    background: var(--card-bg, rgba(255, 255, 255, 0.06));
    color: var(--ink, #ffffff);
    border-color: var(--accent, #67d04e);
}

.azoogi-chat-products-carousel .add-quote-btn.added {
    background: var(--accent-2, #3aa028);
    color: #fff;
    border-color: var(--accent-2, #3aa028);
}

.azoogi-chat-btn-sm {
    appearance: none;
    -webkit-appearance: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 8px 14px;
    border-radius: 8px;
    font-family: inherit;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.25;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 1px solid transparent;
    white-space: nowrap;
}

.azoogi-chat-btn-primary {
    background: var(--chat-accent);
    border-color: var(--chat-accent);
    color: #0b0b0b;
    box-shadow: 0 2px 10px var(--chat-accent-glow);
}

[data-theme="light"] .azoogi-chat-btn-primary {
    color: #ffffff;
}

.azoogi-chat-btn-primary:hover {
    background: var(--chat-accent-hover);
    border-color: var(--chat-accent-hover);
    transform: translateY(-1px);
}

.azoogi-chat-btn-outline {
    background: var(--chat-card-bg);
    border: 1px solid var(--chat-border);
    color: var(--chat-text);
}

.azoogi-chat-btn-outline:hover {
    border-color: var(--chat-accent);
    color: var(--chat-accent);
    background: rgba(103, 208, 78, 0.08);
    transform: translateY(-1px);
}

/* Custom Datasheet Download Card */
.azoogi-chat-download-card {
    background: var(--chat-card-bg);
    border: 1px solid var(--chat-accent);
    border-radius: 12px;
    padding: 14px;
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 8px;
}

.azoogi-chat-download-icon {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background: rgba(103, 208, 78, 0.15);
    color: var(--chat-accent);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.azoogi-chat-download-meta {
    flex: 1;
}

.azoogi-chat-download-title {
    font-size: 13px;
    font-weight: 600;
    color: var(--chat-text);
}

.azoogi-chat-download-sub {
    font-size: 11px;
    color: var(--chat-muted);
}

/* Typing Indicator Animation */
.azoogi-chat-typing {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 10px 14px;
    background: var(--chat-bubble-ai);
    border: 1px solid var(--chat-border);
    border-radius: 16px;
    width: fit-content;
    align-self: flex-start;
}

.azoogi-chat-typing-dot {
    width: 6px;
    height: 6px;
    background: var(--chat-muted);
    border-radius: 50%;
    animation: chatTypingBounce 1.4s infinite ease-in-out both;
}

.azoogi-chat-typing-dot:nth-child(1) { animation-delay: -0.32s; }
.azoogi-chat-typing-dot:nth-child(2) { animation-delay: -0.16s; }

@keyframes chatTypingBounce {
    0%, 80%, 100% { transform: scale(0.6); opacity: 0.4; }
    40% { transform: scale(1.1); opacity: 1; background: var(--chat-accent); }
}

/* Chat Footer & Input with Green Accent Glow */
.azoogi-chat-footer {
    padding: 10px 18px 12px;
    background: var(--chat-header-bg);
    border-top: none;
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex-shrink: 0;
}

.azoogi-chat-input-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
}

.azoogi-chat-disclaimer {
    font-size: 9.5px;
    line-height: 1.3;
    color: var(--chat-muted);
    text-align: left;
    opacity: 0.65;
    letter-spacing: 0;
    user-select: none;
    padding: 0 8px;
}

.azoogi-chat-input-wrapper {
    flex: 1;
    position: relative;
    display: flex;
    align-items: center;
}

.azoogi-chat-input {
    width: 100%;
    height: 48px;
    background: var(--chat-input-bg);
    border: 2px solid var(--chat-accent);
    box-shadow: 0 0 0 1px var(--chat-accent), 0 0 16px var(--chat-accent-glow);
    border-radius: 9999px;
    padding: 0 20px;
    font-size: 14px;
    color: var(--chat-text);
    outline: none;
    font-family: inherit;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    box-sizing: border-box;
}

.azoogi-chat-input:focus {
    border-color: var(--chat-accent-hover);
    box-shadow: 0 0 0 2px var(--chat-accent), 0 0 22px var(--chat-accent-glow);
}

.azoogi-chat-input::placeholder {
    color: var(--chat-muted);
    opacity: 0.85;
}

.azoogi-chat-send-btn {
    width: 48px;
    height: 48px;
    min-width: 48px;
    border-radius: 50%;
    background: var(--chat-accent);
    color: #ffffff;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 14px var(--chat-accent-glow);
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    flex-shrink: 0;
}

.azoogi-chat-send-btn svg {
    color: #ffffff;
    stroke: #ffffff;
    transform: translate(1px, -1px);
}

.azoogi-chat-send-btn:hover:not(:disabled) {
    background: var(--chat-accent-hover);
    transform: scale(1.08);
    box-shadow: 0 6px 20px var(--chat-accent-glow);
}

.azoogi-chat-send-btn:active:not(:disabled) {
    transform: scale(0.96);
}

/* Pre-Chat Lead Intake Form */
.azoogi-chat-intake-card {
    background: var(--chat-card-bg);
    border: 1px solid var(--chat-card-border);
    border-radius: 14px;
    padding: 20px;
    margin: 8px 0;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    animation: chatMsgIn 0.3s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.azoogi-chat-intake-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--chat-accent);
    margin-bottom: 8px;
}

.azoogi-chat-intake-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--chat-text);
    margin: 0 0 6px 0;
    line-height: 1.3;
}

.azoogi-chat-intake-desc {
    font-size: 12.5px;
    color: var(--chat-muted);
    margin: 0 0 16px 0;
    line-height: 1.45;
}

.azoogi-chat-intake-field {
    margin-bottom: 12px;
}

.azoogi-chat-intake-field label {
    display: block;
    font-size: 11.5px;
    font-weight: 600;
    color: var(--chat-text);
    margin-bottom: 5px;
}

.azoogi-chat-intake-field label span.req {
    color: var(--chat-accent);
    margin-left: 2px;
}

.azoogi-chat-intake-input {
    width: 100%;
    box-sizing: border-box;
    padding: 10px 14px;
    font-size: 13px;
    background: var(--chat-bg);
    color: var(--chat-text);
    border: 1px solid var(--chat-border);
    border-radius: 8px;
    outline: none;
    transition: all 0.2s ease;
    font-family: inherit;
}

.azoogi-chat-intake-input:focus {
    border-color: var(--chat-accent);
    box-shadow: 0 0 0 2px var(--chat-accent-glow);
}

.azoogi-chat-intake-submit {
    width: 100%;
    padding: 11px 16px;
    background: var(--chat-accent);
    color: #0b0b0b;
    border: none;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 14px;
    transition: all 0.2s ease;
}

.azoogi-chat-intake-submit:hover:not(:disabled) {
    background: var(--chat-accent-hover);
    transform: translateY(-1px);
    box-shadow: 0 4px 14px var(--chat-accent-glow);
}

.azoogi-chat-intake-skip {
    display: block;
    text-align: center;
    margin-top: 12px;
    font-size: 11.5px;
    color: var(--chat-muted);
    background: none;
    border: none;
    cursor: pointer;
    text-decoration: underline;
    width: 100%;
    transition: color 0.2s;
}

.azoogi-chat-intake-skip:hover {
    color: var(--chat-text);
}

/* Custom In-Widget Pop-up Modals (Refresh Conversation & Report Issue) */
.azoogi-chat-modal-overlay {
    position: absolute;
    inset: 0;
    z-index: 60;
    background: rgba(8, 8, 10, 0.72);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.25s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

[data-theme="light"] .azoogi-chat-modal-overlay {
    background: rgba(15, 23, 42, 0.45);
}

.azoogi-chat-modal-overlay.is-open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.azoogi-chat-modal-card {
    width: 100%;
    max-width: 360px;
    background: var(--chat-header-bg);
    border: 1px solid var(--chat-border);
    border-radius: 18px;
    padding: 22px 20px;
    box-shadow: 0 24px 50px rgba(0, 0, 0, 0.55), 0 0 0 1px var(--chat-border);
    text-align: center;
    transform: translateY(10px) scale(0.96);
    transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    box-sizing: border-box;
}

[data-theme="light"] .azoogi-chat-modal-card {
    box-shadow: 0 20px 45px rgba(15, 23, 42, 0.18), 0 0 0 1px rgba(0, 0, 0, 0.08);
}

.azoogi-chat-modal-card.is-form {
    max-width: 400px;
    text-align: left;
}

.azoogi-chat-modal-overlay.is-open .azoogi-chat-modal-card {
    transform: translateY(0) scale(1);
}

.azoogi-chat-modal-icon {
    width: 46px;
    height: 46px;
    border-radius: 50%;
    background: rgba(103, 208, 78, 0.14);
    border: 1px solid rgba(103, 208, 78, 0.35);
    color: var(--chat-accent);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 12px;
    flex-shrink: 0;
}

.azoogi-chat-modal-icon.is-sm {
    width: 32px;
    height: 32px;
    margin-bottom: 0;
}

.azoogi-chat-modal-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 8px;
}

.azoogi-chat-modal-head-title {
    display: flex;
    align-items: center;
    gap: 10px;
}

.azoogi-chat-modal-close {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    border: none;
    background: transparent;
    color: var(--chat-muted);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.azoogi-chat-modal-close:hover {
    color: var(--chat-text);
    background: var(--chat-bubble-ai);
}

.azoogi-chat-modal-title {
    margin: 0 0 6px 0;
    font-size: 16px;
    font-weight: 700;
    color: var(--chat-text);
    line-height: 1.3;
}

.azoogi-chat-modal-head .azoogi-chat-modal-title {
    margin: 0;
}

.azoogi-chat-modal-desc {
    margin: 0 0 18px 0;
    font-size: 13px;
    line-height: 1.5;
    color: var(--chat-muted);
}

.azoogi-chat-modal-field-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 10px;
}

.azoogi-chat-modal-field {
    margin-bottom: 10px;
}

.azoogi-chat-modal-field-row .azoogi-chat-modal-field {
    margin-bottom: 0;
}

.azoogi-chat-modal-field label {
    display: block;
    font-size: 11.5px;
    font-weight: 600;
    color: var(--chat-text);
    margin-bottom: 5px;
}

.azoogi-chat-modal-field label span.req {
    color: var(--chat-accent);
    margin-left: 2px;
}

.azoogi-chat-modal-textarea {
    resize: vertical;
    min-height: 82px;
    max-height: 160px;
    line-height: 1.45;
}

.azoogi-chat-modal-feedback {
    padding: 9px 12px;
    border-radius: 8px;
    font-size: 12px;
    line-height: 1.4;
    margin-top: 8px;
}

.azoogi-chat-modal-feedback.is-success {
    background: rgba(16, 185, 129, 0.14);
    border: 1px solid rgba(16, 185, 129, 0.35);
    color: #10b981;
}

.azoogi-chat-modal-feedback.is-error {
    background: rgba(239, 68, 68, 0.14);
    border: 1px solid rgba(239, 68, 68, 0.35);
    color: #ef4444;
}

.azoogi-chat-modal-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.azoogi-chat-modal-btn {
    flex: 1;
    height: 40px;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: all 0.2s ease;
    font-family: inherit;
}

.azoogi-chat-modal-btn.is-cancel {
    background: var(--chat-card-bg);
    border: 1px solid var(--chat-border);
    color: var(--chat-text);
}

.azoogi-chat-modal-btn.is-cancel:hover {
    border-color: var(--chat-muted);
    background: var(--chat-bubble-ai);
}

.azoogi-chat-modal-btn.is-confirm {
    background: var(--chat-accent);
    border: 1px solid var(--chat-accent);
    color: #0b0b0b;
    box-shadow: 0 4px 14px var(--chat-accent-glow);
}

[data-theme="light"] .azoogi-chat-modal-btn.is-confirm {
    color: #ffffff;
}

.azoogi-chat-modal-btn.is-confirm:hover:not(:disabled) {
    background: var(--chat-accent-hover);
    border-color: var(--chat-accent-hover);
    transform: translateY(-1px);
}

.azoogi-chat-modal-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Mobile Responsiveness (<600px) */
@media (max-width: 600px) {
    .azoogi-chat-container {
        inset: 0;
        width: 100vw;
        height: 100vh;
        max-height: 100vh;
        border-radius: 0;
        bottom: 0;
        right: 0;
    }

    .azoogi-chat-launcher {
        bottom: 16px;
        right: 16px;
    }
}
