/* ═══════════════════════════════════════════════════════════════
   Site assistant — floating chat bubble
   ───────────────────────────────────────────────────────────────
   Replaces whatsapp.css. Same corner, same footprint, but the panel
   holds a conversation instead of a hand-off to another app.
═══════════════════════════════════════════════════════════════ */

.asst-root {
    position: fixed;
    right: 1.15rem;
    bottom: 1.15rem;
    z-index: 9000;
    font-family: inherit;
    direction: ltr;
    text-align: left;
    isolation: isolate;
}

/* ── The bubble ─────────────────────────────────────────────── */
.asst-toggle {
    display: grid;
    place-items: center;
    width: 54px;
    height: 54px;
    border: 0;
    border-radius: 50%;
    background: linear-gradient(145deg, #d8b33c, #b78d12);
    color: #fff;
    cursor: pointer;
    box-shadow: 0 6px 22px rgba(0, 0, 0, .28);
    transition: transform .18s ease, box-shadow .18s ease;
}
.asst-toggle:hover,
.asst-toggle:focus-visible { transform: translateY(-2px); box-shadow: 0 9px 26px rgba(0, 0, 0, .34); }
.asst-toggle svg { width: 24px; height: 24px; display: block; }

/* ── The panel ──────────────────────────────────────────────── */
.asst-panel {
    position: absolute;
    right: 0;
    bottom: 66px;
    width: min(94vw, 27rem);
    height: min(86vh, 42rem);
    height: min(86dvh, 42rem);
    max-height: min(86vh, 42rem);
    max-height: min(86dvh, 42rem);
    display: none;
    flex-direction: column;
    background: #fff;
    color: #1c1c1e;
    border: 1px solid rgba(0, 0, 0, .12);
    border-radius: 18px;
    box-shadow: 0 24px 64px rgba(7, 25, 39, .3);
    overflow: hidden;
}
.asst-root.is-open .asst-panel { display: flex; }

.asst-head {
    padding: 1.05rem 1.1rem 1rem;
    background: linear-gradient(135deg, #082839, #0d4554);
    color: #fff;
    border-bottom: 3px solid #c9a227;
}
.asst-head, .asst-topics, .asst-quick, .asst-form, .asst-foot { flex: 0 0 auto; }
.asst-eyebrow { display: block; margin-bottom: .25rem; color: #ebc85c; font-size: .64rem; font-weight: 800; letter-spacing: .13em; }
.asst-head h4 { margin: 0; font-size: 1.18rem; font-weight: 800; letter-spacing: -.015em; }
.asst-head p  { margin: .3rem 0 0; max-width: 35ch; font-size: .8rem; opacity: .94; line-height: 1.45; }

.asst-topics {
    display: flex;
    flex-wrap: wrap;
    gap: .35rem;
    padding: .65rem .7rem .5rem;
    background: #f5f8f8;
}
.asst-topics button {
    flex: none;
    border: 1px solid #cfdadd;
    border-radius: 999px;
    padding: .38rem .62rem;
    background: #fff;
    color: #244653;
    font: inherit;
    font-size: .7rem;
    font-weight: 700;
    cursor: pointer;
}
.asst-topics button[aria-selected="true"] { border-color: #0d6471; background: #0d6471; color: #fff; }
.asst-topics button:focus-visible,
.asst-chip:focus-visible { outline: 2px solid #c9a227; outline-offset: 2px; }

.asst-quick {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: .45rem;
    padding: .2rem .7rem .7rem;
    background: #f5f8f8;
    border-bottom: 1px solid rgba(7, 46, 60, .1);
}
.asst-quick.is-answered { display: none; }
.asst-chip {
    min-height: 2.55rem;
    padding: .48rem .58rem;
    border: 1px solid #d6e0e2;
    border-radius: 10px;
    background: #fff;
    color: #173b48;
    text-align: left;
    font: inherit;
    font-size: .72rem;
    font-weight: 650;
    line-height: 1.3;
    cursor: pointer;
}
.asst-chip:hover { border-color: #c9a227; box-shadow: 0 3px 10px rgba(7, 46, 60, .08); }

.asst-log {
    flex: 1 1 auto;
    min-height: 3rem;
    overflow-y: auto;
    padding: .85rem;
    display: flex;
    flex-direction: column;
    gap: .5rem;
    background: #fbfcfc;
}
.asst-msg {
    max-width: 88%;
    padding: .5rem .7rem;
    border-radius: 12px;
    font-size: .86rem;
    line-height: 1.5;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}
.asst-you { align-self: flex-end; background: #0d6471; color: #fff; border-bottom-right-radius: 4px; }
.asst-bot { align-self: flex-start; background: #fff; border: 1px solid rgba(0,0,0,.10); border-bottom-left-radius: 4px; }
.asst-bot a { color: #086474; font-weight: 700; }
.asst-err { align-self: flex-start; background: #fdecea; border: 1px solid #f5c2bd; color: #8a2a1f; border-bottom-left-radius: 4px; }

.asst-consent {
    align-self: stretch;
    padding: .78rem;
    border: 1px solid rgba(13, 100, 113, .24);
    border-radius: 14px;
    background: linear-gradient(145deg, #f5fbfb, #fffaf0);
    box-shadow: 0 8px 24px rgba(7, 46, 60, .09);
    color: #173b48;
}
.asst-consent strong { display: block; margin-bottom: .3rem; font-size: .9rem; color: #082839; }
.asst-consent p { margin: 0; font-size: .76rem; line-height: 1.5; color: #455d65; }
.asst-consent-actions { display: flex; flex-wrap: wrap; gap: .45rem; margin-top: .65rem; }
.asst-consent-actions button {
    min-height: 2.25rem;
    padding: .45rem .68rem;
    border-radius: 8px;
    font: inherit;
    font-size: .75rem;
    font-weight: 750;
    cursor: pointer;
}
.asst-consent-accept { border: 1px solid #0d6471; background: #0d6471; color: #fff; }
.asst-consent-cancel { border: 1px solid #cfdadd; background: #fff; color: #244653; }
.asst-consent-actions button:focus-visible { outline: 2px solid #c9a227; outline-offset: 2px; }

.asst-form { display: flex; gap: .4rem; padding: .6rem; border-top: 1px solid rgba(0,0,0,.10); background: #fff; }
.asst-form input {
    flex: 1 1 auto; min-width: 0;
    padding: .5rem .6rem;
    border: 1px solid rgba(0,0,0,.18);
    border-radius: 8px;
    font: inherit; font-size: .86rem;
}
.asst-form input:focus-visible { outline: 2px solid var(--asst-accent, #C9A227); outline-offset: 1px; }
.asst-form button {
    flex: none;
    padding: .5rem .8rem;
    border: 0; border-radius: 8px;
    background: #0d6471;
    color: #fff; font: inherit; font-size: .84rem; font-weight: 600;
    cursor: pointer;
}
.asst-form button[disabled] { opacity: .55; cursor: default; }

/* The disclosure. Small, but it never goes away: answers here are
   machine-written and the written policy is what actually governs. */
.asst-foot {
    padding: .5rem .7rem .65rem;
    font-size: .73rem;
    line-height: 1.45;
    color: #5b5b60;
    background: #fff;
    border-top: 1px solid rgba(0,0,0,.06);
}
.asst-foot a { color: #086474; font-weight: 700; }

@media (prefers-reduced-motion: reduce) {
    .asst-toggle { transition: none; }
    .asst-toggle:hover, .asst-toggle:focus-visible { transform: none; }
}

@media (max-width: 480px) {
    .asst-root { right: .75rem; bottom: .75rem; }
    .asst-panel {
        width: calc(100vw - 1.5rem);
        height: calc(100vh - 4.75rem);
        height: calc(100dvh - 4.75rem);
        max-height: calc(100vh - 4.75rem);
        max-height: calc(100dvh - 4.75rem);
    }
    .asst-quick { grid-template-columns: 1fr; }
}
