.va-root {
    position: fixed;
    right: 20px;
    bottom: 20px;
    z-index: 80;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 12px;
    max-width: calc(100vw - 24px);
    font-size: 15px;
    pointer-events: none;
}
.va-root button,
.va-root form,
.va-panel,
.va-teaser { pointer-events: auto; }
.va-bubble {
    width: 56px;
    height: 56px;
    border: 0;
    border-radius: 50%;
    background: var(--accent);
    color: #1b1b1b;
    box-shadow: 0 10px 28px rgba(20, 24, 31, .18);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}
.va-bubble:hover { background: var(--accent-hover); }
.va-bubble svg { width: 26px; height: 26px; }
.va-root.is-open .va-bubble,
.va-root.is-open .va-teaser { display: none; }
.va-teaser {
    width: min(280px, calc(100vw - 32px));
    background: var(--paper);
    color: var(--ink);
    border: 1px solid #f3e3a0;
    border-radius: 18px;
    box-shadow: 0 16px 40px rgba(20, 24, 31, .14);
    padding: 16px 16px 14px;
    position: relative;
}
.va-teaser::after {
    content: "";
    position: absolute;
    right: 21px;
    bottom: -7px;
    width: 12px;
    height: 12px;
    background: var(--paper);
    border-right: 1px solid #f3e3a0;
    border-bottom: 1px solid #f3e3a0;
    transform: rotate(45deg);
}
.va-teaser.is-hidden { display: none; }
.va-teaser-x {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 28px;
    height: 28px;
    border: 0;
    border-radius: 50%;
    background: var(--soft);
    color: var(--ink-2);
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
}
.va-teaser-x:hover { background: var(--line); color: var(--ink); }
.va-teaser-lead {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding-right: 28px;
}
.va-teaser-face {
    flex: 0 0 auto;
    width: 36px;
    height: 36px;
    margin-top: 1px;
    border-radius: 50%;
    background: var(--accent);
    color: #1b1b1b;
    display: flex;
    align-items: center;
    justify-content: center;
}
.va-teaser-face svg { width: 22px; height: 22px; }
.va-teaser strong {
    display: block;
    font-size: 16px;
    line-height: 1.3;
}
.va-teaser p {
    margin: 6px 0 0;
    color: var(--ink-2);
    font-size: 14px;
    line-height: 1.45;
}
.va-teaser-open {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 42px;
    margin-top: 14px;
    border: 0;
    border-radius: 12px;
    background: var(--accent);
    color: #1b1b1b;
    box-shadow: 0 6px 18px rgba(255, 210, 31, .35);
    font: inherit;
    font-weight: 650;
    font-size: 15px;
    cursor: pointer;
}
.va-teaser-open:hover { background: var(--accent-hover); }
.va-panel {
    display: none;
    flex-direction: column;
    width: min(380px, calc(100vw - 24px));
    height: min(560px, calc(100vh - 96px));
    background: var(--paper);
    color: var(--ink);
    border: 1px solid var(--line);
    border-radius: 18px;
    box-shadow: var(--shadow);
    overflow: hidden;
}
.va-root.is-open .va-panel { display: flex; }
.va-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 14px 12px;
    background: var(--accent);
    color: #1b1b1b;
    border-bottom: 0;
}
.va-head p { margin: 0; font-weight: 750; }
.va-head span { display: block; margin-top: 2px; font-size: 12px; font-weight: 550; opacity: .72; }
.va-x:hover { background: rgba(27, 27, 27, .08); }
.va-x {
    width: 32px;
    height: 32px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: inherit;
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
}
.va-msgs {
    flex: 1 1 auto;
    min-height: 0;
    overflow: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    padding: 14px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    background: var(--bg);
}
.va-msg {
    max-width: 92%;
    padding: 10px 12px;
    border-radius: 14px;
    line-height: 1.45;
    font-size: 14px;
    word-break: break-word;
}
.va-msg--bot { align-self: flex-start; background: var(--soft); border-bottom-left-radius: 4px; }
.va-msg--user { align-self: flex-end; background: var(--ink); color: var(--bg); border-bottom-right-radius: 4px; }
.va-msg a { font-weight: 700; }
.va-thinking {
    display: flex;
    align-items: center;
    gap: 10px;
    align-self: flex-start;
    width: fit-content;
    max-width: calc(100% - 28px);
    margin: 0 14px 10px;
    padding: 10px 14px;
    border-radius: 14px 14px 14px 4px;
    background: var(--soft);
    color: var(--ink-2);
    font-size: 14px;
}
.va-dots { display: inline-flex; gap: 4px; }
.va-dots i {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--ink-3);
    animation: va-dot 1.05s infinite ease-in-out;
}
.va-dots i:nth-child(2) { animation-delay: .15s; }
.va-dots i:nth-child(3) { animation-delay: .3s; }
@keyframes va-dot {
    0%, 70%, 100% { transform: translateY(0); opacity: .35; }
    35% { transform: translateY(-3px); opacity: 1; }
}
.va-suggests { display: flex; flex-wrap: wrap; gap: 8px; padding: 0 14px 14px; background: var(--bg); }
.va-suggests button {
    border: 0;
    background: var(--accent);
    color: #1b1b1b;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(255, 210, 31, .35);
    font: inherit;
    font-size: 14px;
    font-weight: 650;
    line-height: 1.3;
    padding: 9px 12px;
    cursor: pointer;
}
.va-suggests button:hover { background: var(--accent-hover); }
.va-form {
    display: flex;
    gap: 8px;
    align-items: flex-end;
    padding: 10px 12px 8px;
    border-top: 1px solid var(--line);
    background: var(--paper);
}
.va-form textarea {
    flex: 1;
    resize: none;
    min-height: 42px;
    max-height: 96px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: var(--bg);
    color: var(--ink);
    font: inherit;
    font-size: 15px;
    padding: 9px 10px;
}
.va-form textarea:focus { outline: 2px solid var(--accent); border-color: transparent; }
.va-send {
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 12px;
    background: var(--accent);
    color: #1b1b1b;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}
.va-send:disabled { opacity: .55; cursor: default; }
.va-send svg { width: 18px; height: 18px; }
.va-human {
    margin: 0;
    padding: 0 12px 12px;
    text-align: center;
    font-size: 13px;
    color: var(--ink-2);
    background: var(--paper);
}
.va-human-open {
    border: 0;
    padding: 0;
    background: none;
    color: #1a6dd8;
    font: inherit;
    font-weight: 700;
    cursor: pointer;
}
.va-human-open:hover { text-decoration: underline; }
.va-panel.is-mail { height: auto; }
.va-panel.is-mail .va-msgs,
.va-panel.is-mail .va-suggests,
.va-panel.is-mail .va-form,
.va-panel.is-mail .va-human,
.va-panel.is-mail .va-thinking { display: none !important; }
.va-mail {
    display: flex;
    flex: none;
    flex-direction: column;
    gap: 10px;
    padding: 14px;
    background: var(--paper);
}
.va-mail-lead { margin: 0 0 2px; color: var(--ink-2); font-size: 13px; line-height: 1.45; }
.va-mail label { display: grid; gap: 5px; }
.va-cap {
    display: block;
    margin: 0;
    font-size: 13px;
    font-weight: 650;
    line-height: 1.3;
    letter-spacing: 0;
    color: var(--ink);
}
.va-cap--q { font-size: 14.5px; }
.va-mail-switch { display: flex; gap: 6px; }
.va-mail-switch button {
    flex: 1;
    height: 36px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: var(--bg);
    color: var(--ink);
    font: inherit;
    font-size: 13px;
    font-weight: 650;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
}
.va-mail-switch button svg {
    width: 16px;
    height: 16px;
    flex: 0 0 auto;
    display: block;
}
.va-mail-switch button.is-on { background: var(--accent); color: #1b1b1b; border-color: transparent; }
.va-mail-phone { display: grid; gap: 5px; position: relative; }
.va-phone {
    display: flex;
    align-items: stretch;
    gap: 0;
    min-height: 42px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: var(--bg);
    overflow: hidden;
}
.va-phone:focus-within {
    outline: 2px solid var(--accent);
    border-color: transparent;
}
.va-phone:has(.is-invalid) {
    border-color: #d92d20;
    background: #fff6f6;
}
.va-phone:has(.is-invalid):focus-within {
    outline-color: #d92d20;
}
.va-dial {
    display: flex;
    align-items: center;
    gap: 6px;
    flex: 0 0 auto;
    height: auto;
    min-height: 42px;
    margin: 0;
    padding: 0 10px;
    border: 0;
    border-right: 1px solid var(--line);
    border-radius: 0;
    background: transparent;
    color: var(--ink);
    font: inherit;
    font-weight: 650;
    cursor: pointer;
    white-space: nowrap;
}
.va-dial:hover { background: rgba(20, 24, 31, .04); }
.va-phone input {
    flex: 1;
    min-width: 0;
    height: auto;
    min-height: 42px;
    margin: 0;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    outline: none !important;
}
.va-phone input:focus { outline: none !important; }
.va-dial.is-invalid,
.va-phone input.is-invalid {
    border-color: transparent;
    background: transparent;
}
.va-dial-pop {
    position: absolute;
    z-index: 2;
    left: 0;
    right: 0;
    top: calc(100% + 6px);
    display: grid;
    gap: 6px;
    padding: 8px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: var(--paper);
    box-shadow: var(--shadow);
}
.va-dial-pop.is-placed {
    position: fixed;
    z-index: 30;
    right: auto;
    margin: 0;
}
.va-dial-pop input { width: 100%; }
#va-dial-list {
    max-height: 180px;
    overflow: auto;
    overscroll-behavior: contain;
}
.va-dial-opt {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    padding: 7px 6px;
    border: 0;
    border-radius: 8px;
    background: none;
    color: var(--ink);
    font: inherit;
    font-size: 14px;
    text-align: left;
    cursor: pointer;
}
.va-dial-opt.is-on,
.va-dial-opt:hover { background: var(--soft); }
.va-dial-opt b { margin-left: auto; font-weight: 650; }
.va-mail input,
.va-mail textarea {
    width: 100%;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: var(--bg);
    color: var(--ink);
    font: inherit;
    font-size: 15px;
    font-weight: 500;
    padding: 9px 10px;
}
.va-mail input::placeholder,
.va-mail textarea::placeholder { color: #8a8478; font-weight: 450; }
.va-mail textarea { height: 96px; min-height: 96px; max-height: 240px; resize: vertical; }
.va-mail input:focus,
.va-mail textarea:focus { outline: 2px solid var(--accent); border-color: transparent; }
.va-mail input.is-invalid,
.va-mail textarea.is-invalid { border-color: #d92d20; background: #fff6f6; }
.va-mail input.is-invalid:focus,
.va-mail textarea.is-invalid:focus { outline-color: #d92d20; }
.va-hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.va-mail-status { margin: 0; font-size: 13px; color: var(--ink-2); }
.va-mail-actions { display: flex; gap: 8px; }
.va-mail-back,
.va-mail-send {
    flex: 1;
    height: 42px;
    border-radius: 12px;
    font: inherit;
    font-weight: 650;
    cursor: pointer;
}
.va-mail-back { border: 1px solid var(--line); background: var(--paper); color: var(--ink); }
.va-mail-back:hover { background: var(--soft); }
.va-mail-send {
    border: 0;
    background: var(--accent);
    color: #1b1b1b;
    box-shadow: 0 6px 18px rgba(255, 210, 31, .35);
}
.va-mail-send:hover { background: var(--accent-hover); }
.va-mail-send:disabled { opacity: .55; cursor: default; }
@media (max-width: 640px) {
    .va-root { right: 12px; bottom: 12px; }
    .va-panel { height: min(70vh, 560px); }

    /* Open chat = full screen; only the message list scrolls. */
    html.va-chat-open,
    html.va-chat-open body {
        overflow: hidden !important;
        overscroll-behavior: none;
        height: 100%;
    }
    .va-root.is-open {
        position: fixed !important;
        inset: 0 !important;
        right: 0 !important;
        bottom: 0 !important;
        left: 0 !important;
        top: 0 !important;
        width: 100% !important;
        max-width: none !important;
        height: 100% !important;
        height: 100dvh !important;
        margin: 0 !important;
        gap: 0;
        align-items: stretch;
        pointer-events: auto;
        z-index: 200;
    }
    .va-root.is-open .va-teaser,
    .va-root.is-open .va-bubble {
        display: none !important;
    }
    .va-root.is-open .va-panel {
        display: flex !important;
        width: 100% !important;
        max-width: none !important;
        height: 100% !important;
        max-height: none !important;
        min-height: 0;
        border: 0 !important;
        border-radius: 0 !important;
        box-shadow: none !important;
    }
    .va-root.is-open .va-panel.is-mail {
        height: 100% !important;
    }
    .va-root.is-open .va-head {
        flex: 0 0 auto;
        padding-top: calc(14px + env(safe-area-inset-top, 0px));
    }
    .va-root.is-open .va-msgs {
        flex: 1 1 auto;
        min-height: 0;
        overscroll-behavior: contain;
        -webkit-overflow-scrolling: touch;
    }
    .va-root.is-open .va-suggests,
    .va-root.is-open .va-form,
    .va-root.is-open .va-human,
    .va-root.is-open .va-thinking {
        flex: 0 0 auto;
    }
    .va-root.is-open .va-form {
        padding-bottom: calc(8px + env(safe-area-inset-bottom, 0px));
    }
    .va-root.is-open .va-human {
        padding-bottom: calc(12px + env(safe-area-inset-bottom, 0px));
    }
    .va-root.is-open .va-panel.is-mail .va-mail {
        flex: 1 1 auto;
        min-height: 0;
        overflow: auto;
        overscroll-behavior: contain;
        -webkit-overflow-scrolling: touch;
        padding-bottom: calc(14px + env(safe-area-inset-bottom, 0px));
    }
    .va-root.is-open .va-panel.is-mail .va-human {
        padding-bottom: 12px;
    }
}
@media (prefers-reduced-motion: reduce) {
    .va-teaser { animation: none; }
    .va-dots i { animation: none; opacity: .7; }
}
html[data-bs-theme="dark"] .va-teaser,
html[data-bs-theme="dark"] .va-teaser::after { border-color: #3a3420; }
html[data-bs-theme="dark"] .va-head,
html[data-bs-theme="dark"] .va-teaser-open,
html[data-bs-theme="dark"] .va-teaser-face,
html[data-bs-theme="dark"] .va-suggests button,
html[data-bs-theme="dark"] .va-mail-send { color: #1b1b1b; }
html[data-bs-theme="dark"] .va-human-open { color: #8eb7ff; }
html[data-bs-theme="dark"] .va-mail input.is-invalid,
html[data-bs-theme="dark"] .va-mail textarea.is-invalid { background: #3a2020; }
html[data-bs-theme="dark"] .va-phone:has(.is-invalid) { background: #3a2020; }
html[data-bs-theme="dark"] .va-dial:hover { background: rgba(255, 255, 255, .06); }
html[data-bs-theme="dark"] .va-dial { border-right-color: var(--line); }
html[data-bs-theme="dark"] .va-mail-switch button.is-on { color: #1b1b1b; }
html[data-bs-theme="dark"] .va-mail input::placeholder,
html[data-bs-theme="dark"] .va-mail textarea::placeholder { color: #b7b1a4; }
@media print {
    .va-root { display: none; }
}
