/* ==========================================================================
   Zyrix AI Chatbot — Modern Premium Design System
   Original dark obsidian UI (unchanged).
   Changes in this version:
     1. Typography: one compact, strict font scale (11/12/13/14/15px) and
        site-CSS isolation so response text is always consistent.
     2. Launcher: pulse animation no longer creates scrollable overflow
        (this was causing the scrollbar next to the floating button).
     3. Feedback bar: thumbs-up/down icons on bot messages, shown on hover
        (Teams-style). Voted state persists visually.
   ========================================================================== */

:root {
    /* Brand Gradients & Accents */
    --zyrix-primary:          #6366f1;
    --zyrix-primary-dark:     #4f46e5;
    --zyrix-primary-light:    #818cf8;
    --zyrix-accent:           #7c3aed;
    --zyrix-accent-cyan:      #06b6d4;

    --zyrix-grad:             linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
    --zyrix-grad-hover:       linear-gradient(135deg, #4338ca 0%, #6d28d9 100%);
    --zyrix-grad-header:      linear-gradient(135deg, #1e1b4b 0%, #2e1065 50%, #1e1b4b 100%);
    --zyrix-grad-glow:        radial-gradient(circle at 50% 0%, rgba(99, 102, 241, 0.25) 0%, transparent 70%);

    /* Obsidian Glass Surfaces */
    --zyrix-bg:               #0b0f19;
    --zyrix-surface:          #111827;
    --zyrix-surface-card:     #171f32;
    --zyrix-surface-input:    #0d1424;
    --zyrix-surface-bubble:   #161f33;

    /* Borders */
    --zyrix-border:           rgba(255, 255, 255, 0.08);
    --zyrix-border-hover:     rgba(255, 255, 255, 0.16);
    --zyrix-border-focus:     rgba(99, 102, 241, 0.55);

    /* Typography Tokens */
    --zyrix-font:             'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    --zyrix-font-mono:        ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, 'Liberation Mono', monospace;

    --zyrix-text-title:       #ffffff;
    --zyrix-text-body:        #e2e8f0;
    --zyrix-text-muted:       #94a3b8;
    --zyrix-text-subtle:      #64748b;

    /* Strict Font-Size Scale — the ONLY sizes used in the widget */
    --zyrix-fs-xs:            11px;   /* meta: footer, badge, status, table header */
    --zyrix-fs-sm:            12px;   /* chips, tables, code, launcher pill */
    --zyrix-fs-base:          13px;   /* ALL message text + input */
    --zyrix-fs-md:            14px;   /* header title, welcome title, response headings */
    --zyrix-fs-lg:            15px;   /* (reserved) */

    /* Line Heights */
    --zyrix-lh-tight:         1.3;
    --zyrix-lh-snug:          1.45;
    --zyrix-lh-base:          1.55;

    /* Message Bubbles */
    --zyrix-user-bg:          var(--zyrix-grad);
    --zyrix-user-text:        #ffffff;
    --zyrix-bot-bg:           var(--zyrix-surface-bubble);
    --zyrix-bot-text:         #e2e8f0;
    --zyrix-bot-border:       rgba(255, 255, 255, 0.09);

    /* Shadows & Depth */
    --zyrix-shadow-window:    0 24px 60px -12px rgba(0, 0, 0, 0.75), 0 0 0 1px rgba(255, 255, 255, 0.09);
    --zyrix-shadow-btn:       0 10px 30px -4px rgba(79, 70, 229, 0.55);
    --zyrix-shadow-bubble:    0 2px 10px rgba(0, 0, 0, 0.25);
}

/* ==========================================================================
   Root Container
   Text properties are reset here so the host site's CSS (wide letter-spacing,
   large line-heights, etc.) can't leak into the widget.
   ========================================================================== */

#zyrix-chatbot {
    position: fixed !important;
    right: 24px !important;
    bottom: 16px !important;
    top: auto !important;
    left: auto !important;

    width: fit-content !important;
    height: fit-content !important;
    min-width: 0 !important;
    min-height: 0 !important;

    overflow: visible !important;
    z-index: 999999 !important;

    font-family: var(--zyrix-font);
    font-size: var(--zyrix-fs-base);
    line-height: var(--zyrix-lh-base);
    font-weight: 400;
    font-style: normal;
    text-align: left;
    -webkit-font-smoothing: antialiased;
}

#zyrix-chatbot *,
#zyrix-chatbot *::before,
#zyrix-chatbot *::after {
    box-sizing: border-box;
    font-family: inherit;
    letter-spacing: normal;
    text-transform: none;
    hyphens: none !important;
    -webkit-hyphens: none !important;
    -ms-hyphens: none !important;
}

/* Never show scrollbars on the launcher or its container */
#zyrix-chatbot,
#zyrix-chatbot .zyrix-chat-button-wrap,
#zyrix-chatbot .zyrix-chat-button {
    scrollbar-width: none !important;
    -ms-overflow-style: none !important;
}

#zyrix-chatbot::-webkit-scrollbar,
#zyrix-chatbot .zyrix-chat-button-wrap::-webkit-scrollbar,
#zyrix-chatbot .zyrix-chat-button::-webkit-scrollbar,
#zyrix-chatbot .zyrix-chat-button-wrap > ::-webkit-scrollbar {
    display: none !important;
    width: 0 !important;
    height: 0 !important;
}

/* ==========================================================================
   Launcher Button (layout locked down to prevent scrollbars)
   ========================================================================== */

#zyrix-chatbot .zyrix-chat-button-wrap {
    display: inline-flex !important;
    position: relative !important;
    align-items: center !important;
    justify-content: center !important;
    width: fit-content !important;
    height: fit-content !important;
    overflow: visible !important;
}

#zyrix-chatbot .zyrix-chat-button {
    position: relative !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    flex: 0 0 50px !important;
    width: 50px !important;
    min-width: 50px !important;
    max-width: 50px !important;
    height: 50px !important;
    min-height: 50px !important;
    max-height: 50px !important;
    padding: 0 !important;
    margin: 0 !important;
    overflow: visible !important;
    border: none !important;
    border-radius: 50% !important;
    box-sizing: border-box !important;
}

/* Launcher visual styling (size/layout handled above) */
#zyrix-chatbot .zyrix-chat-button {
    background: var(--zyrix-grad);
    color: #ffffff;
    cursor: pointer;
    box-shadow: var(--zyrix-shadow-btn);
    transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1),
                box-shadow 0.25s ease,
                background 0.25s ease;
    outline: none;
    z-index: 2;
}

/*
 * Ambient pulse ring.
 * Uses an expanding box-shadow instead of transform: scale(). A scaled
 * element extends the parent's scrollable area and made the browser draw a
 * scrollbar next to the button; box-shadow never affects scrollable overflow.
 */
#zyrix-chatbot .zyrix-chat-button::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 50%;
    pointer-events: none;
    z-index: -1;
    animation: zyrixButtonPulse 2.8s ease-out infinite;
}

@keyframes zyrixButtonPulse {
    0%   { box-shadow: 0 0 0 0 rgba(99, 102, 241, 0.55); }
    70%  { box-shadow: 0 0 0 16px rgba(99, 102, 241, 0); }
    100% { box-shadow: 0 0 0 0 rgba(99, 102, 241, 0); }
}

#zyrix-chatbot .zyrix-chat-button:hover {
    transform: scale(1.08) translateY(-2px);
    box-shadow: 0 14px 36px -4px rgba(79, 70, 229, 0.7);
}

#zyrix-chatbot .zyrix-chat-button:active {
    transform: scale(0.96);
}

#zyrix-chatbot .zyrix-chat-button svg {
    width: 22px;
    height: 22px;
    position: relative;
    z-index: 1;
    transition: transform 0.25s ease, opacity 0.2s ease;
}

/* Launcher tooltip pill */
#zyrix-chatbot .zyrix-launcher-pill {
    position: absolute;
    right: 62px;
    background: var(--zyrix-surface);
    color: var(--zyrix-text-title);
    border: 1px solid var(--zyrix-border);
    padding: 7px 14px;
    border-radius: 20px;
    font-size: var(--zyrix-fs-sm);
    font-weight: 500;
    line-height: var(--zyrix-lh-tight);
    white-space: nowrap;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.35);
    opacity: 0;
    transform: translateX(8px);
    pointer-events: none;
    transition: opacity 0.25s ease, transform 0.25s ease;
    display: flex;
    align-items: center;
    gap: 6px;
}

#zyrix-chatbot .zyrix-launcher-pill span {
    font-size: var(--zyrix-fs-base);
}

#zyrix-chatbot .zyrix-chat-button-wrap:hover .zyrix-launcher-pill {
    opacity: 1;
    transform: translateX(0);
}

/* ==========================================================================
   Chat Window (Glassmorphic Obsidian)
   ========================================================================== */

#zyrix-chatbot .zyrix-chat-window {
    position: absolute;
    right: 0;
    bottom: 66px;
    width: 400px;
    height: 620px;
    max-height: calc(100vh - 120px);
    background: var(--zyrix-bg);
    border: 1px solid var(--zyrix-border);
    border-radius: 24px;
    box-shadow: var(--zyrix-shadow-window);
    display: none;
    flex-direction: column;
    overflow: hidden;
    transform-origin: bottom right;
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    z-index: 10;
}

#zyrix-chatbot .zyrix-chat-window.open {
    display: flex;
    animation: zyrixWindowSlideIn 0.32s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes zyrixWindowSlideIn {
    from {
        opacity: 0;
        transform: scale(0.94) translateY(14px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

/* ==========================================================================
   Header
   ========================================================================== */

#zyrix-chatbot .zyrix-chat-header {
    padding: 16px 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--zyrix-grad-header);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    position: relative;
    overflow: hidden;
    flex-shrink: 0;
}

#zyrix-chatbot .zyrix-chat-header::before {
    content: '';
    position: absolute;
    top: -50%;
    left: 20%;
    width: 140px;
    height: 140px;
    background: var(--zyrix-primary);
    filter: blur(45px);
    opacity: 0.35;
    pointer-events: none;
}

#zyrix-chatbot .zyrix-chat-header-left {
    display: flex;
    align-items: center;
    gap: 12px;
    position: relative;
    z-index: 1;
}

#zyrix-chatbot .zyrix-bot-avatar {
    width: 44px;
    height: 44px;
    border-radius: 14px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.16) 0%, rgba(255, 255, 255, 0.06) 100%);
    border: 1px solid rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    flex-shrink: 0;
}

#zyrix-chatbot .zyrix-bot-avatar svg {
    width: 24px;
    height: 24px;
    color: #ffffff;
}

#zyrix-chatbot .zyrix-avatar-status {
    position: absolute;
    bottom: -2px;
    right: -2px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #10b981;
    border: 2.5px solid #141b2e;
}

#zyrix-chatbot .zyrix-header-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

#zyrix-chatbot .zyrix-header-title-row {
    display: flex;
    align-items: center;
    gap: 6px;
}

#zyrix-chatbot .zyrix-header-title {
    font-size: var(--zyrix-fs-md);
    font-weight: 700;
    color: var(--zyrix-text-title);
    letter-spacing: -0.015em;
    line-height: var(--zyrix-lh-tight);
}

#zyrix-chatbot .zyrix-header-badge {
    font-size: var(--zyrix-fs-xs);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    line-height: var(--zyrix-lh-tight);
    background: rgba(99, 102, 241, 0.25);
    color: #c7d2fe;
    border: 1px solid rgba(99, 102, 241, 0.35);
    padding: 2px 6px;
    border-radius: 6px;
}

#zyrix-chatbot .zyrix-header-status {
    display: flex;
    align-items: center;
    gap: 6px;
}

#zyrix-chatbot .zyrix-status-dot {
    width: 6.5px;
    height: 6.5px;
    border-radius: 50%;
    background: #10b981;
    box-shadow: 0 0 8px #10b981;
    animation: zyrixPulseDot 2s ease-in-out infinite;
}

@keyframes zyrixPulseDot {
    0%, 100% { opacity: 1; transform: scale(1); }
    50%      { opacity: 0.5; transform: scale(0.85); }
}

#zyrix-chatbot .zyrix-status-text {
    font-size: var(--zyrix-fs-xs);
    line-height: var(--zyrix-lh-tight);
    color: rgba(255, 255, 255, 0.7);
    font-weight: 500;
}

#zyrix-chatbot .zyrix-header-actions {
    display: flex;
    align-items: center;
    gap: 6px;
    position: relative;
    z-index: 1;
}

#zyrix-chatbot .zyrix-header-button {
    width: 34px;
    height: 34px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.08);
    color: #ffffff;
    border-radius: 10px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.18s ease, transform 0.15s ease, border-color 0.18s ease;
    outline: none;
    padding: 0;
}

#zyrix-chatbot .zyrix-header-button svg {
    width: 16px;
    height: 16px;
}

#zyrix-chatbot .zyrix-header-button:hover {
    background: rgba(255, 255, 255, 0.18);
    border-color: rgba(255, 255, 255, 0.2);
    transform: scale(1.05);
}

#zyrix-chatbot .zyrix-header-button:active {
    transform: scale(0.95);
}

/* ==========================================================================
   Messages Body Container
   ========================================================================== */

#zyrix-chatbot .zyrix-messages {
    flex: 1;
    padding: 18px 16px 14px;
    overflow-y: auto;
    background: var(--zyrix-bg);
    display: flex;
    flex-direction: column;
    gap: 12px;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.14) transparent;
}

#zyrix-chatbot .zyrix-messages::-webkit-scrollbar {
    width: 5px;
}

#zyrix-chatbot .zyrix-messages::-webkit-scrollbar-track {
    background: transparent;
}

#zyrix-chatbot .zyrix-messages::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.14);
    border-radius: 10px;
}

#zyrix-chatbot .zyrix-messages::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.25);
}

#zyrix-chatbot .zyrix-divider {
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 4px 0 8px;
}

#zyrix-chatbot .zyrix-divider span {
    font-size: var(--zyrix-fs-xs);
    line-height: var(--zyrix-lh-tight);
    font-weight: 600;
    color: var(--zyrix-text-subtle);
    letter-spacing: 0.06em;
    text-transform: uppercase;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.06);
    padding: 3px 12px;
    border-radius: 12px;
}

/* ==========================================================================
   Welcome Hero & Starter Chips
   ========================================================================== */

#zyrix-chatbot .zyrix-welcome-card {
    background: var(--zyrix-surface);
    border: 1px solid var(--zyrix-border);
    border-radius: 18px;
    padding: 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    margin-bottom: 8px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
    position: relative;
    overflow: hidden;
}

#zyrix-chatbot .zyrix-welcome-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(99, 102, 241, 0.6), transparent);
}

#zyrix-chatbot .zyrix-welcome-badge {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: var(--zyrix-grad);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 10px;
    box-shadow: 0 4px 14px rgba(79, 70, 229, 0.45);
}

#zyrix-chatbot .zyrix-welcome-badge svg {
    width: 24px;
    height: 24px;
    color: #ffffff;
}

#zyrix-chatbot .zyrix-welcome-title {
    font-size: var(--zyrix-fs-md);
    font-weight: 700;
    line-height: var(--zyrix-lh-tight);
    color: var(--zyrix-text-title);
    margin-bottom: 4px;
    letter-spacing: -0.01em;
}

#zyrix-chatbot .zyrix-welcome-desc {
    font-size: var(--zyrix-fs-sm);
    color: var(--zyrix-text-muted);
    line-height: var(--zyrix-lh-snug);
    margin-bottom: 14px;
    max-width: 290px;
}

#zyrix-chatbot .zyrix-starter-chips {
    display: flex;
    flex-direction: column;
    gap: 4px;
    width: 100%;
}

#zyrix-chatbot .zyrix-chip {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px 12px;
    border-radius: 10px;
    background: transparent;
    border: 1px solid transparent;
    color: var(--zyrix-text-title);
    font-size: var(--zyrix-fs-base);
    font-weight: 600;
    line-height: var(--zyrix-lh-snug);
    font-family: inherit;
    text-align: center;
    cursor: pointer;
    transition: background 0.18s ease, border-color 0.18s ease, color 0.18s ease;
    gap: 8px;
}

#zyrix-chatbot .zyrix-chip:hover {
    background: rgba(99, 102, 241, 0.14);
    border-color: rgba(99, 102, 241, 0.35);
    color: #ffffff;
}

/* ==========================================================================
   Message Bubbles & Avatar
   ========================================================================== */

#zyrix-chatbot .zyrix-message {
    display: flex;
    align-items: flex-end;
    animation: zyrixMessageFadeUp 0.25s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

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

#zyrix-chatbot .zyrix-message.user {
    justify-content: flex-end;
}

#zyrix-chatbot .zyrix-message.bot {
    justify-content: flex-start;
    gap: 8px;
}

#zyrix-chatbot .zyrix-message-avatar {
    width: 30px;
    height: 30px;
    border-radius: 10px;
    background: var(--zyrix-surface-card);
    border: 1px solid var(--zyrix-border);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    align-self: flex-end;
    margin-bottom: 2px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}

#zyrix-chatbot .zyrix-message-avatar svg {
    width: 17px;
    height: 17px;
    color: var(--zyrix-primary-light);
}

/* Bot message: [name + time] above the bubble */
#zyrix-chatbot .zyrix-message-body {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    max-width: 88%;
    min-width: 0;
}

#zyrix-chatbot .zyrix-message-meta {
    display: flex;
    align-items: baseline;
    gap: 6px;
    padding-left: 2px;
    font-size: var(--zyrix-fs-xs);
    line-height: var(--zyrix-lh-tight);
    color: var(--zyrix-text-subtle);
}

#zyrix-chatbot .zyrix-message-name {
    font-weight: 600;
    color: var(--zyrix-text-muted);
}

#zyrix-chatbot .zyrix-message-time {
    font-weight: 400;
}

/* Message content: ONE size (13px) and ONE line-height for all text */
#zyrix-chatbot .zyrix-message-content {
    font-size: var(--zyrix-fs-base);
    line-height: var(--zyrix-lh-base);
    letter-spacing: -0.005em;
    padding: 11px 15px;
    border-radius: 18px;
    word-break: normal;
    overflow-wrap: break-word;
    font-weight: 400;
}

/* Every descendant inherits it, so site CSS (p, li, strong, span...) can't change it */
#zyrix-chatbot .zyrix-message-content * {
    font-size: inherit;
    line-height: inherit;
}

#zyrix-chatbot .zyrix-message.user .zyrix-message-content {
    max-width: 82%;
    background: var(--zyrix-user-bg);
    color: var(--zyrix-user-text);
    border-bottom-right-radius: 4px;
    box-shadow: var(--zyrix-shadow-bubble), 0 4px 14px rgba(79, 70, 229, 0.35);
    white-space: pre-wrap;
}

#zyrix-chatbot .zyrix-message.bot .zyrix-message-content {
    position: relative;
    max-width: 100%;
    background: var(--zyrix-bot-bg);
    color: var(--zyrix-bot-text);
    border-bottom-left-radius: 4px;
    border: 1px solid var(--zyrix-bot-border);
    box-shadow: var(--zyrix-shadow-bubble);
    white-space: normal;
}

/* ==========================================================================
   Typography & Spacing Hierarchy (inside bot responses)
   ========================================================================== */

#zyrix-chatbot .zyrix-message-content .zyrix-md-p {
    color: var(--zyrix-bot-text);
    margin: 0 0 10px 0;
    padding: 0;
}

#zyrix-chatbot .zyrix-message-content .zyrix-md-p:last-child {
    margin-bottom: 0;
}

/* Headings: only TWO sizes — 14px (h1-h3) and 13px (h4-h6). Never larger. */
#zyrix-chatbot .zyrix-message-content .zyrix-md-h {
    font-family: inherit;
    font-weight: 600;
    color: var(--zyrix-text-title);
    letter-spacing: -0.01em;
    line-height: var(--zyrix-lh-snug);
    text-transform: none;
    margin: 14px 0 6px 0;
    padding: 0;
    border: 0;
}

#zyrix-chatbot .zyrix-message-content .zyrix-md-h:first-child {
    margin-top: 0;
}

#zyrix-chatbot .zyrix-message-content .zyrix-md-h1,
#zyrix-chatbot .zyrix-message-content .zyrix-md-h2,
#zyrix-chatbot .zyrix-message-content .zyrix-md-h3 {
    font-size: var(--zyrix-fs-md);
}

#zyrix-chatbot .zyrix-message-content .zyrix-md-h1,
#zyrix-chatbot .zyrix-message-content .zyrix-md-h2 {
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    padding-bottom: 4px;
}

#zyrix-chatbot .zyrix-message-content .zyrix-md-h4,
#zyrix-chatbot .zyrix-message-content .zyrix-md-h5,
#zyrix-chatbot .zyrix-message-content .zyrix-md-h6 {
    font-size: var(--zyrix-fs-base);
    color: #e2e8f0;
}

/* Lists */
#zyrix-chatbot .zyrix-message-content .zyrix-md-ul,
#zyrix-chatbot .zyrix-message-content .zyrix-md-ol {
    color: var(--zyrix-bot-text);
    margin: 6px 0 10px 0;
    padding-left: 20px;
}

/* Lists are always numbered. Numbers are real text (.zyrix-li-num), not list markers */
#zyrix-chatbot .zyrix-message-content .zyrix-md-ol {
    list-style: none;
    padding-left: 0;
}

#zyrix-chatbot .zyrix-message-content .zyrix-md-ol li {
    display: flex;
    align-items: flex-start;
    gap: 2px;
    list-style: none;
}

#zyrix-chatbot .zyrix-message-content .zyrix-li-num {
    flex: 0 0 auto;
    min-width: 1.15em;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    color: var(--zyrix-primary-light);
}

#zyrix-chatbot .zyrix-message-content .zyrix-li-body {
    flex: 1 1 auto;
    min-width: 0;
}

/* Inline Code */
#zyrix-chatbot .zyrix-message-content code,
#zyrix-chatbot .zyrix-message-content .zyrix-inline-code {
    font-family: var(--zyrix-font-mono);
    font-size: var(--zyrix-fs-sm);
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 4px;
    padding: 2px 5px;
    color: #a5b4fc;
}

/* Multi-line Code Block */
#zyrix-chatbot .zyrix-message-content .zyrix-md-pre {
    margin: 10px 0;
    background: #090d16;
    border: 1px solid var(--zyrix-border);
    border-radius: 10px;
    padding: 10px 12px;
    overflow-x: auto;
    font-family: var(--zyrix-font-mono);
    font-size: var(--zyrix-fs-sm);
    line-height: 1.5;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.1) transparent;
}

#zyrix-chatbot .zyrix-message-content .zyrix-md-pre code {
    background: transparent;
    border: none;
    padding: 0;
    color: #cbd5e1;
    font-size: inherit;
}

/* Blockquotes */
#zyrix-chatbot .zyrix-message-content .zyrix-md-blockquote {
    margin: 8px 0 10px 0;
    padding: 4px 0 4px 12px;
    border-left: 3px solid var(--zyrix-primary);
    background: rgba(99, 102, 241, 0.06);
    border-radius: 0 6px 6px 0;
    color: var(--zyrix-text-muted);
}

#zyrix-chatbot .zyrix-message-content .zyrix-md-blockquote .zyrix-md-p {
    margin: 0;
}

/* Tables */
#zyrix-chatbot .zyrix-table-wrap {
    width: 100%;
    overflow-x: auto;
    margin: 10px 0;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(0, 0, 0, 0.2);
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.15) transparent;
}

#zyrix-chatbot .zyrix-message-content .zyrix-md-table {
    width: 100%;
    border-collapse: collapse;
    font-size: var(--zyrix-fs-sm);
    line-height: var(--zyrix-lh-snug);
    text-align: left;
}

#zyrix-chatbot .zyrix-message-content .zyrix-md-table thead {
    background: rgba(99, 102, 241, 0.18);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

#zyrix-chatbot .zyrix-message-content .zyrix-md-table th {
    padding: 8px 12px;
    font-size: var(--zyrix-fs-xs);
    font-weight: 600;
    color: #ffffff;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

#zyrix-chatbot .zyrix-message-content .zyrix-md-table td {
    padding: 8px 12px;
    font-size: var(--zyrix-fs-sm);
    color: var(--zyrix-bot-text);
    vertical-align: top;
}

#zyrix-chatbot .zyrix-message-content .zyrix-md-table th,
#zyrix-chatbot .zyrix-message-content .zyrix-md-table td {
    border-right: 1px solid rgba(255, 255, 255, 0.06);
}

#zyrix-chatbot .zyrix-message-content .zyrix-md-table th:last-child,
#zyrix-chatbot .zyrix-message-content .zyrix-md-table td:last-child {
    border-right: none;
}

#zyrix-chatbot .zyrix-message-content .zyrix-md-table tbody tr {
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    transition: background 0.15s ease;
}

#zyrix-chatbot .zyrix-message-content .zyrix-md-table tbody tr:hover {
    background: rgba(255, 255, 255, 0.04);
}

/* Links */
#zyrix-chatbot .zyrix-message-content .zyrix-link {
    color: var(--zyrix-primary-light);
    text-decoration: underline;
    text-underline-offset: 3px;
    font-weight: 500;
    transition: color 0.15s ease, opacity 0.15s ease;
    word-break: normal;
    overflow-wrap: break-word;
    cursor: pointer;
}

#zyrix-chatbot .zyrix-message-content .zyrix-link:hover {
    color: #c7d2fe;
}

#zyrix-chatbot .zyrix-message.user .zyrix-message-content .zyrix-link {
    color: #ffffff;
    font-weight: 600;
}

#zyrix-chatbot .zyrix-message.user .zyrix-message-content .zyrix-link:hover {
    color: #e0e7ff;
}

/* Strong / Em */
#zyrix-chatbot .zyrix-message-content strong {
    font-weight: 600;
    color: #ffffff;
}

#zyrix-chatbot .zyrix-message-content em {
    font-style: italic;
    color: #cbd5e1;
}

/* ==========================================================================
   Typing Indicator
   ========================================================================== */

#zyrix-chatbot .zyrix-typing {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 5px 3px;
}

#zyrix-chatbot .zyrix-typing span {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--zyrix-primary-light);
    opacity: 0.35;
    animation: zyrixBounce 1.35s ease-in-out infinite;
}

#zyrix-chatbot .zyrix-typing span:nth-child(2) { animation-delay: 0.16s; }
#zyrix-chatbot .zyrix-typing span:nth-child(3) { animation-delay: 0.32s; }

@keyframes zyrixBounce {
    0%, 60%, 100% {
        opacity: 0.35;
        transform: translateY(0);
    }
    30% {
        opacity: 1;
        transform: translateY(-5px);
    }
}

/* ==========================================================================
   Message Feedback Bar (thumbs up / down — Teams style, bottom-right on message)
   ========================================================================== */

/* Floating pill anchored to the bottom-right corner ON TOP of the bot message */
#zyrix-chatbot .zyrix-feedback-bar {
    position: absolute;
    right: 8px;
    bottom: 6px;
    z-index: 5;
    display: inline-flex;
    align-items: center;
    gap: 2px;
    padding: 2px 4px;
    border-radius: 14px;
    background: var(--zyrix-surface-card);
    border: 1px solid rgba(255, 255, 255, 0.14);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.45);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    opacity: 0;
    transform: translateY(2px) scale(0.95);
    transition: opacity 0.18s cubic-bezier(0.16, 1, 0.3, 1),
                transform 0.18s cubic-bezier(0.16, 1, 0.3, 1);
    pointer-events: none;
}

/* Reveal when hovering anywhere over the bot message */
#zyrix-chatbot .zyrix-message.bot:hover .zyrix-feedback-bar {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: auto;
}

/* Keep visible once a vote has been cast */
#zyrix-chatbot .zyrix-feedback-bar.zyrix-feedback-voted {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: auto;
}

/* Individual feedback button */
#zyrix-chatbot .zyrix-feedback-btn {
    width: 24px;
    height: 24px;
    padding: 0;
    margin: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: none;
    border-radius: 6px;
    background: transparent;
    color: var(--zyrix-text-subtle);
    cursor: pointer;
    outline: none;
    transition: background 0.15s ease, color 0.15s ease, transform 0.12s ease;
}

#zyrix-chatbot .zyrix-feedback-btn svg {
    width: 14px;
    height: 14px;
}

#zyrix-chatbot .zyrix-feedback-btn:hover {
    background: rgba(255, 255, 255, 0.14);
    color: #ffffff;
    transform: scale(1.12);
}

#zyrix-chatbot .zyrix-feedback-btn:active {
    transform: scale(0.92);
}

/* Selected state: highlighted in brand color */
#zyrix-chatbot .zyrix-feedback-btn.zyrix-feedback-selected {
    color: var(--zyrix-primary-light);
    background: rgba(99, 102, 241, 0.22);
}

/* Dimmed state: other button after voting (interactive so user can switch or remove) */
#zyrix-chatbot .zyrix-feedback-btn.zyrix-feedback-dimmed {
    opacity: 0.4;
    cursor: pointer;
}

#zyrix-chatbot .zyrix-feedback-btn.zyrix-feedback-dimmed:hover {
    opacity: 0.9;
    background: rgba(255, 255, 255, 0.12);
}

/* ==========================================================================
   Input Area
   ========================================================================== */

#zyrix-chatbot .zyrix-input-wrapper {
    background: var(--zyrix-surface);
    border-top: 1px solid var(--zyrix-border);
    padding: 12px 16px 10px;
    flex-shrink: 0;
}

/* Wrapper lets the privacy notice float over the bottom of the message area */
#zyrix-chatbot .zyrix-messages-wrap {
    position: relative;
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
}

#zyrix-chatbot .zyrix-messages-wrap > .zyrix-messages {
    min-height: 0;
}

/* Privacy notice: opaque, fixed at the bottom of the message area; messages scroll underneath it; takes no layout space */
#zyrix-chatbot .zyrix-privacy {
    position: absolute;
    left: 12px;
    right: 12px;
    bottom: 10px;
    z-index: 5;
    padding: 9px 30px 9px 12px;
    border-radius: 10px;
    background: #111827; /* fully opaque: messages scrolling behind are never visible */
    border: 1px solid var(--zyrix-border);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.35);
    font-size: var(--zyrix-fs-xs);
    line-height: var(--zyrix-lh-snug);
    color: var(--zyrix-text-muted);
}

#zyrix-chatbot .zyrix-privacy a {
    color: var(--zyrix-primary-light);
    text-decoration: underline;
    text-underline-offset: 2px;
}

#zyrix-chatbot .zyrix-privacy a:hover {
    color: #c7d2fe;
}

#zyrix-chatbot .zyrix-privacy-close {
    position: absolute;
    top: 6px;
    right: 6px;
    width: 20px;
    height: 20px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    border-radius: 6px;
    background: transparent;
    color: var(--zyrix-text-subtle);
    cursor: pointer;
    outline: none;
    transition: background 0.15s ease, color 0.15s ease;
}

#zyrix-chatbot .zyrix-privacy-close svg {
    width: 11px;
    height: 11px;
}

#zyrix-chatbot .zyrix-privacy-close:hover {
    background: rgba(255, 255, 255, 0.12);
    color: #ffffff;
}

#zyrix-chatbot .zyrix-input-area {
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--zyrix-surface-input);
    border: 1px solid var(--zyrix-border);
    border-radius: 16px;
    padding: 4px 6px 4px 14px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

#zyrix-chatbot .zyrix-input-area:focus-within {
    border-color: var(--zyrix-border-focus);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.18);
}

#zyrix-chatbot .zyrix-input {
    flex: 1;
    min-width: 0;
    border: none;
    background: transparent;
    color: var(--zyrix-text-title);
    outline: none;
    font-size: var(--zyrix-fs-base);
    font-family: inherit;
    line-height: var(--zyrix-lh-base);
    padding: 8px 0;
    box-shadow: none;
}

#zyrix-chatbot .zyrix-input::placeholder {
    color: var(--zyrix-text-subtle);
    font-size: var(--zyrix-fs-base);
}

#zyrix-chatbot .zyrix-send-button {
    width: 38px;
    height: 38px;
    flex-shrink: 0;
    border: none;
    border-radius: 12px;
    background: var(--zyrix-grad);
    color: #ffffff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1),
                box-shadow 0.2s ease,
                opacity 0.2s ease;
    box-shadow: 0 2px 10px rgba(79, 70, 229, 0.45);
    outline: none;
}

#zyrix-chatbot .zyrix-send-button svg {
    width: 17px;
    height: 17px;
    margin-left: 1px;
    transition: transform 0.15s ease;
}

#zyrix-chatbot .zyrix-send-button:hover:not(:disabled) {
    transform: scale(1.08);
    box-shadow: 0 4px 16px rgba(79, 70, 229, 0.6);
}

#zyrix-chatbot .zyrix-send-button:hover:not(:disabled) svg {
    transform: translate(1px, -1px);
}

#zyrix-chatbot .zyrix-send-button:active:not(:disabled) {
    transform: scale(0.95);
}

#zyrix-chatbot .zyrix-send-button:disabled {
    opacity: 0.35;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

#zyrix-chatbot .zyrix-footer-brand {
    text-align: center;
    font-size: var(--zyrix-fs-xs);
    line-height: var(--zyrix-lh-tight);
    color: var(--zyrix-text-subtle);
    margin-top: 6px;
    letter-spacing: 0.02em;
}

#zyrix-chatbot .zyrix-footer-brand strong {
    color: var(--zyrix-text-muted);
    font-weight: 600;
}

/* ==========================================================================
   Mobile Responsive Styles (single consolidated block)
   ========================================================================== */

@media (max-width: 600px) {
    #zyrix-chatbot {
        right: 14px !important;
        bottom: 10px !important;
    }

    #zyrix-chatbot .zyrix-chat-button {
        flex-basis: 46px !important;
        width: 46px !important;
        min-width: 46px !important;
        max-width: 46px !important;
        height: 46px !important;
        min-height: 46px !important;
        max-height: 46px !important;
    }

    #zyrix-chatbot .zyrix-chat-button svg {
        width: 20px;
        height: 20px;
    }

    #zyrix-chatbot .zyrix-chat-window {
        position: fixed;
        right: 8px;
        left: 8px;
        bottom: 70px;
        top: auto;
        width: auto;
        height: calc(100vh - 86px);
        height: calc(100dvh - 86px);
        max-height: none;
        border-radius: 20px;
    }

    #zyrix-chatbot .zyrix-launcher-pill {
        display: none;
    }

    #zyrix-chatbot .zyrix-message-content {
        max-width: 90%;
    }

    /* iOS Safari zooms the page when an input with font-size < 16px is focused */
    #zyrix-chatbot .zyrix-input {
        font-size: 16px;
    }
}