/* ==========================================================================
   ERLF AI Assistant — self-contained widget + page styles
   --------------------------------------------------------------------------
   Everything is prefixed/scoped under .aia-* so it never collides with the
   site's Webflow CSS. To restyle, edit the CSS custom properties in the
   :root-scoped block below — colours, sizing and radii all flow from there.
   ========================================================================== */

.aia-root,
.aia-widget {
    /* Brand palette (erlf.com) */
    --aia-navy: #00124a;
    --aia-navy-2: #0e205a;
    --aia-accent: #9b88d7;
    --aia-accent-2: #835cff;
    --aia-title-grad: linear-gradient(270deg, #243d88, #9b88d7 27%, #f3a6b6 67%, #f4932c);
    --aia-send-grad: linear-gradient(180deg, #9b88d7, #835cff);
    --aia-fab-grad: linear-gradient(135deg, #0e205a, #00124a);

    /* Surfaces & text */
    --aia-panel-bg: #ffffff;
    --aia-header-bg: #00124a;
    --aia-header-fg: #ffffff;
    --aia-user-bg: #00124a;
    --aia-user-fg: #ffffff;
    --aia-bot-bg: #f1f2f7;
    --aia-bot-fg: #14181f;
    --aia-muted: #6b7280;
    --aia-border: #e6e8ef;
    --aia-notice-bg: #fff4e6;
    --aia-notice-fg: #8a4b00;

    /* Shape & motion */
    --aia-radius: 20px;
    --aia-bubble-radius: 16px;
    --aia-fab-size: 60px;
    --aia-shadow: 0 18px 50px rgba(0, 18, 74, 0.28);
    --aia-font: "Erfont", "Cairo", Arial, sans-serif;

    box-sizing: border-box;
}

.aia-root *,
.aia-widget * {
    box-sizing: border-box;
}

/* ---------------------------------------------------------------- Launcher */

.aia-widget {
    position: fixed;
    bottom: 98px;
    right: 24px;
    z-index: 2147482000;
    font-family: var(--aia-font);
}
.aia-widget.is-open {
    /* Keep an open conversation above the internal footer's raised stacking
       context; the closed launcher intentionally sits below the back-to-top
       control so both controls remain reachable at the footer. */
    z-index: 2147482002;
}
[dir="rtl"] .aia-widget {
    right: auto;
    left: 24px;
}

.aia-fab {
    width: var(--aia-fab-size);
    height: var(--aia-fab-size);
    border: none;
    border-radius: 50%;
    background: var(--aia-fab-grad);
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--aia-shadow);
    transition: transform 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease;
    padding: 0;
}
.aia-fab:hover {
    transform: translateY(-2px) scale(1.04);
}
/* Stepped aside while the footer's own cursor-following CTA circle is in
   view, so this fixed corner button doesn't steal the mouse events it needs
   (see the IntersectionObserver in ai-assistant.js). Closed state only. */
.aia-widget.aia-yield-fab .aia-fab {
    opacity: 0;
    pointer-events: none;
    transform: scale(0.8);
}
.aia-fab svg {
    width: 26px;
    height: 26px;
}
.aia-fab .aia-fab-close {
    display: none;
}
.aia-widget.is-open .aia-fab .aia-fab-open {
    display: none;
}
.aia-widget.is-open .aia-fab .aia-fab-close {
    display: block;
}

/* ------------------------------------------------------------------- Panel */

.aia-panel {
    position: absolute;
    bottom: calc(var(--aia-fab-size) + 16px);
    right: 0;
    width: 384px;
    /* Keeps the panel's own header/actions on-screen: 100vh minus the widget's
       bottom offset, the launcher button, the gap above it, and a bit of
       breathing room at the very top of the viewport. Kept in sync with
       .aia-widget's bottom offset above — raising that by N shortens this by
       the same N, so the panel's top edge doesn't creep further up the
       screen (and under the mobile browser's own chrome) than before. */
    height: min(624px, calc(100vh - 206px));
    background: var(--aia-panel-bg);
    border-radius: var(--aia-radius);
    box-shadow: var(--aia-shadow);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transform: translateY(16px) scale(0.98);
    transform-origin: bottom right;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease, transform 0.2s ease;
}
[dir="rtl"] .aia-panel {
    right: auto;
    left: 0;
    transform-origin: bottom left;
}
.aia-widget.is-open .aia-panel {
    transform: translateY(0) scale(1);
    opacity: 1;
    pointer-events: auto;
}

/* ------------------------------------------------------------- Chat shell */

.aia-root {
    display: flex;
    flex-direction: column;
    height: 100%;
    width: 100%;
    background: var(--aia-panel-bg);
    font-family: var(--aia-font);
    color: var(--aia-bot-fg);
}

.aia-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 16px;
    background: var(--aia-header-bg);
    color: var(--aia-header-fg);
    flex: none;
}
.aia-header-badge {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.12);
    display: flex;
    align-items: center;
    justify-content: center;
    flex: none;
}
.aia-header-badge svg {
    width: 18px;
    height: 18px;
}
.aia-header-badge-logo {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: inherit;
}
.aia-header-titles {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
    margin-inline-end: auto;
    min-width: 0;
}
.aia-header-title {
    font-weight: 700;
    font-size: 15px;
}
.aia-header-status {
    font-size: 11px;
    opacity: 0.7;
    display: flex;
    align-items: center;
    gap: 5px;
}
.aia-header-status::before {
    content: "";
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #4ade80;
    display: inline-block;
}
.aia-header-actions {
    display: flex;
    align-items: center;
    gap: 2px;
    flex: none;
}
.aia-iconbtn {
    width: 32px;
    height: 32px;
    border: none;
    background: transparent;
    color: inherit;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.85;
    transition: background 0.15s ease, opacity 0.15s ease;
    text-decoration: none;
}
.aia-iconbtn:hover {
    background: rgba(255, 255, 255, 0.14);
    opacity: 1;
}
.aia-iconbtn svg {
    width: 18px;
    height: 18px;
}
.aia-action-label {
    display: none;
}
.aia-iconbtn:focus-visible,
.aia-suggestion:focus-visible,
.aia-send:focus-visible,
.aia-fab:focus-visible {
    outline: 3px solid rgba(155, 136, 215, 0.42);
    outline-offset: 2px;
}

/* ---------------------------------------------------------------- Messages */

.aia-messages {
    flex: 1;
    overflow-y: auto;
    padding: 18px 16px;
    display: flex;
    flex-direction: column;
    gap: 14px;
    scroll-behavior: smooth;
    background: linear-gradient(180deg, #fbfbfe, #ffffff);
    /* Stop scrolling from chaining to the page behind once this list hits
       its top/bottom edge (mainly matters on touch devices). */
    overscroll-behavior: contain;
}
.aia-messages::-webkit-scrollbar {
    width: 8px;
}
.aia-messages::-webkit-scrollbar-thumb {
    background: #d7dae6;
    border-radius: 8px;
}

.aia-msg {
    display: flex;
    max-width: 88%;
}
.aia-msg-bubble {
    padding: 10px 14px;
    border-radius: var(--aia-bubble-radius);
    font-size: 14px;
    line-height: 1.55;
    white-space: pre-wrap;
    word-wrap: break-word;
    overflow-wrap: anywhere;
}

/* Rendered-markdown answers (set after the typewriter finishes) */
.aia-msg-bubble.aia-formatted {
    white-space: normal;
}
.aia-msg-bubble.aia-formatted p {
    margin: 0 0 8px;
}
.aia-msg-bubble.aia-formatted p:last-child {
    margin-bottom: 0;
}
.aia-msg-bubble.aia-formatted ul,
.aia-msg-bubble.aia-formatted ol {
    margin: 4px 0 8px;
    padding-inline-start: 20px;
}
.aia-msg-bubble.aia-formatted li {
    margin: 3px 0;
}
.aia-msg-bubble.aia-formatted a {
    color: var(--aia-accent-2);
    text-decoration: underline;
}
.aia-msg.is-user .aia-msg-bubble.aia-formatted a {
    color: #cdbcff;
}
.aia-msg-bubble.aia-formatted code {
    background: rgba(0, 0, 0, 0.06);
    padding: 1px 5px;
    border-radius: 5px;
    font-size: 12.5px;
}
.aia-msg.is-user .aia-msg-bubble.aia-formatted code {
    background: rgba(255, 255, 255, 0.18);
}
.aia-msg.is-user {
    align-self: flex-end;
}
.aia-msg.is-user .aia-msg-bubble {
    background: var(--aia-user-bg);
    color: var(--aia-user-fg);
    border-bottom-right-radius: 5px;
}
[dir="rtl"] .aia-msg.is-user .aia-msg-bubble {
    border-bottom-right-radius: var(--aia-bubble-radius);
    border-bottom-left-radius: 5px;
}
.aia-msg.is-bot {
    align-self: flex-start;
}
.aia-msg.is-bot .aia-msg-bubble {
    background: var(--aia-bot-bg);
    color: var(--aia-bot-fg);
    border-bottom-left-radius: 5px;
}
[dir="rtl"] .aia-msg.is-bot .aia-msg-bubble {
    border-bottom-left-radius: var(--aia-bubble-radius);
    border-bottom-right-radius: 5px;
}
.aia-msg.is-notice {
    align-self: stretch;
    max-width: 100%;
}
.aia-msg.is-notice .aia-msg-bubble {
    background: var(--aia-notice-bg);
    color: var(--aia-notice-fg);
    font-size: 13px;
    width: 100%;
}

/* Typing caret shown inline at the end of the answer while it types out */
.aia-caret-inline {
    display: inline-block;
    margin-inline-start: 1px;
    opacity: 0.6;
    animation: aia-blink 1s steps(2) infinite;
}
@keyframes aia-blink {
    50% { opacity: 0; }
}

/* Thinking indicator (ERLF AI logo animation), shown while awaiting a reply */
.aia-thinking {
    display: flex;
    align-items: center;
    padding: 8px 14px;
}
.aia-thinking-gif {
    width: 32px;
    height: 32px;
    object-fit: contain;
    display: block;
}
/* Fallback bouncing dots if the gif asset isn't present */
.aia-thinking span {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--aia-accent);
    margin-inline-end: 4px;
    display: inline-block;
    animation: aia-bounce 1.2s infinite ease-in-out both;
}
.aia-thinking span:nth-child(2) { animation-delay: 0.16s; }
.aia-thinking span:nth-child(3) { animation-delay: 0.32s; }
@keyframes aia-bounce {
    0%, 80%, 100% { transform: scale(0.6); opacity: 0.5; }
    40% { transform: scale(1); opacity: 1; }
}

/* ------------------------------------------------------------- Empty state */

.aia-welcome {
    margin: auto 0;
    text-align: center;
    padding: 12px 6px;
}
.aia-welcome-badge {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    margin: 0 auto 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--aia-fab-grad);
    color: #fff;
}
.aia-welcome-badge svg {
    width: 28px;
    height: 28px;
}
.aia-welcome-badge-logo {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: inherit;
}
.aia-welcome h3 {
    font-size: 18px;
    font-weight: 700;
    margin: 0 0 6px;
    color: var(--aia-navy);
}
.aia-welcome p {
    font-size: 13px;
    color: var(--aia-muted);
    margin: 0 auto 16px;
    max-width: 280px;
    line-height: 1.5;
}
.aia-suggestions {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.aia-suggestion {
    border: 1px solid var(--aia-border);
    background: #fff;
    border-radius: 12px;
    padding: 10px 12px;
    font-size: 13px;
    color: var(--aia-navy);
    cursor: pointer;
    text-align: start;
    font-family: inherit;
    transition: border-color 0.15s ease, background 0.15s ease;
}
.aia-suggestion:hover {
    border-color: var(--aia-accent);
    background: #f7f5ff;
}

/* ------------------------------------------------------------------- Input */

.aia-inputbar {
    display: flex;
    align-items: flex-end;
    gap: 8px;
    padding: 12px;
    border-top: 1px solid var(--aia-border);
    background: #fff;
    flex: none;
}
.aia-input {
    flex: 1;
    border: 1px solid var(--aia-border);
    border-radius: 14px;
    padding: 10px 12px;
    font-size: 14px;
    font-family: inherit;
    resize: none;
    max-height: 120px;
    line-height: 1.4;
    color: var(--aia-bot-fg);
    background: #f9fafc;
    outline: none;
    transition: border-color 0.15s ease, background 0.15s ease;
}
.aia-input:focus {
    border-color: var(--aia-accent);
    background: #fff;
}
.aia-send {
    width: 42px;
    height: 42px;
    flex: none;
    border: none;
    border-radius: 12px;
    background: var(--aia-send-grad);
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.15s ease, opacity 0.15s ease;
}
.aia-send:hover { transform: translateY(-1px); }
.aia-send:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }
.aia-send svg { width: 19px; height: 19px; }
[dir="rtl"] .aia-send svg { transform: scaleX(-1); }

.aia-disclaimer {
    font-size: 10.5px;
    color: var(--aia-muted);
    text-align: center;
    padding: 0 12px 10px;
    background: #fff;
    flex: none;
}

/* --------------------------------------------------------- Full-page mode */

/* The dedicated /assistant page. A ChatGPT-style single-column conversation,
   dressed in the site's own theme: the navy hero gradient behind the whole
   canvas (same #00124a -> #0e205a the home/our-dna/our-team heroes use, plus a
   soft branded glow), the signature multi-colour gradient title on the
   greeting, and rounded — not Webflow-angular — chat surfaces. Text flips to
   light because the canvas is now dark. */
.aia-page {
    /* Page-scoped dark-theme tokens, so the conversation surfaces read on the
       navy canvas without touching the (white-panel) floating widget. */
    --aia-page-fg: #eef1fb;
    --aia-page-muted: rgba(238, 241, 251, 0.62);
    --aia-page-glass: rgba(255, 255, 255, 0.07);
    --aia-page-glass-strong: rgba(255, 255, 255, 0.12);
    --aia-page-border: rgba(255, 255, 255, 0.14);
    --aia-page-hero-grad: linear-gradient(270deg, #c5d2fa, #9b88d7 27%, #f3a6b6 67%, #f4932c);

    height: 100vh;
    min-height: 620px;
    display: flex;
    align-items: stretch;
    padding: 82px 0 0;
    font-family: var(--aia-font);
    overflow: hidden;
    color: var(--aia-page-fg);
    background:
        radial-gradient(1100px 620px at 50% -12%, rgba(155, 136, 215, 0.22), transparent 62%),
        radial-gradient(900px 520px at 92% 8%, rgba(243, 166, 182, 0.12), transparent 60%),
        linear-gradient(160deg, #00103f 0%, #00124a 42%, #0e205a 100%);
}
.aia-page .aia-root {
    width: 100%;
    height: calc(100vh - 82px);
    min-height: 538px;
    border-radius: 0;
    box-shadow: none;
    overflow: hidden;
    background: transparent;
}

.aia-mode-page {
    height: 100%;
    border-radius: 0;
}

/* --- Header: slim, transparent, sits on the gradient --- */
.aia-mode-page .aia-header {
    min-height: 62px;
    padding: 12px 24px;
    background: transparent;
    color: var(--aia-page-fg);
    border-bottom: 1px solid var(--aia-page-border);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
}
.aia-mode-page .aia-header-badge {
    width: 26px;
    height: 26px;
    border-radius: 0;
    background: transparent;
    color: #f3a6b6;
}
.aia-mode-page .aia-header-badge svg {
    width: 20px;
    height: 20px;
}
.aia-mode-page .aia-header-title {
    font-size: 15px;
    font-weight: 700;
    letter-spacing: -0.01em;
    color: var(--aia-page-fg);
}
.aia-mode-page .aia-header-status {
    display: none;
}
.aia-mode-page .aia-header-actions {
    gap: 8px;
}
.aia-mode-page .aia-iconbtn {
    width: auto;
    height: 38px;
    gap: 8px;
    padding: 0 14px;
    border: 1px solid var(--aia-page-border);
    background: var(--aia-page-glass);
    color: var(--aia-page-fg);
    border-radius: 999px;
    opacity: 1;
    font-family: inherit;
    font-size: 12px;
    font-weight: 600;
    box-shadow: none;
    transition: background-color 0.18s ease, border-color 0.18s ease;
}
.aia-mode-page .aia-iconbtn:hover {
    background: var(--aia-page-glass-strong);
    border-color: rgba(155, 136, 215, 0.75);
}
.aia-mode-page .aia-action-label {
    display: inline;
}

/* --- Conversation --- */
.aia-mode-page .aia-messages {
    padding: 34px max(20px, calc((100% - 768px) / 2)) 28px;
    gap: 26px;
    background: transparent;
    scroll-padding-bottom: 24px;
}
.aia-mode-page .aia-messages::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.18);
}
.aia-mode-page .aia-msg {
    max-width: min(82%, 620px);
}
.aia-mode-page .aia-msg-bubble {
    font-size: 15px;
    line-height: 1.72;
    color: var(--aia-page-fg);
}
/* User = subtle rounded glass bubble on the right (ChatGPT-like) */
.aia-mode-page .aia-msg.is-user .aia-msg-bubble {
    padding: 11px 16px;
    background: var(--aia-page-glass-strong);
    color: var(--aia-page-fg);
    border: 1px solid var(--aia-page-border);
    border-radius: 18px;
    clip-path: none;
}
/* Bot = full-width, no bubble, just flowing text on the canvas */
.aia-mode-page .aia-msg.is-bot {
    align-self: stretch;
    max-width: 100%;
}
.aia-mode-page .aia-msg.is-bot .aia-msg-bubble {
    width: 100%;
    padding: 0;
    background: transparent;
    border-radius: 0;
    color: var(--aia-page-fg);
}
.aia-mode-page .aia-msg-bubble.aia-formatted a {
    color: #f3a6b6;
}
.aia-mode-page .aia-msg-bubble.aia-formatted code {
    background: rgba(255, 255, 255, 0.1);
    color: #e7d9ff;
}
.aia-mode-page .aia-msg.is-notice {
    max-width: 100%;
}
.aia-mode-page .aia-msg.is-notice .aia-msg-bubble {
    background: rgba(244, 147, 44, 0.12);
    border: 1px solid rgba(244, 147, 44, 0.35);
    color: #ffd9ad;
    border-radius: 14px;
}

/* --- Welcome / greeting --- */
.aia-mode-page .aia-welcome {
    width: 100%;
    max-width: 768px;
    margin: auto;
    padding: 20px 0 38px;
    text-align: center;
}
.aia-mode-page .aia-welcome-badge {
    width: 44px;
    height: 44px;
    margin: 0 auto 22px;
    border-radius: 0;
    background: transparent;
    color: #f3a6b6;
    box-shadow: none;
}
.aia-mode-page .aia-welcome-badge::before {
    display: none;
}
.aia-mode-page .aia-welcome h3 {
    margin-bottom: 14px;
    font-size: clamp(30px, 3.6vw, 46px);
    line-height: 1.15;
    letter-spacing: -0.025em;
    font-weight: 500;
    -webkit-text-fill-color: transparent;
    background-image: var(--aia-page-hero-grad);
    -webkit-background-clip: text;
    background-clip: text;
}
[dir="rtl"] .aia-mode-page .aia-welcome h3 {
    font-family: "Cairo", Arial, sans-serif;
    font-weight: 700;
}
.aia-mode-page .aia-welcome p {
    max-width: 540px;
    margin: 0 auto 30px;
    font-size: 14.5px;
    line-height: 1.65;
    color: var(--aia-page-muted);
}
.aia-mode-page .aia-suggestions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    max-width: 680px;
    margin: 0 auto;
}
.aia-mode-page .aia-suggestion {
    position: relative;
    min-height: 58px;
    padding: 14px 44px 14px 16px;
    border: 1px solid var(--aia-page-border);
    background: var(--aia-page-glass);
    border-radius: 16px;
    clip-path: none;
    color: var(--aia-page-fg);
    line-height: 1.4;
    text-align: start;
    box-shadow: none;
    transition: background-color 0.18s ease, border-color 0.18s ease, transform 0.18s ease;
}
[dir="rtl"] .aia-mode-page .aia-suggestion {
    padding: 14px 16px 14px 44px;
}
.aia-mode-page .aia-suggestion:hover {
    background: var(--aia-page-glass-strong);
    border-color: rgba(155, 136, 215, 0.7);
    transform: translateY(-1px);
}
.aia-mode-page .aia-suggestion::after {
    content: "\2197";
    position: absolute;
    inset-inline-end: 15px;
    top: 50%;
    color: #f3a6b6;
    font-size: 16px;
    transform: translateY(-50%);
    opacity: 0.55;
    transition: opacity 0.15s ease, transform 0.15s ease;
}
[dir="rtl"] .aia-mode-page .aia-suggestion::after {
    content: "\2196";
}
.aia-mode-page .aia-suggestion:hover::after {
    opacity: 1;
    transform: translateY(-50%) translateX(2px);
}

/* --- Composer: rounded ChatGPT-style pill floating over the gradient --- */
.aia-mode-page .aia-inputbar,
.aia-mode-page .aia-disclaimer {
    width: min(calc(100% - 40px), 768px);
    margin-inline: auto;
}
.aia-mode-page .aia-inputbar {
    gap: 10px;
    padding: 8px 8px 8px 20px;
    border: 1px solid var(--aia-page-border);
    border-radius: 26px;
    background: rgba(255, 255, 255, 0.09);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    box-shadow: 0 12px 34px -14px rgba(0, 0, 0, 0.55);
    transition: border-color 0.18s ease, background-color 0.18s ease;
}
[dir="rtl"] .aia-mode-page .aia-inputbar {
    padding: 8px 20px 8px 8px;
}
.aia-mode-page .aia-inputbar:focus-within {
    border-color: rgba(155, 136, 215, 0.75);
    background: rgba(255, 255, 255, 0.12);
}
.aia-mode-page .aia-input {
    min-height: 40px;
    padding: 9px 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    color: var(--aia-page-fg);
    font-size: 15px;
    line-height: 1.45;
}
.aia-mode-page .aia-input::placeholder {
    color: var(--aia-page-muted);
}
.aia-mode-page .aia-input:focus {
    background: transparent;
}
.aia-mode-page .aia-send {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--aia-send-grad);
    color: #fff;
}
.aia-mode-page .aia-send:hover {
    background: var(--aia-send-grad);
    transform: translateY(-1px);
    filter: saturate(1.12) brightness(1.03);
}
.aia-mode-page .aia-send:disabled {
    filter: none;
    transform: none;
}
.aia-mode-page .aia-disclaimer {
    padding: 10px 12px 14px;
    background: transparent;
    color: var(--aia-page-muted);
    font-size: 10.5px;
}

@media (max-width: 640px) {
    .aia-page {
        height: 100dvh;
        min-height: 0;
        padding-top: 72px;
    }
    .aia-page .aia-root {
        height: calc(100dvh - 72px);
        min-height: 0;
    }
    .aia-mode-page .aia-header {
        min-height: 56px;
        padding: 8px 14px;
    }
    .aia-mode-page .aia-header-badge {
        display: none;
    }
    .aia-mode-page .aia-iconbtn {
        width: 36px;
        padding: 0;
        border-radius: 50%;
    }
    .aia-mode-page .aia-action-label {
        display: none;
    }
    .aia-mode-page .aia-messages {
        padding: 24px 16px 18px;
        gap: 20px;
    }
    .aia-mode-page .aia-welcome {
        padding: 20px 0 28px;
    }
    .aia-mode-page .aia-welcome-badge {
        width: 38px;
        height: 38px;
        margin-bottom: 16px;
    }
    .aia-mode-page .aia-welcome h3 {
        font-size: 30px;
    }
    .aia-mode-page .aia-welcome p {
        margin-bottom: 22px;
        font-size: 13px;
    }
    .aia-mode-page .aia-suggestions {
        grid-template-columns: 1fr;
        gap: 8px;
    }
    .aia-mode-page .aia-suggestion {
        min-height: 50px;
        padding-block: 12px;
    }
    .aia-mode-page .aia-inputbar,
    .aia-mode-page .aia-disclaimer {
        width: calc(100% - 24px);
    }
    .aia-mode-page .aia-msg {
        max-width: 88%;
    }
    .aia-mode-page .aia-msg.is-bot,
    .aia-mode-page .aia-msg.is-notice {
        max-width: 100%;
    }
}

/* ---------------------------------------------------------------- Mobile */

/* Applied to <html> while the fullscreen mobile panel is open, so the page
   behind it can't scroll/rubber-band underneath. */
html.aia-scroll-lock,
html.aia-scroll-lock body {
    overflow: hidden;
    overscroll-behavior: none;
}

@media (max-width: 480px) {
    .aia-widget {
        bottom: 90px;
        right: 16px;
    }
    [dir="rtl"] .aia-widget {
        left: 16px;
    }
    .aia-panel {
        position: fixed;
        inset: 0;
        width: 100vw;
        height: 100dvh;
        border-radius: 0;
        bottom: 0;
        right: 0;
        overscroll-behavior: contain;
    }
    .aia-widget.is-open .aia-fab {
        display: none;
    }
    /* iOS Safari zooms the viewport on focus if an input's font-size is
       under 16px — keep it at 16px here without changing the desktop size. */
    .aia-input {
        font-size: 16px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .aia-root *,
    .aia-widget * {
        scroll-behavior: auto !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
