/* VRTX Chat Assistant 0.5.2 — scoped CSS only */
.vrtx-chat-launcher {
    --vrtx-chat-bg: #e50058;
    --vrtx-chat-fg: #fff;
    --vrtx-chat-border: #fff;
    --vrtx-chat-hover: #fa7900;
    --vrtx-chat-bottom: 24px;
    --vrtx-chat-edge: 24px;
    position: fixed;
    bottom: calc(var(--vrtx-chat-bottom) + env(safe-area-inset-bottom, 0px));
    z-index: 999;
    width: max-content;
    max-width: calc(100vw - 24px);
    pointer-events: none;
    box-sizing: border-box;
    font-family: inherit;
    line-height: 1.25;
}
.vrtx-chat-launcher--right { right: calc(var(--vrtx-chat-edge) + env(safe-area-inset-right, 0px)); }
.vrtx-chat-launcher--left { left: calc(var(--vrtx-chat-edge) + env(safe-area-inset-left, 0px)); }
.vrtx-chat-launcher *, .vrtx-chat-launcher *::before, .vrtx-chat-launcher *::after { box-sizing: border-box; }
.vrtx-chat-launcher__link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 54px;
    min-width: 54px;
    max-width: 100%;
    border: 2px solid var(--vrtx-chat-border);
    padding: 12px 18px;
    border-radius: 999px;
    background: var(--vrtx-chat-bg);
    color: var(--vrtx-chat-fg);
    text-decoration: none;
    font: inherit;
    font-size: 15px;
    font-weight: 700;
    white-space: normal;
    box-shadow: 0 8px 28px rgba(24, 29, 42, .24);
    pointer-events: auto;
    cursor: pointer;
    transition: transform .18s ease, box-shadow .18s ease, background-color .18s ease;
}
.vrtx-chat-launcher__link:hover {
    background: var(--vrtx-chat-hover);
    color: var(--vrtx-chat-fg);
    transform: translateY(-2px);
    box-shadow: 0 11px 33px rgba(24,29,42,.28);
    text-decoration: none;
}
.vrtx-chat-launcher__link:focus-visible {
    outline: 3px solid #172a3a;
    outline-offset: 3px;
    box-shadow: 0 0 0 5px #fff;
}
.vrtx-chat-launcher__icon, .vrtx-chat-launcher__img {
    flex: 0 0 24px;
    width: 24px;
    height: 24px;
    object-fit: contain;
}
.vrtx-chat-launcher__label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 240px; }
.vrtx-chat-launcher--static .vrtx-chat-launcher__link { transition: none; }
.vrtx-chat-launcher--static .vrtx-chat-launcher__link:hover { transform: none; }
@media (max-width: 600px) {
    .vrtx-chat-launcher { max-width: calc(100vw - 24px); }
    .vrtx-chat-launcher--right { right: min(var(--vrtx-chat-edge), 24px); }
    .vrtx-chat-launcher--left { left: min(var(--vrtx-chat-edge), 24px); }
    .vrtx-chat-launcher__label { max-width: min(170px, calc(100vw - 112px)); }
    .vrtx-chat-launcher__link { padding: 11px 13px; min-height: 48px; font-size: 13px; gap: 7px; }
    .vrtx-chat-launcher__icon, .vrtx-chat-launcher__img { width: 21px; height: 21px; flex-basis: 21px; }
}
@media (prefers-reduced-motion: reduce) {
    .vrtx-chat-launcher__link { transition: none !important; }
    .vrtx-chat-launcher__link:hover { transform: none !important; }
}
/* Integrated chat interface: all selectors scoped; does not affect WordPress theme. */
.vrtx-chat-launcher__link[aria-expanded] { appearance:none; }
.vrtx-chat-launcher [hidden] { display:none !important; }
.vrtx-chat-panel {
    position:absolute; bottom:calc(100% + 12px); width:min(388px, calc(100vw - 24px));
    height:min(565px, calc(100dvh - 125px)); min-height:260px; display:flex; flex-direction:column;
    background:#fff; color:#20252b; border:1px solid #eee; border-radius:18px;
    box-shadow:0 16px 55px rgba(0,0,0,.21); overflow:hidden; pointer-events:auto;
    font-family:inherit; font-size:14px; font-weight:400; line-height:1.45; white-space:normal;
}
.vrtx-chat-launcher--left .vrtx-chat-panel { left:0; }
.vrtx-chat-launcher--right .vrtx-chat-panel { right:0; }
.vrtx-chat-panel__header { display:flex; justify-content:space-between; align-items:center; padding:14px 16px;
    background:linear-gradient(110deg, #e50058, #fa7900); color:#fff; }
.vrtx-chat-panel__header strong, .vrtx-chat-panel__header small { display:block; color:#fff; }
.vrtx-chat-panel__header strong { font-size:16px; }
.vrtx-chat-panel__header small { font-size:11px; opacity:.9; }
.vrtx-chat-panel__close { font:inherit; font-size:27px; line-height:1; background:transparent!important; padding:4px;
    border:0!important; color:#fff!important; cursor:pointer; }
.vrtx-chat-panel__messages { flex:1; overflow-y:auto; padding:14px; overscroll-behavior:contain; }
.vrtx-chat-bubble { width:fit-content; max-width:94%; margin:0 0 12px!important; border-radius:14px;
    padding:10px 12px; white-space:pre-wrap; overflow-wrap:anywhere; font:inherit; line-height:1.5; }
.vrtx-chat-bubble--assistant { background:#f5f2f4; color:#293039; border-bottom-left-radius:3px; }
.vrtx-chat-bubble--user { background:#e50058; color:#fff; border-bottom-right-radius:3px; margin-left:auto!important; }
.vrtx-chat-panel__sources { max-height:105px; overflow-y:auto; border-top:1px solid #eee; padding:8px 13px; }
.vrtx-chat-panel__sources strong { display:block; margin-bottom:3px; font-size:11px; }
.vrtx-chat-panel__sources a { display:block; font-size:11px; padding:2px 0; text-decoration:underline; color:#a00046; }
.vrtx-chat-panel__form { padding:8px 12px 0; margin:0!important; border-top:1px solid #eee; background:#fff; }
.vrtx-chat-panel__form label { display:block; font-size:12px; font-weight:700; margin-bottom:5px; }
.vrtx-chat-panel__inputrow { display:flex; gap:6px; align-items:stretch; }
.vrtx-chat-panel__inputrow input { flex:1; min-width:0; font:inherit; color:#222; background:#fff; border:1px solid #aaa; border-radius:9px; padding:9px; }
.vrtx-chat-panel__inputrow button { border:0; border-radius:9px; background:#e50058; color:#fff; padding:10px 12px; font:inherit; font-weight:700; cursor:pointer; }
.vrtx-chat-panel__inputrow button:disabled { opacity:.6; cursor:wait; }
.vrtx-chat-panel__notice { background:#fff; color:#62676c; font-size:10px; line-height:1.35; padding:6px 12px 10px; margin:0!important; }
.vrtx-chat-panel button:focus-visible,.vrtx-chat-panel input:focus-visible { outline:2px solid #fa7900; outline-offset:2px; }
@media(max-width:600px) {
 .vrtx-chat-panel { width:calc(100vw - 24px); height:min(75dvh, 570px); }
}
/* v0.3.0 continuity and navigation */
.vrtx-chat-panel__tools{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:6px 12px;background:#fff7f8;border-bottom:1px solid #f3e3e7;font-size:11px;color:#63535a}
.vrtx-chat-panel__tools button{background:transparent;border:0;text-decoration:underline;font-size:11px;cursor:pointer;color:#9c0039;padding:2px}
.vrtx-chat-panel__consent{display:flex;gap:6px;align-items:center;padding:6px 12px;font-size:11px;background:#fff;border-bottom:1px solid #eee;line-height:1.3}
.vrtx-chat-panel__consent input{accent-color:#e50058;flex:none}
.vrtx-chat-panel__sources{max-height:160px}
.vrtx-chat-panel__sourceitem{border-bottom:1px solid #f1edf0;padding:4px 0 7px}
.vrtx-chat-panel__sourceactions{display:flex;gap:8px;flex-wrap:wrap}
.vrtx-chat-panel__sourceactions a{font-weight:700;background:#fff0f3;border-radius:7px;padding:4px 6px;text-decoration:none}
.vrtx-chat-panel__sourceactions a:hover{background:#ffe1e8}
.vrtx-chat-bubble a{color:#a00046;text-decoration:underline;font-weight:600}
/* v0.4.0 — cards appear alongside their answers, not in a detached source scroller. */
.vrtx-chat-panel { width:min(440px,calc(100vw - 24px)); height:min(650px,calc(100dvh - 112px)); }
.vrtx-chat-panel__messages { padding:15px 13px 20px; min-height:0; overflow-y:auto; display:block; }
.vrtx-chat-panel__sources { display:none !important; }
.vrtx-chat-answer { margin:0 0 15px; max-width:100%; }
.vrtx-chat-answer--user { display:flex; flex-direction:column; align-items:flex-end; }
.vrtx-chat-answer--assistant { display:flex; flex-direction:column; align-items:flex-start; }
.vrtx-chat-answer .vrtx-chat-bubble { margin:0!important; max-width:97%; width:auto; font-size:14px; line-height:1.55; white-space:pre-wrap; }
.vrtx-chat-answer--user .vrtx-chat-bubble { max-width:90%; }
.vrtx-chat-bubble a { color:#a1004b; text-decoration:underline; font-weight:700; overflow-wrap:anywhere; }
.vrtx-chat-citation { border-radius:3px; padding:0 2px; background:#fff1f5; }
.vrtx-chat-answer__cards { margin-top:8px; width:100%; display:grid; gap:8px; }
.vrtx-chat-answer__cards-title { color:#6d5660; font-size:11px; font-weight:700; }
.vrtx-chat-answer__card { border:1px solid #f0e0e7; background:#fff; border-radius:12px; padding:10px; display:flex; flex-direction:column; gap:5px; box-shadow:0 2px 8px rgba(47,31,39,.04); }
.vrtx-chat-answer__card-title { font-size:13px; color:#952047; text-decoration:underline; font-weight:700; line-height:1.35; }
.vrtx-chat-answer__card-meta { color:#555f67; font-size:11px; line-height:1.45; }
.vrtx-chat-answer__actions { display:flex; gap:5px; flex-wrap:wrap; margin-top:3px; }
.vrtx-chat-answer__actions .vrtx-chat-action { display:inline-flex; align-items:center; border:1px solid #f6dce5; color:#ac0047; text-decoration:none; border-radius:8px; font-size:11px; font-weight:700; padding:6px 8px; min-height:31px; background:#fff1f5; line-height:1.2; }
.vrtx-chat-answer__actions .vrtx-chat-action--muted { color:#5f5960; background:#f6f4f5; border-color:#e8e4e7; }
.vrtx-chat-answer__actions .vrtx-chat-action:hover { background:#ffe4eb; }
.vrtx-chat-panel__notice { font-size:10px; padding:5px 12px 8px; }
@media(max-width:600px){
  .vrtx-chat-panel {width:calc(100vw - 20px); height:min(76dvh,670px);}
  .vrtx-chat-panel__header {padding:12px 14px;}
  .vrtx-chat-panel__messages {padding:12px 10px 16px;}
  .vrtx-chat-panel__inputrow input {font-size:16px;}
}

/* v0.4.2 — subtle illuminated focus without a cropped external outline. */
.vrtx-chat-panel .vrtx-chat-panel__form { padding:10px 14px 12px; }
.vrtx-chat-panel .vrtx-chat-panel__inputrow { gap:9px; padding:4px 3px 5px; }
.vrtx-chat-panel .vrtx-chat-panel__inputrow input {
    min-height:46px; min-width:0; border:1px solid #b6b2b5; border-radius:12px;
    padding:10px 12px; box-shadow:none; background:#fff;
    transition:border-color .2s ease, box-shadow .2s ease, background-color .2s ease;
}
.vrtx-chat-panel .vrtx-chat-panel__inputrow input:focus,
.vrtx-chat-panel .vrtx-chat-panel__inputrow input:focus-visible {
    outline:none !important; outline-offset:0;
    border-color:#ef780b; background:#fffdfa;
    box-shadow:0 0 0 1px rgba(239,120,11,.55),
               0 0 0 3px rgba(250,121,0,.12),
               0 0 14px rgba(250,121,0,.11);
}
.vrtx-chat-panel .vrtx-chat-panel__inputrow button { min-height:46px; border-radius:12px; }
.vrtx-chat-panel .vrtx-chat-panel__notice {
    padding:2px 17px 12px; font-size:10px; line-height:1.38;
}
@media(prefers-reduced-motion:reduce) {
    .vrtx-chat-panel .vrtx-chat-panel__inputrow input { transition:none; }
}


/* v0.4.3 — mobile-first, fullscreen integrated chat. Includes short landscape phones. */
@media (max-width: 767px), (max-height: 520px) and (pointer: coarse) {
    .vrtx-chat-launcher[data-vrtx-chat-api] {
        --vrtx-chat-mobile-top: 52%;
        bottom: auto !important;
        top: calc(var(--vrtx-chat-mobile-top) - 28px);
        transform: none;
        max-width: 58px;
        z-index: 9999;
    }
    .vrtx-chat-launcher--right[data-vrtx-chat-api] {
        left: auto;
        right: calc(12px + env(safe-area-inset-right, 0px));
    }
    .vrtx-chat-launcher--left[data-vrtx-chat-api] {
        right: auto;
        left: calc(12px + env(safe-area-inset-left, 0px));
    }
    .vrtx-chat-launcher[data-vrtx-chat-api] > .vrtx-chat-launcher__link {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 56px;
        height: 56px;
        min-width: 56px;
        min-height: 56px;
        max-width: 56px;
        padding: 0;
        border-radius: 50%;
        box-shadow: 0 5px 18px rgba(82, 18, 45, .20);
    }
    .vrtx-chat-launcher[data-vrtx-chat-api] > .vrtx-chat-launcher__link:hover {
        transform: none;
    }
    .vrtx-chat-launcher[data-vrtx-chat-api] .vrtx-chat-launcher__label {
        display: none !important;
    }
    .vrtx-chat-launcher[data-vrtx-chat-api] .vrtx-chat-launcher__icon,
    .vrtx-chat-launcher[data-vrtx-chat-api] .vrtx-chat-launcher__img {
        flex: 0 0 26px;
        width: 26px;
        height: 26px;
    }
    .vrtx-chat-launcher--mobile-open[data-vrtx-chat-api] {
        z-index: 2147483000;
    }
    .vrtx-chat-launcher--mobile-open[data-vrtx-chat-api] > .vrtx-chat-launcher__link {
        visibility: hidden;
        pointer-events: none;
    }
    .vrtx-chat-launcher[data-vrtx-chat-api] .vrtx-chat-panel {
        position: fixed;
        top: var(--vrtx-chat-visual-offset, 0px);
        left: 0;
        right: 0;
        bottom: auto;
        width: 100vw;
        max-width: none;
        height: var(--vrtx-chat-visual-height, 100vh);
        height: var(--vrtx-chat-visual-height, 100dvh);
        min-height: 0;
        max-height: none;
        border: 0;
        border-radius: 0;
        box-shadow: none;
        overflow: hidden;
        padding-top: env(safe-area-inset-top, 0px);
        padding-bottom: env(safe-area-inset-bottom, 0px);
        display: flex;
        flex-direction: column;
        overscroll-behavior: contain;
    }
    .vrtx-chat-launcher[data-vrtx-chat-api] .vrtx-chat-panel__header {
        flex-shrink: 0;
        padding: 16px 18px;
    }
    .vrtx-chat-launcher[data-vrtx-chat-api] .vrtx-chat-panel__header strong { font-size: 18px; }
    .vrtx-chat-launcher[data-vrtx-chat-api] .vrtx-chat-panel__header small { font-size: 12px; }
    .vrtx-chat-launcher[data-vrtx-chat-api] .vrtx-chat-panel__close {
        min-width: 44px;
        min-height: 44px;
        display: grid;
        place-items: center;
    }
    .vrtx-chat-launcher[data-vrtx-chat-api] .vrtx-chat-panel__messages {
        flex: 1 1 auto;
        min-height: 0;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        padding: 14px 16px 20px;
    }
    .vrtx-chat-launcher[data-vrtx-chat-api] .vrtx-chat-panel__form {
        flex: 0 0 auto;
        padding: 10px 14px 12px;
    }
    .vrtx-chat-launcher[data-vrtx-chat-api] .vrtx-chat-panel__notice {
        flex: 0 0 auto;
    }
    body.vrtx-chat-mobile-open { overflow: hidden !important; }
}

/* v0.5.2 — one compact privacy disclosure, always below the input row. */
.vrtx-chat-panel .vrtx-chat-panel__privacy {
    display:flex; align-items:flex-start; gap:6px;
    flex:0 0 auto; margin:0!important; padding:2px 16px 10px;
    background:#fff; color:#62676c; font-size:10px; line-height:1.38;
    overflow-wrap:anywhere;
}
.vrtx-chat-panel .vrtx-chat-panel__privacy-icon {
    width:13px; height:13px; flex:0 0 13px; margin-top:1px; color:#a54c63;
}
.vrtx-chat-panel .vrtx-chat-panel__privacy a {
    color:#a00046; text-decoration:underline; text-underline-offset:2px; font-weight:600;
}
.vrtx-chat-panel .vrtx-chat-panel__privacy a:focus-visible {
    outline:2px solid #fa7900; outline-offset:2px; border-radius:2px;
}
.vrtx-chat-panel .vrtx-chat-panel__privacy-missing { color:#7a5260; }
@media (max-width:767px) {
    .vrtx-chat-launcher[data-vrtx-chat-api] .vrtx-chat-panel__privacy {
        padding:4px 16px calc(10px + env(safe-area-inset-bottom, 0px));
        font-size:10px;
    }
}
