/* Inherit the landing page's active brand, typography and surface palette. */
.as-webchat {
    --as-chat-accent: var(--brand-indigo, #00e4fc);
    --as-chat-surface: var(--bg-dark, #012233);
    --as-chat-border: var(--bg-glass-border, rgba(255, 255, 255, .12));
    --as-chat-gap: 24px;
    position: fixed;
    right: max(var(--as-chat-gap), env(safe-area-inset-right));
    bottom: calc(var(--as-chat-gap) + env(safe-area-inset-bottom) + var(--as-chat-keyboard-offset, 0px));
    z-index: 10000;
    color-scheme: dark;
    color: var(--text-light, #e2e8f0);
    font: 14px/1.5 var(--font-family, 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif);
    text-align: left;
    -webkit-font-smoothing: antialiased;
}
.as-webchat *, .as-webchat *::before, .as-webchat *::after { box-sizing: border-box; }
.as-webchat [hidden] { display: none !important; }
.as-webchat button, .as-webchat input, .as-webchat textarea { font: inherit; }
.as-webchat button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 10px 14px; border: 1px solid var(--as-chat-border); border-radius: var(--radius-md, 12px); background: var(--bg-card, rgba(255, 255, 255, .04)); color: var(--text-light, #e2e8f0); line-height: 1.35; cursor: pointer; transition: background 180ms ease, border-color 180ms ease, box-shadow 180ms ease; }
.as-webchat button:hover:not(:disabled) { background: var(--bg-card-hover, rgba(255, 255, 255, .08)); border-color: var(--as-chat-accent); }
.as-webchat button:disabled { cursor: default; opacity: .5; }
.as-webchat :focus-visible { outline: 2px solid var(--as-chat-accent); outline-offset: 3px; }
.as-webchat .as-webchat-launcher { gap: 10px; padding: 8px 20px 8px 8px; border: 1px solid rgba(var(--brand-indigo-rgb, 0, 228, 252), .4); border-radius: var(--radius-full, 999px); background: var(--gradient-brand, linear-gradient(135deg, #00e4fc, #02bbd3)); color: var(--text-on-brand, #012233); box-shadow: 0 8px 32px rgba(0, 0, 0, .3), 0 0 24px rgba(var(--brand-indigo-rgb, 0, 228, 252), .12); font-weight: 700; letter-spacing: -.02em; }
.as-webchat .as-webchat-launcher:hover:not(:disabled) { background: var(--gradient-brand, linear-gradient(135deg, #00e4fc, #02bbd3)); box-shadow: var(--shadow-btn, 0 4px 20px #00e4fc44); }
.as-webchat-mark { display: block; flex: 0 0 auto; width: 40px; height: 40px; padding: 6px; overflow: hidden; border: 1px solid rgba(var(--brand-indigo-rgb, 0, 228, 252), .22); border-radius: 13px; background: #012233; }
.as-webchat-launcher .as-webchat-mark { width: 36px; height: 36px; padding: 5px; border: 0; border-radius: 50%; }
.as-webchat-panel { position: relative; display: flex; flex-direction: column; width: min(400px, calc(100vw - var(--as-chat-gap) * 2 - env(safe-area-inset-left) - env(safe-area-inset-right))); height: 650px; max-height: calc(var(--as-chat-viewport-height, 100dvh) - var(--as-chat-gap) * 2 - env(safe-area-inset-top) - env(safe-area-inset-bottom)); overflow: auto; overscroll-behavior: contain; border: 1px solid rgba(var(--brand-indigo-rgb, 0, 228, 252), .25); border-radius: var(--radius-xl, 24px); background: var(--as-chat-surface); box-shadow: 0 24px 80px rgba(0, 0, 0, .45), 0 0 0 1px rgba(255, 255, 255, .025); }
.as-webchat-header { display: flex; align-items: center; gap: 12px; flex: 0 0 auto; padding: 18px 16px 14px; border-bottom: 1px solid var(--as-chat-border); background: var(--gradient-card, linear-gradient(135deg, #00e4fc12, transparent)); }
.as-webchat-heading { flex: 1; min-width: 0; }
.as-webchat-header h2 { margin: 0; font-size: 16px; line-height: 1.4; font-weight: 650; letter-spacing: -.025em; color: var(--text-white, #fdfdfd); }
.as-webchat-subtitle { display: block; margin-top: 3px; font-size: 11px; color: var(--text-muted, #94a3b8); }
.as-webchat .as-webchat-close { flex: 0 0 44px; width: 44px; padding: 0; border-color: transparent; background: transparent; color: var(--text-muted, #94a3b8); font-size: 26px; font-weight: 300; }
.as-webchat-intro { flex-shrink: 0; margin: 0; padding: 16px 20px; color: var(--text-muted, #94a3b8); font-size: 13px; line-height: 1.6; }
.as-webchat-privacy { align-self: center; flex-shrink: 0; margin: 0; padding: 8px 12px 12px; font-size: 11px; line-height: 1.4; text-underline-offset: 3px; color: var(--text-muted, #94a3b8); }
.as-webchat-privacy:hover { color: var(--as-chat-accent); text-decoration: underline; }
.as-webchat-messages { flex: 1 1 auto; min-height: 64px; overflow-y: auto; padding: 0 18px 8px; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: rgba(var(--brand-indigo-rgb, 0, 228, 252), .3) transparent; }
.as-webchat-message { width: fit-content; max-width: 92%; margin: 10px 0; padding: 12px 14px; border: 1px solid var(--as-chat-border); border-radius: 16px 16px 16px 4px; background: var(--bg-card, rgba(255, 255, 255, .04)); overflow-wrap: anywhere; }
.as-webchat-message strong { display: block; font-size: 10px; line-height: 1.4; color: var(--brand-indigo-light, #00f4fc); font-weight: 600; }
.as-webchat-message p { margin: 5px 0 0; white-space: pre-wrap; font-size: 14px; line-height: 1.65; color: var(--text-light, #e2e8f0); }
.as-webchat-user { margin-left: auto; border-color: rgba(var(--brand-indigo-rgb, 0, 228, 252), .2); border-radius: 16px 16px 4px 16px; background: rgba(var(--brand-indigo-rgb, 0, 228, 252), .1); }
.as-webchat-user strong { color: var(--text-muted, #94a3b8); }
.as-webchat-status { flex-shrink: 0; min-height: 17px; margin: 4px 20px 10px; color: var(--text-muted, #94a3b8); font-size: 11px; line-height: 1.55; }
.as-webchat-recovery { flex-shrink: 0; margin: 0 16px 10px; }
.as-webchat-compose { display: flex; align-items: flex-end; gap: 8px; flex-shrink: 0; margin: 0 16px 12px; padding: 6px; border: 1px solid rgba(var(--brand-indigo-rgb, 0, 228, 252), .25); border-radius: 16px; background: var(--bg-input, rgba(255, 255, 255, .08)); }
.as-webchat-compose:focus-within { border-color: var(--as-chat-accent); box-shadow: 0 0 0 2px rgba(var(--brand-indigo-rgb, 0, 228, 252), .08); }
.as-webchat-compose textarea { flex: 1; min-width: 0; min-height: 44px; max-height: 96px; resize: vertical; border: 0; border-radius: 8px; padding: 9px 8px; background: transparent; color: var(--text-white, #fdfdfd); font-size: 14px; line-height: 1.5; }
.as-webchat-compose textarea:focus { outline: none; }
.as-webchat-compose textarea::placeholder, .as-webchat-lead input::placeholder { color: var(--text-muted, #94a3b8); opacity: 1; }
.as-webchat-compose button, .as-webchat-lead button { flex-shrink: 0; border: 0; background: var(--gradient-brand, linear-gradient(135deg, #00e4fc, #02bbd3)); color: var(--text-on-brand, #012233); font-weight: 650; }
.as-webchat-compose button:hover:not(:disabled), .as-webchat-lead button:hover:not(:disabled) { background: var(--gradient-brand, linear-gradient(135deg, #00e4fc, #02bbd3)); box-shadow: var(--shadow-btn, 0 4px 16px #00e4fc33); }
.as-webchat-actions { display: flex; gap: 8px; flex-shrink: 0; padding: 0 16px; }
.as-webchat-actions button { flex: 1 1 0; min-width: 0; padding: 9px 10px; font-size: 11px; font-weight: 500; }
.as-webchat-lead { flex: 1 1 auto; min-height: 0; padding: 16px 20px 4px; overflow-y: auto; overscroll-behavior: contain; }
.as-webchat-lead label { display: block; margin-bottom: 12px; color: var(--text-light, #e2e8f0); font-size: 12px; font-weight: 500; }
.as-webchat-lead input { display: block; width: 100%; min-height: 44px; margin-top: 5px; border: 1px solid var(--as-chat-border); border-radius: 10px; padding: 10px 12px; color: var(--text-white, #fdfdfd); background: var(--bg-input, rgba(255, 255, 255, .08)); }
.as-webchat-lead p { margin: 4px 0 16px; color: var(--text-muted, #94a3b8); font-size: 11px; line-height: 1.6; }
.as-webchat-lead button { width: 100%; }
.as-webchat-compact .as-webchat-intro, .as-webchat-compact .as-webchat-subtitle { display: none; }
.as-webchat-compact .as-webchat-header { padding: 8px 12px; }
.as-webchat-compact .as-webchat-compose { margin-bottom: 8px; }
.as-webchat-compact .as-webchat-status { margin-bottom: 6px; }
.as-webchat-compact .as-webchat-privacy { padding-top: 6px; padding-bottom: 8px; }
@media (max-width: 480px) {
    .as-webchat { --as-chat-gap: 12px; }
    .as-webchat-panel { height: 680px; border-radius: 20px; }
    .as-webchat-compose textarea, .as-webchat-lead input { font-size: 16px; }
    .as-webchat-header { gap: 10px; padding: 14px 12px 12px; }
    .as-webchat-header h2 { font-size: 15px; }
    .as-webchat-intro { padding: 14px 16px; }
    .as-webchat-messages { padding-right: 14px; padding-left: 14px; }
    .as-webchat-compose { margin-right: 12px; margin-left: 12px; }
    .as-webchat-actions { padding-right: 12px; padding-left: 12px; }
}
@media (prefers-reduced-motion: reduce) { .as-webchat button { transition: none; } }
@media (pointer: coarse) { .as-webchat-compose textarea, .as-webchat-lead input { font-size: 16px; } }
