/* ============================================================
 * chatbot.css — ARM Investments AI Assistant
 * ------------------------------------------------------------
 * Brand-aligned chatbot widget:
 *   - Navy (#0d1b2a) header with gold (#b8942a) accents
 *   - Cormorant Garamond for title (matches site brand)
 *   - DM Sans for body / messages
 *   - White message canvas, refined shadow, subtle motion
 *   - Quick-reply chips, typing indicator, gold send button
 *   - Fully responsive: floating card on desktop, full-screen
 *     bottom sheet on mobile, RTL-aware for Arabic / Urdu
 * ============================================================ */

:root {
    --cb-navy:        #0d1b2a;
    --cb-navy-dark:   #07111c;
    --cb-navy-soft:   #1a2b3e;
    --cb-gold:        #b8942a;
    --cb-gold-light:  #e8c45c;
    --cb-gold-soft:   #fef9e7;
    --cb-white:       #ffffff;
    --cb-bg:          #f8f9fb;
    --cb-bot-bg:      #f1f3f6;
    --cb-bot-border:  #e5e7eb;
    --cb-text:        #1f2937;
    --cb-text-soft:   #6b7280;
    --cb-border:      #e5e7eb;
    --cb-shadow-lg:   0 24px 56px rgba(7, 17, 28, 0.22), 0 4px 16px rgba(7, 17, 28, 0.10);
    --cb-shadow-md:   0 8px 24px rgba(7, 17, 28, 0.18);
    --cb-radius:      18px;
    --cb-radius-msg:  16px;
    --cb-radius-chip: 999px;
    --cb-z:           99998;
}

/* ──────────────────────────────────────────────────────────
 * 1. Floating launcher button (bottom-right; flipped in RTL)
 * ────────────────────────────────────────────────────────── */
.armcb-launcher {
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--cb-navy) 0%, var(--cb-navy-soft) 100%);
    color: var(--cb-white);
    border: none;
    cursor: pointer;
    z-index: var(--cb-z);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--cb-shadow-md);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    font-family: 'DM Sans', system-ui, sans-serif;
}
.armcb-launcher::before {
    /* Soft gold halo */
    content: '';
    position: absolute;
    inset: -4px;
    border-radius: 50%;
    border: 2px solid var(--cb-gold);
    opacity: 0;
    transition: opacity 0.25s ease;
}
.armcb-launcher:hover {
    transform: translateY(-3px) scale(1.03);
    box-shadow: var(--cb-shadow-lg);
}
.armcb-launcher:hover::before { opacity: 0.6; }
.armcb-launcher i { font-size: 26px; line-height: 1; }
.armcb-launcher .armcb-launcher-close { display: none; }
.armcb-launcher.is-open .armcb-launcher-open  { display: none; }
.armcb-launcher.is-open .armcb-launcher-close { display: inline-block; }

/* Pulse ring — runs only the first ~12s to attract attention without being annoying */
.armcb-launcher::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 50%;
    box-shadow: 0 0 0 0 rgba(184, 148, 42, 0.6);
    animation: armcb-pulse 2.4s ease-out 4;
    pointer-events: none;
}
@keyframes armcb-pulse {
    0%   { box-shadow: 0 0 0 0   rgba(184, 148, 42, 0.55); }
    70%  { box-shadow: 0 0 0 18px rgba(184, 148, 42, 0); }
    100% { box-shadow: 0 0 0 0   rgba(184, 148, 42, 0); }
}

/* Unread badge */
.armcb-launcher-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    border-radius: 999px;
    background: var(--cb-gold);
    color: var(--cb-navy);
    font-size: 11px;
    font-weight: 700;
    display: none;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 6px rgba(0,0,0,0.18);
    font-family: 'DM Sans', sans-serif;
}
.armcb-launcher-badge.is-visible { display: flex; }

/* RTL flip */
html[dir="rtl"] .armcb-launcher { right: auto; left: 24px; }

/* ──────────────────────────────────────────────────────────
 * 2. Chat window (popup card)
 * ────────────────────────────────────────────────────────── */
.armcb-window {
    position: fixed;
    bottom: 100px;
    right: 24px;
    width: 400px;
    max-width: calc(100vw - 32px);
    height: 620px;
    max-height: calc(100vh - 130px);
    background: var(--cb-white);
    border-radius: var(--cb-radius);
    overflow: hidden;
    display: none;
    flex-direction: column;
    box-shadow: var(--cb-shadow-lg);
    z-index: var(--cb-z);
    font-family: 'DM Sans', system-ui, -apple-system, sans-serif;
    color: var(--cb-text);
    transform-origin: bottom right;
    animation: armcb-window-in 0.32s cubic-bezier(0.16, 1, 0.3, 1);
}
.armcb-window.is-open { display: flex; }
@keyframes armcb-window-in {
    from { opacity: 0; transform: translateY(20px) scale(0.96); }
    to   { opacity: 1; transform: translateY(0)    scale(1); }
}
html[dir="rtl"] .armcb-window { right: auto; left: 24px; transform-origin: bottom left; }

/* ──────────────────────────────────────────────────────────
 * 3. Header
 * ────────────────────────────────────────────────────────── */
.armcb-header {
    background: linear-gradient(135deg, var(--cb-navy) 0%, var(--cb-navy-soft) 100%);
    color: var(--cb-white);
    padding: 18px 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    position: relative;
    overflow: hidden;
}
.armcb-header::after {
    /* Subtle gold accent line at bottom */
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent 0%, var(--cb-gold) 50%, transparent 100%);
    opacity: 0.7;
}
.armcb-avatar {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: var(--cb-gold);
    color: var(--cb-navy);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    flex-shrink: 0;
    position: relative;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}
.armcb-avatar::after {
    /* Online status dot */
    content: '';
    position: absolute;
    bottom: 1px;
    right: 1px;
    width: 11px;
    height: 11px;
    border-radius: 50%;
    background: #22c55e;
    border: 2px solid var(--cb-navy);
}
.armcb-header-titles { flex: 1; min-width: 0; }
.armcb-title {
    font-family: 'Cormorant Garamond', 'Cairo', serif;
    font-size: 1.15rem;
    font-weight: 600;
    line-height: 1.15;
    letter-spacing: 0.005em;
    margin: 0;
    color: var(--cb-white);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.armcb-subtitle {
    font-size: 0.78rem;
    color: rgba(255,255,255,0.72);
    margin-top: 2px;
    display: flex;
    align-items: center;
    gap: 5px;
}
.armcb-subtitle .armcb-dot {
    width: 6px;
    height: 6px;
    background: #22c55e;
    border-radius: 50%;
    display: inline-block;
}
.armcb-header-actions {
    display: flex;
    gap: 4px;
    align-items: center;
}
.armcb-icon-btn {
    background: transparent;
    border: none;
    color: rgba(255,255,255,0.85);
    width: 34px;
    height: 34px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease, color 0.2s ease;
}
.armcb-icon-btn:hover {
    background: rgba(255,255,255,0.12);
    color: var(--cb-white);
}
.armcb-icon-btn i { font-size: 14px; }

/* ──────────────────────────────────────────────────────────
 * 4. Messages area
 * ────────────────────────────────────────────────────────── */
.armcb-messages {
    flex: 1;
    padding: 18px 16px 8px;
    overflow-y: auto;
    background: var(--cb-bg);
    scroll-behavior: smooth;
}
.armcb-messages::-webkit-scrollbar { width: 6px; }
.armcb-messages::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 3px; }
.armcb-messages::-webkit-scrollbar-track { background: transparent; }

.armcb-msg {
    display: flex;
    margin-bottom: 12px;
    animation: armcb-msg-in 0.28s ease;
    align-items: flex-end;
    gap: 8px;
}
@keyframes armcb-msg-in {
    from { opacity: 0; transform: translateY(6px); }
    to   { opacity: 1; transform: translateY(0); }
}

.armcb-msg-bubble {
    max-width: 78%;
    padding: 10px 14px;
    border-radius: var(--cb-radius-msg);
    line-height: 1.5;
    font-size: 0.92rem;
    word-wrap: break-word;
    overflow-wrap: break-word;
    white-space: pre-wrap;
}

/* Bot messages — left aligned, soft surface */
.armcb-msg.is-bot { justify-content: flex-start; }
.armcb-msg.is-bot .armcb-msg-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--cb-navy);
    color: var(--cb-gold);
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
}
.armcb-msg.is-bot .armcb-msg-bubble {
    background: var(--cb-bot-bg);
    color: var(--cb-text);
    border: 1px solid var(--cb-bot-border);
    border-bottom-left-radius: 4px;
}

/* User messages — right aligned, gold */
.armcb-msg.is-user { justify-content: flex-end; }
.armcb-msg.is-user .armcb-msg-bubble {
    background: linear-gradient(135deg, var(--cb-navy) 0%, var(--cb-navy-soft) 100%);
    color: var(--cb-white);
    border-bottom-right-radius: 4px;
}

/* RTL: invert corner roundness */
html[dir="rtl"] .armcb-msg.is-bot  .armcb-msg-bubble { border-bottom-left-radius: var(--cb-radius-msg); border-bottom-right-radius: 4px; }
html[dir="rtl"] .armcb-msg.is-user .armcb-msg-bubble { border-bottom-right-radius: var(--cb-radius-msg); border-bottom-left-radius: 4px; }

/* Typing indicator (3 dots) */
.armcb-typing { display: flex; align-items: center; gap: 4px; padding: 2px 0; }
.armcb-typing span {
    width: 7px;
    height: 7px;
    background: var(--cb-text-soft);
    border-radius: 50%;
    display: inline-block;
    opacity: 0.5;
    animation: armcb-typing-bounce 1.2s infinite ease-in-out;
}
.armcb-typing span:nth-child(2) { animation-delay: 0.18s; }
.armcb-typing span:nth-child(3) { animation-delay: 0.36s; }
@keyframes armcb-typing-bounce {
    0%, 60%, 100% { transform: translateY(0);    opacity: 0.45; }
    30%           { transform: translateY(-4px); opacity: 1; }
}

/* ──────────────────────────────────────────────────────────
 * 5. Quick-reply chips (welcome + after greeting)
 * ────────────────────────────────────────────────────────── */
.armcb-quick {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 4px 4px 8px 4px;
    margin: 0 0 8px 0;
    animation: armcb-msg-in 0.32s ease;
}
.armcb-quick-label {
    width: 100%;
    font-size: 0.72rem;
    color: var(--cb-text-soft);
    margin: 4px 0 2px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-weight: 600;
}
.armcb-chip {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 9px 14px;
    background: var(--cb-white);
    border: 1.5px solid var(--cb-navy);
    color: var(--cb-navy);
    border-radius: var(--cb-radius-chip);
    font-size: 0.85rem;
    font-weight: 500;
    font-family: 'DM Sans', sans-serif;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease, border-color 0.2s ease;
    line-height: 1;
}
.armcb-chip:hover {
    background: var(--cb-navy);
    color: var(--cb-white);
    transform: translateY(-1px);
}
.armcb-chip:hover .armcb-chip-dot { border-color: var(--cb-gold); }
.armcb-chip-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    border: 1.5px solid var(--cb-navy);
    background: transparent;
    transition: border-color 0.2s ease;
}
.armcb-chip i { font-size: 12px; color: var(--cb-gold); }
.armcb-chip:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }

/* ──────────────────────────────────────────────────────────
 * 6. Error banner (network / rate-limit / validation)
 * ────────────────────────────────────────────────────────── */
.armcb-error {
    margin: 0 0 10px;
    padding: 10px 12px;
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #991b1b;
    border-radius: 10px;
    font-size: 0.82rem;
    display: flex;
    align-items: flex-start;
    gap: 8px;
    animation: armcb-msg-in 0.25s ease;
}
.armcb-error i { font-size: 14px; margin-top: 2px; }

/* ──────────────────────────────────────────────────────────
 * 7. Input area
 * ────────────────────────────────────────────────────────── */
.armcb-input-wrap {
    border-top: 1px solid var(--cb-border);
    background: var(--cb-white);
    padding: 12px 14px;
}
.armcb-input-row {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--cb-bg);
    border: 1.5px solid transparent;
    border-radius: 999px;
    padding: 4px 4px 4px 16px;
    transition: border-color 0.2s ease, background 0.2s ease;
}
.armcb-input-row:focus-within {
    border-color: var(--cb-gold);
    background: var(--cb-white);
}
.armcb-input {
    flex: 1;
    border: none;
    background: transparent;
    outline: none;
    padding: 10px 0;
    font-size: 0.92rem;
    color: var(--cb-text);
    font-family: 'DM Sans', sans-serif;
    min-width: 0;
}
.armcb-input::placeholder { color: var(--cb-text-soft); }
.armcb-send {
    background: var(--cb-gold);
    color: var(--cb-navy);
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease, transform 0.2s ease;
    flex-shrink: 0;
}
.armcb-send:hover:not(:disabled) {
    background: var(--cb-gold-light);
    transform: scale(1.05);
}
.armcb-send:disabled {
    background: var(--cb-border);
    color: var(--cb-text-soft);
    cursor: not-allowed;
}
.armcb-send i { font-size: 14px; }
html[dir="rtl"] .armcb-send i { transform: scaleX(-1); }

.armcb-footer-note {
    text-align: center;
    font-size: 0.7rem;
    color: var(--cb-text-soft);
    margin-top: 8px;
    letter-spacing: 0.02em;
}
.armcb-footer-note i { color: var(--cb-gold); margin-right: 4px; }

/* ──────────────────────────────────────────────────────────
 * 8. Teaser (peek bubble + avatar shown when chat is closed)
 * ────────────────────────────────────────────────────────── */
.armcb-teaser {
    position: fixed;
    bottom: 100px;
    right: 24px;
    z-index: calc(var(--cb-z) - 1);   /* below launcher and window */
    display: flex;
    align-items: center;
    gap: 12px;
    flex-direction: row;
    opacity: 0;
    transform: translateY(8px) scale(0.96);
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.35s cubic-bezier(0.16, 1, 0.3, 1),
                transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
    font-family: 'DM Sans', system-ui, -apple-system, sans-serif;
}
.armcb-teaser.is-visible {
    opacity: 1;
    transform: translateY(0) scale(1);
    visibility: visible;
    pointer-events: auto;
}
html[dir="rtl"] .armcb-teaser {
    right: auto;
    left: 24px;
    flex-direction: row-reverse;
}

/* Bubble */
.armcb-teaser-bubble {
    background: var(--cb-white);
    color: var(--cb-text);
    padding: 12px 18px;
    border-radius: 20px 20px 4px 20px;       /* tail anchor at bottom-right */
    box-shadow: 0 14px 36px rgba(7, 17, 28, 0.18),
                0 4px 12px rgba(7, 17, 28, 0.08);
    font-size: 0.92rem;
    line-height: 1.45;
    max-width: 220px;
    cursor: pointer;
    position: relative;
    user-select: none;
}
/* Speech-bubble tail pointing right toward the avatar */
.armcb-teaser-bubble::after {
    content: '';
    position: absolute;
    bottom: 6px;
    right: -7px;
    width: 0;
    height: 0;
    border-style: solid;
    border-width: 7px 0 7px 9px;
    border-color: transparent transparent transparent var(--cb-white);
    filter: drop-shadow(2px 1px 1px rgba(7,17,28,0.06));
}
html[dir="rtl"] .armcb-teaser-bubble {
    border-radius: 20px 20px 20px 4px;
}
html[dir="rtl"] .armcb-teaser-bubble::after {
    right: auto;
    left: -7px;
    border-width: 7px 9px 7px 0;
    border-color: transparent var(--cb-white) transparent transparent;
}

/* Avatar — either an <img> or the default styled circle with brand icon */
.armcb-teaser-avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--cb-navy) 0%, var(--cb-navy-soft) 100%);
    border: 3px solid var(--cb-gold);
    box-shadow: 0 10px 24px rgba(7, 17, 28, 0.28);
    flex-shrink: 0;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--cb-gold);
    font-size: 24px;
    position: relative;
    overflow: hidden;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.armcb-teaser-avatar:hover {
    transform: scale(1.04);
    box-shadow: 0 14px 30px rgba(7, 17, 28, 0.32);
}
.armcb-teaser-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Small online-status dot on the avatar */
.armcb-teaser-avatar::after {
    content: '';
    position: absolute;
    bottom: 2px;
    right: 2px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #22c55e;
    border: 2px solid var(--cb-white);
    z-index: 2;
}

/* Dismiss button (× on the top-right corner of the avatar) */
.armcb-teaser-close {
    position: absolute;
    top: -6px;
    right: -6px;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: var(--cb-white);
    border: 1px solid var(--cb-border);
    color: var(--cb-text-soft);
    cursor: pointer;
    font-size: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 6px rgba(0,0,0,0.15);
    z-index: 3;
    padding: 0;
    line-height: 1;
    transition: color 0.2s ease, transform 0.2s ease;
}
.armcb-teaser-close:hover {
    color: var(--cb-navy);
    transform: scale(1.08);
}
html[dir="rtl"] .armcb-teaser-close {
    right: auto;
    left: -6px;
}

/* ──────────────────────────────────────────────────────────
 * 8.5 Lead capture form (shown before chat starts)
 * ────────────────────────────────────────────────────────── */
.armcb-lead {
    display: none;
    flex-direction: column;
    flex: 1;
    overflow-y: auto;
    padding: 24px 22px 18px;
    background: var(--cb-bg);
}
.armcb-window.is-lead-mode .armcb-lead { display: flex; }
.armcb-window.is-lead-mode .armcb-messages { display: none; }
.armcb-window.is-lead-mode .armcb-input-wrap { display: none; }

.armcb-lead-title {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-size: 1.55rem;
    font-weight: 600;
    color: var(--cb-navy);
    margin: 0 0 6px;
    line-height: 1.2;
}
.armcb-lead-sub {
    font-size: 0.9rem;
    color: var(--cb-text-soft);
    margin: 0 0 18px;
    line-height: 1.4;
}

.armcb-lead-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.armcb-lead-field {
    display: flex;
    flex-direction: column;
    margin-bottom: 12px;
}
.armcb-lead-field label {
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--cb-navy);
    margin-bottom: 5px;
    letter-spacing: 0.02em;
}
.armcb-lead-field input {
    appearance: none;
    -webkit-appearance: none;
    border: 1px solid var(--cb-border);
    border-radius: 10px;
    padding: 10px 13px;
    font-size: 0.92rem;
    font-family: inherit;
    background: var(--cb-white);
    color: var(--cb-text);
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
    width: 100%;
    box-sizing: border-box;
}
.armcb-lead-field input::placeholder {
    color: var(--cb-text-soft);
    opacity: 0.7;
}
.armcb-lead-field input:focus {
    outline: none;
    border-color: var(--cb-gold);
    box-shadow: 0 0 0 3px rgba(184, 148, 42, 0.15);
}
.armcb-lead-field input.is-error {
    border-color: #d9534f;
    box-shadow: 0 0 0 3px rgba(217, 83, 79, 0.12);
}

.armcb-lead-err {
    display: none;
    font-size: 0.78rem;
    color: #d9534f;
    margin-top: 4px;
    line-height: 1.35;
}
.armcb-lead-err.is-visible { display: block; }

.armcb-lead-submit {
    appearance: none;
    border: none;
    background: var(--cb-gold);
    color: var(--cb-white);
    font-family: inherit;
    font-size: 0.95rem;
    font-weight: 600;
    padding: 12px 18px;
    border-radius: 10px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 8px;
    transition: background 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease;
    box-shadow: 0 6px 16px rgba(184, 148, 42, 0.25);
}
.armcb-lead-submit:hover:not(:disabled) {
    background: #a47f1f;
    transform: translateY(-1px);
    box-shadow: 0 8px 22px rgba(184, 148, 42, 0.32);
}
.armcb-lead-submit:active:not(:disabled) {
    transform: translateY(0);
}
.armcb-lead-submit:disabled {
    opacity: 0.65;
    cursor: not-allowed;
}
.armcb-lead-submit i {
    font-size: 0.85rem;
}

.armcb-lead-privacy {
    font-size: 0.75rem;
    color: var(--cb-text-soft);
    text-align: center;
    margin: 14px 0 0;
    line-height: 1.4;
}
.armcb-lead-privacy i {
    margin-right: 4px;
    color: var(--cb-gold);
}

html[dir="rtl"] .armcb-lead-privacy i {
    margin-right: 0;
    margin-left: 4px;
}

/* ──────────────────────────────────────────────────────────
 * 9. Responsive: tablet + mobile
 * ────────────────────────────────────────────────────────── */
@media (max-width: 540px) {
    .armcb-launcher {
        width: 58px;
        height: 58px;
        bottom: 18px;
        right: 18px;
    }
    html[dir="rtl"] .armcb-launcher { right: auto; left: 18px; }

    .armcb-window {
        right: 0;
        left: 0;
        bottom: 0;
        width: 100%;
        max-width: 100%;
        height: 92vh;
        max-height: 92vh;
        border-radius: 18px 18px 0 0;
        animation: armcb-sheet-in 0.28s cubic-bezier(0.16, 1, 0.3, 1);
    }
    html[dir="rtl"] .armcb-window { right: 0; left: 0; }
    @keyframes armcb-sheet-in {
        from { transform: translateY(100%); }
        to   { transform: translateY(0); }
    }

    .armcb-msg-bubble { max-width: 82%; font-size: 0.92rem; }
    .armcb-title { font-size: 1.15rem; }
    .armcb-chip { font-size: 0.82rem; padding: 8px 12px; }

    /* Teaser scales down on mobile */
    .armcb-teaser { bottom: 86px; right: 18px; gap: 8px; }
    html[dir="rtl"] .armcb-teaser { right: auto; left: 18px; }
    .armcb-teaser-bubble { font-size: 0.85rem; max-width: 170px; padding: 10px 14px; }
    .armcb-teaser-avatar { width: 52px; height: 52px; font-size: 20px; }

    /* Lead form: stack first/last name on narrow screens */
    .armcb-lead { padding: 20px 18px 16px; }
    .armcb-lead-title { font-size: 1.35rem; }
    .armcb-lead-row { grid-template-columns: 1fr; gap: 0; }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    .armcb-launcher,
    .armcb-window,
    .armcb-msg,
    .armcb-quick,
    .armcb-error,
    .armcb-teaser,
    .armcb-launcher::after {
        animation: none !important;
        transition: none !important;
    }
}

/* RTL Arabic / Urdu typography inside the chatbot */
html[dir="rtl"] .armcb-window,
html[dir="rtl"] .armcb-chip,
html[dir="rtl"] .armcb-input {
    font-family: 'Cairo', 'Noto Naskh Arabic', 'DM Sans', sans-serif;
}
html[dir="rtl"] .armcb-title {
    font-family: 'Cairo', 'Noto Naskh Arabic', serif;
}
