/* The launcher contains no session data; the private panel loads only on demand. */
.chat-bubble-launcher{position:fixed;right:max(1rem,env(safe-area-inset-right));bottom:max(1rem,env(safe-area-inset-bottom));z-index:900;display:flex;align-items:center;gap:.55rem;padding:.8rem 1.2rem;border-radius:2rem;background:var(--color-brand,#711d63);color:var(--color-paper,#fffdf8);font:700 1.1rem/1.4 system-ui,sans-serif;text-decoration:none;box-shadow:0 3px 14px #0003}
.chat-bubble-launcher:hover{background:var(--color-ink,#101533);color:var(--color-highlight,#ffd447)}.chat-bubble-launcher:focus-visible,.chat-bubble-panel button:focus-visible{outline:3px solid var(--color-focus,#6b24d6);outline-offset:3px}
.chat-bubble-panel{position:fixed;inset:auto max(1rem,env(safe-area-inset-right)) calc(5.5rem + env(safe-area-inset-bottom)) auto;margin:0;padding:0;width:min(390px,calc(100vw - 2rem));height:min(580px,calc(100dvh - 7rem));max-width:none;max-height:none;border:0;border-radius:1rem;background:var(--color-paper,#fffdf8);color:var(--color-ink,#101533);box-shadow:0 8px 36px #0003;z-index:901;font:1rem/1.4 system-ui,sans-serif;overflow:hidden}
.chat-bubble-panel[open]{display:flex;flex-direction:column}.chat-bubble-panel>header{display:flex;align-items:center;justify-content:space-between;padding:.8rem 1rem;background:var(--color-ink,#101533);color:var(--color-paper,#fffdf8)}.chat-bubble-panel button{font:1.8rem/1 system-ui;background:transparent;color:inherit;border:0;min-width:44px;min-height:44px;cursor:pointer}.chat-bubble-frame{flex:1;min-height:0}.chat-bubble-frame iframe{width:100%;height:100%;border:0;display:block}.chat-bubble-panel>footer{padding:.65rem 1rem;border-top:1px solid var(--color-border,#d9d2d7);font-size:.875rem}.chat-bubble-panel footer a{color:var(--color-brand,#711d63)}
.chat-bubble-document{margin:0;font:14px/1.4 system-ui,sans-serif;color:var(--color-ink,#101533);background:var(--color-paper,#fffdf8)}.chat-bubble-document .chatkit-pilot{display:flex;flex-direction:column;min-height:100dvh;padding:.65rem;box-sizing:border-box}.chat-bubble-document openai-chatkit{flex:1 0 auto;height:0;min-height:230px}.chat-bubble-document .visually-hidden{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%)}.chat-bubble-document input,.chat-bubble-document textarea{box-sizing:border-box;width:100%;font:inherit}.chat-bubble-document [type=checkbox]{width:auto}.chat-bubble-document button{min-height:40px;font:inherit}.chat-bubble-document [hidden]{display:none!important}
.chat-bubble-panel--fullscreen {
    inset: var(--chat-bubble-viewport-top, 0px) auto auto var(--chat-bubble-viewport-left, 0px);
    width: var(--chat-bubble-viewport-width, 100%);
    height: var(--chat-bubble-viewport-height, 100dvh);
    box-sizing: border-box;
    border-radius: 0;
    padding-bottom: env(safe-area-inset-bottom);
    overscroll-behavior: none;
    box-shadow: 0 0 0 200vmax var(--color-paper, #fffdf8);
}
.chat-bubble-panel--fullscreen::backdrop {
    background: var(--color-paper, #fffdf8);
}
.chat-bubble-panel--fullscreen > header {
    flex-shrink: 0;
    padding-top: calc(.8rem + env(safe-area-inset-top));
    padding-left: max(1rem, env(safe-area-inset-left));
    padding-right: max(1rem, env(safe-area-inset-right));
}
.chat-bubble-panel--fullscreen > .chat-bubble-frame {
    padding-left: env(safe-area-inset-left);
    padding-right: env(safe-area-inset-right);
}

.chat-bubble-avatar{display:block;flex-shrink:0;color:var(--color-ink,#101533)}
.chat-bubble-panel>header{gap:.75rem}.chat-bubble-panel>header>div{flex:1}.chat-bubble-subtitle{display:block;margin-top:.075rem;color:#e6e2eb;font-size:.8rem;line-height:1.3}.chat-bubble-panel footer a:hover{color:var(--color-ink,#101533)}

.chat-bubble-launcher svg{display:block;flex-shrink:0;color:#fff}
.chat-bubble-icon-desktop mask g{color:#000;--fredi-ball-fill:#fff}
.chat-bubble-launcher .chat-bubble-icon-mobile{display:none;--fredi-ball-fill:transparent}

@media(max-width:600px){
    .chat-bubble-launcher{bottom:max(calc(1rem - 10px),env(safe-area-inset-bottom));height:56px;padding:0 13px;gap:0;font-size:.8125rem}
    .chat-bubble-launcher .chat-bubble-icon-desktop{display:none}
    .chat-bubble-launcher .chat-bubble-icon-mobile{display:block}
    .chat-bubble-launcher>span{
        max-inline-size:8em;margin-inline-start:.55rem;white-space:nowrap;overflow:hidden;
        transition:max-inline-size .23s ease,margin-inline-start .23s ease,opacity .18s ease,transform .23s ease
    }
    .chat-bubble-launcher.is-scrolling>span{max-inline-size:0;margin-inline-start:0;opacity:0;transform:translateX(4px)}
}
@media(prefers-reduced-motion:reduce){
    .chat-bubble-launcher>span{transition:none}
}

.chat-bubble-panel #chat-bubble-close{display:grid;place-items:center;flex-shrink:0;padding:0;width:44px;height:44px}.chat-bubble-panel #chat-bubble-close svg{display:block}

.chat-bubble-panel>header>div{line-height:1.3}.chat-bubble-panel>header strong{display:block;line-height:1.3}

/* Follow-up replaces the panel contents without remounting the conversation. */
.chat-bubble-document .follow-up-open>openai-chatkit,
.chat-bubble-document .follow-up-open>.chatkit-contact-panel,
.chat-bubble-document .follow-up-open>.chatkit-profixio-panel{visibility:hidden}
.chat-bubble-document #chatkit-follow-up{position:fixed;inset:0;z-index:10;overflow-y:auto;overscroll-behavior:contain;box-sizing:border-box;margin:0;padding:1.5rem;background:#fffdf8;color:#101533;display:flex;flex-direction:column;gap:1rem;font:14px/1.5 system-ui,sans-serif}
.chat-bubble-document #chatkit-follow-up h3{margin:0;font-size:1.35rem;line-height:1.25}
.chat-bubble-document #chatkit-follow-up fieldset{margin:0;padding:0;border:0;min-width:0}
.chat-bubble-document #chatkit-follow-up legend{margin-bottom:1rem;font-weight:600}
.chat-bubble-document #chatkit-follow-up .form-field{display:grid;gap:.4rem;margin-bottom:1rem}
.chat-bubble-document #chatkit-follow-up input:not([type=checkbox]),
.chat-bubble-document #chatkit-follow-up textarea{padding:.75rem;border:1px solid #c9c2cc;border-radius:.65rem;background:#fff;color:#101533;font:16px/1.5 system-ui,sans-serif}
.chat-bubble-document #chatkit-follow-up textarea{resize:vertical;min-height:9rem}
.chat-bubble-document #chatkit-follow-up label:has([type=checkbox]){display:flex;align-items:flex-start;gap:.5rem;margin:.75rem 0 1rem}
.chat-bubble-document #chatkit-follow-up [type=checkbox]{flex:none;width:18px;height:18px;margin:.15rem 0;accent-color:#711d63}
.chat-bubble-document #chatkit-follow-up small{color:#4d4960;font-size:.8rem}
.chat-bubble-document #chatkit-follow-up button{display:block;width:100%;padding:.8rem 1rem;margin-top:.75rem;border:1px solid #c9c2cc;border-radius:2rem;background:transparent;color:#101533;cursor:pointer;font:600 14px/1.4 system-ui,sans-serif}
.chat-bubble-document #chatkit-follow-up button.button{background:#711d63;border-color:#711d63;color:#fff}
.chat-bubble-document #chatkit-follow-up button:hover{background:#eee8f1}
.chat-bubble-document #chatkit-follow-up button.button:hover{background:#101533;border-color:#101533}
.chat-bubble-document #chatkit-follow-up button:disabled{opacity:.6;cursor:wait}
.chat-bubble-document #chatkit-follow-up :is(button,input,textarea):focus-visible{outline:3px solid #711d63;outline-offset:3px}
.chat-bubble-document #chatkit-follow-up [data-follow-up-close]{margin-top:auto}
.chat-bubble-document #chatkit-follow-up .follow-up-success{margin:0 0 1.5rem;font-size:1rem;line-height:1.6}
.chat-bubble-document #follow-up-status{margin:0;overflow-wrap:anywhere}

.chat-bubble-document #chatkit-follow-up .follow-up-intro{margin:0 0 1.25rem;color:#4d4960;line-height:1.6}

.chat-bubble-document .chatkit-profixio-panel:not([open]) { display: none; }
.chat-bubble-document .chatkit-profixio-panel { margin-top: .5rem; }
.chat-bubble-document .chatkit-profixio-panel summary { padding: .65rem; cursor: pointer; font-weight: 600; }
.chat-bubble-document .chatkit-profixio-panel fieldset { display: grid; gap: .5rem; margin: 0; padding: .65rem; border: 0; min-width: 0; }
.chat-bubble-document .chatkit-profixio-panel input { padding: .55rem; }
.chat-bubble-document .chatkit-profixio-panel [data-profixio-status]:empty { display: none; }

.chat-bubble-document .chatkit-pilot:has(> .chatkit-profixio-panel--mobile[open]) > openai-chatkit {
    visibility: hidden;
}
.chat-bubble-document .chatkit-profixio-panel--mobile[open] {
    position: fixed;
    inset: 0;
    z-index: 9;
    box-sizing: border-box;
    margin: 0;
    padding: 1rem;
    background: var(--color-paper, #fffdf8);
    overflow-y: auto;
    overscroll-behavior: contain;
}
.chat-bubble-document .chatkit-profixio-panel--mobile input { font-size: 16px; }
.chat-bubble-document .chatkit-profixio-panel--mobile [data-profixio-done] { margin: .75rem .65rem 0; }
