/* ============================================================
   Marketing-site assistant — floating button + panel.
   Built on the landing page's own tokens (--accent, --ink, --line,
   --surface, --r-*) so it reads as part of the site rather than a
   widget dropped on top of it.
   ============================================================ */

.lc-root { position: fixed; inset: auto 0 0 auto; z-index: 900; }

/* ── the button ───────────────────────────────────────────── */
.lc-fab {
    position: fixed; right: 20px; bottom: 20px;
    width: 52px; height: 52px; border-radius: 50%;
    border: none; cursor: pointer;
    background: var(--accent, #0f766e);
    color: #fff; font-size: 1.15rem; line-height: 1;
    display: flex; align-items: center; justify-content: center;
    box-shadow: 0 10px 26px rgba(15, 42, 43, .28), 0 2px 6px rgba(15, 42, 43, .18);
    transition: transform .22s cubic-bezier(.34,1.56,.64,1), background .2s, box-shadow .2s;
}
.lc-fab:hover  { background: var(--accent-2, #12a594); transform: translateY(-2px); }
.lc-fab:active { transform: translateY(0) scale(.96); }
.lc-fab:focus-visible { outline: 3px solid var(--accent-3, #2dd4bf); outline-offset: 3px; }

/* One button, two icons — crossfaded so it never looks like two controls. */
.lc-fab i { position: absolute; transition: opacity .18s, transform .18s; }
.lc-fab .lc-fab-close { opacity: 0; transform: rotate(-90deg) scale(.7); }
.lc-fab.is-open .lc-fab-open  { opacity: 0; transform: rotate(90deg) scale(.7); }
.lc-fab.is-open .lc-fab-close { opacity: 1; transform: none; }

/* A single attention pulse on the ring, not the button: a button that keeps
   moving is the thing people close without reading. */
.lc-fab::after {
    content: ''; position: absolute; inset: -4px; border-radius: 50%;
    border: 2px solid var(--accent, #0f766e); opacity: 0;
    animation: lcPing 3.4s ease-out 1.5s 3;
}
@keyframes lcPing {
    0%   { opacity: .5; transform: scale(1); }
    70%  { opacity: 0;  transform: scale(1.35); }
    100% { opacity: 0;  transform: scale(1.35); }
}

/* ── the panel ────────────────────────────────────────────── */
.lc-panel {
    position: fixed; right: 20px; bottom: 90px;
    width: min(360px, calc(100vw - 32px));
    height: min(560px, calc(100vh - 130px));
    display: flex; flex-direction: column; overflow: hidden;
    background: var(--surface, #fff);
    border: 1px solid var(--line, rgba(27,44,49,.1));
    border-radius: var(--r-lg, 20px);
    box-shadow: 0 24px 60px rgba(15, 42, 43, .22), 0 4px 12px rgba(15, 42, 43, .1);
    opacity: 0; visibility: hidden; transform: translateY(12px) scale(.98);
    transform-origin: bottom right;
    transition: opacity .2s, transform .24s cubic-bezier(.16,1,.3,1), visibility .24s;
}
.lc-panel.is-open { opacity: 1; visibility: visible; transform: none; }

.lc-head {
    display: flex; align-items: center; justify-content: space-between; gap: 10px;
    padding: 11px 14px;
    background: var(--accent, #0f766e); color: #fff;
}
.lc-head-id { display: flex; align-items: center; gap: 10px; min-width: 0; }
.lc-dot {
    width: 9px; height: 9px; border-radius: 50%; background: #4ade80; flex: none;
    box-shadow: 0 0 0 3px rgba(74, 222, 128, .25);
}
.lc-title { font-weight: 800; font-size: .84rem; letter-spacing: -.01em; }
.lc-sub   { font-size: .66rem; opacity: .8; margin-top: 1px; }
.lc-x {
    background: rgba(255,255,255,.14); border: none; color: #fff; cursor: pointer;
    width: 27px; height: 27px; border-radius: 8px; flex: none;
    display: flex; align-items: center; justify-content: center; font-size: .72rem;
    transition: background .18s;
}
.lc-x:hover { background: rgba(255,255,255,.26); }

.lc-log {
    flex: 1; overflow-y: auto; padding: 13px 12px;
    display: flex; flex-direction: column; gap: 8px;
    background: var(--surface-2, #fbfaf6);
    overscroll-behavior: contain;
}
.lc-msg { display: flex; }
.lc-msg-you { justify-content: flex-end; }
.lc-bubble {
    max-width: 86%; padding: 8px 11px; border-radius: 14px;
    font-size: .78rem; line-height: 1.5; color: var(--ink, #000);
}
.lc-msg-bot .lc-bubble {
    background: var(--surface, #fff);
    border: 1px solid var(--line, rgba(27,44,49,.1));
    border-bottom-left-radius: 5px;
}
.lc-msg-you .lc-bubble {
    background: var(--accent, #0f766e); color: #fff;
    border-bottom-right-radius: 5px;
}
.lc-bubble p { margin: 0 0 6px; }
.lc-bubble p:last-child { margin-bottom: 0; }
.lc-bubble b, .lc-bubble strong { font-weight: 800; }

/* Suggested follow-ups. Also the whole interface for someone who would rather
   tap than type, which on a phone is most people. */
.lc-chips { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 8px; }
.lc-chip {
    background: var(--accent-soft, #e2f5f1);
    color: var(--accent-ink, #0a5c55);
    border: 1px solid transparent;
    border-radius: 999px; padding: 5px 9px;
    font: inherit; font-size: .7rem; font-weight: 700;
    cursor: pointer; text-align: left; line-height: 1.35;
    transition: background .16s, border-color .16s;
}
.lc-chip:hover { background: #fff; border-color: var(--accent, #0f766e); }

.lc-handoff { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.lc-cta {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 7px 11px; border-radius: 999px; text-decoration: none;
    font-size: .72rem; font-weight: 800;
    background: #25d366; color: #fff;
}
.lc-cta-quiet {
    background: var(--surface-2, #fbfaf6); color: var(--ink-2, #33474d);
    border: 1px solid var(--line, rgba(27,44,49,.1));
}

.lc-typing { display: flex; gap: 4px; padding: 0 22px 10px; background: var(--surface-2, #fbfaf6); }
.lc-typing span {
    width: 6px; height: 6px; border-radius: 50%; background: var(--muted, #525f63);
    animation: lcType 1.2s ease-in-out infinite;
}
.lc-typing span:nth-child(2) { animation-delay: .15s; }
.lc-typing span:nth-child(3) { animation-delay: .3s; }
@keyframes lcType { 0%,100% { opacity: .25; transform: translateY(0); } 40% { opacity: 1; transform: translateY(-3px); } }

.lc-form {
    display: flex; gap: 7px; padding: 10px;
    border-top: 1px solid var(--line, rgba(27,44,49,.1));
    background: var(--surface, #fff);
}
.lc-input {
    /* 16px exactly, and deliberately not smaller. iOS Safari has ignored
       user-scalable=no since iOS 10, and zooms the page whenever a focused
       input is under 16px — so this, not the viewport tag, is what actually
       stops the chat from throwing the layout about when someone types. */
    flex: 1; min-width: 0; font: inherit; font-size: 16px;
    padding: 9px 13px; border-radius: 999px;
    border: 1px solid var(--line, rgba(27,44,49,.1));
    background: var(--surface-2, #fbfaf6); color: var(--ink, #000);
}
.lc-input:focus { outline: none; border-color: var(--accent, #0f766e); background: #fff; }
.lc-send {
    flex: none; width: 36px; height: 36px; border-radius: 50%; border: none;
    background: var(--accent, #0f766e); color: #fff; cursor: pointer; font-size: .85rem;
    display: flex; align-items: center; justify-content: center; transition: background .18s;
}
.lc-send:hover { background: var(--accent-2, #12a594); }

/* On a phone the panel takes the screen: a 390px card floating over a page is
   a desktop idea, and the keyboard would leave almost nothing visible. */
@media (max-width: 560px) {
    .lc-panel {
        right: 8px; left: 8px; bottom: 84px;
        width: auto; height: min(72vh, calc(100vh - 110px));
    }
    .lc-fab { right: 14px; bottom: 14px; width: 48px; height: 48px; }
}

@media (prefers-reduced-motion: reduce) {
    .lc-fab, .lc-fab i, .lc-panel, .lc-typing span { transition: none; animation: none; }
    .lc-fab::after { display: none; }
}
