.bv-findcare-panel {
    background: var(--bv-surface);
    border: 1px solid var(--bv-border);
    border-radius: var(--bv-radius-md);
    padding: 20px;
    margin-top: 24px;
}

.bv-findcare-panel h2 {
    font-size: 1.1rem;
    margin: 0 0 12px;
}

.bv-findcare-panel h2:focus-visible,
.bv-findcare-warning:focus-visible {
    outline: 3px solid var(--bv-primary);
    outline-offset: 2px;
}

/* ── Warning banner (independent of the current step) ────────────────── */

.bv-findcare-warning {
    background: var(--bv-danger-light);
    border: 1px solid #fecaca;
    border-radius: var(--bv-radius-md);
    padding: 16px 20px;
    margin-top: 20px;
}

.bv-findcare-warning__message {
    margin: 0;
    color: var(--bv-danger);
    font-weight: 600;
}

.bv-findcare-warning__note {
    margin: 8px 0 0;
    font-size: 0.85rem;
    color: var(--bv-text);
}

/* ── Guided questions ─────────────────────────────────────────────────── */

.bv-findcare-question,
.bv-findcare-field {
    border: 1px solid var(--bv-border);
    border-radius: var(--bv-radius-sm);
    padding: 14px 16px;
    margin: 0 0 16px;
}

.bv-findcare-question legend,
.bv-findcare-field legend {
    font-weight: 600;
    padding: 0 4px;
}

.bv-findcare-question__help {
    font-size: 0.85rem;
    color: var(--bv-text-muted);
    margin: 4px 0 12px;
}

.bv-findcare-question__option {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 44px;
    cursor: pointer;
}

.bv-findcare-field label:not(.bv-findcare-question__option) {
    display: block;
    font-weight: 600;
    margin: 12px 0 6px;
}

.bv-findcare-field select,
.bv-findcare-field input[type="text"] {
    width: 100%;
    min-height: 44px;
    padding: 0 12px;
    border: 1px solid var(--bv-border);
    border-radius: var(--bv-radius-sm);
    background: var(--bv-background);
}

/* ── Results ──────────────────────────────────────────────────────────── */

.bv-findcare-result-card {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.bv-findcare-result-card__match {
    display: inline-block;
    width: fit-content;
    font-size: 0.8rem;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 999px;
    background: var(--bv-primary-light);
    color: var(--bv-primary-dark);
}

.bv-findcare-result-card__match--related {
    background: var(--bv-background);
    color: var(--bv-text-muted);
}

.bv-findcare-result-card__reasons {
    list-style: none;
    margin: 0;
    padding: 0;
    font-size: 0.85rem;
    color: var(--bv-text-muted);
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.bv-findcare-result-card__reasons li::before {
    content: "• ";
}

.bv-findcare-result-card__verified {
    font-size: 0.8rem;
    color: var(--bv-secondary);
    margin: 0;
}

.bv-findcare-pager {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-top: 20px;
}

.bv-findcare-error {
    text-align: center;
}

@media (max-width: 640px) {
    .bv-findcare-tab__actions .bv-btn,
    .bv-findcare-panel .bv-findcare-tab__actions .bv-btn {
        width: 100%;
    }
}

/* ── Design Lock rev 2 (doc 17): W4 step 0 / description, W5 understood, W6 caution, R1 summary ───── */

.bv-steps {
    margin: 0 0 8px;
    font-size: 0.78rem;
    color: var(--bv-text-muted);
}

.bv-steps b {
    color: var(--bv-primary-dark);
}

.bv-findcare-signs {
    margin: 4px 0 10px;
    padding-left: 18px;
    font-size: 0.88rem;
    color: var(--bv-text);
    columns: 2;
    column-gap: 28px;
}

.bv-findcare-options-inline {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 24px;
}

/* Doc 119: step 0 with one checkbox per sign; exclusive options in their own row below. */
.bv-findcare-options-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0 28px;
}

.bv-findcare-options-list .bv-findcare-question__option {
    align-items: flex-start;
    padding: 10px 0;
    font-size: 0.92rem;
}

.bv-findcare-options-list .bv-findcare-question__option input,
.bv-findcare-options-exclusive .bv-findcare-question__option input {
    flex: none;
    width: 18px;
    height: 18px;
    margin: 2px 0 0;
}

.bv-findcare-options-exclusive {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 28px;
    margin-top: 6px;
    padding-top: 6px;
    border-top: 1px solid var(--bv-border);
}

.bv-findcare-options-exclusive[hidden],
.bv-findcare-question__help[hidden] {
    display: none;
}

.bv-findcare-warning--caution {
    background: #fff7ed;
    border-color: #fed7aa;
}

.bv-findcare-warning--caution .bv-findcare-warning__message {
    color: #9a3412;
}

.bv-findcare-warning__contact {
    margin: 8px 0 0;
    font-weight: 700;
    font-size: 1.05rem;
    color: var(--bv-text);
}

/* W5 / W7 */
.bv-understood {
    display: grid;
    gap: 12px;
}

.bv-understood h2 {
    margin: 0;
}

.bv-understood__quote {
    margin: 0;
    padding-left: 10px;
    border-left: 3px solid var(--bv-border);
    font-size: 0.86rem;
}

.bv-understood__help {
    margin: 0;
}

.bv-understood__actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 10px;
}

.bv-understood__actions--start {
    justify-content: flex-start;
}

.bv-findcare-add-input {
    width: 100%;
    max-width: 420px;
    min-height: 44px;
    padding: 0 12px;
    border: 1px solid var(--bv-border);
    border-radius: var(--bv-radius-sm);
    background: var(--bv-surface);
}

/* F-4 (corrective 2026-10-21): emergency link, Home request acknowledgement, manual specialty panel */
.bv-findcare-warning__link {
    display: inline-block;
    margin-top: 10px;
    font-weight: 700;
    color: var(--bv-danger);
    text-decoration: underline;
}

.bv-findcare-warning--caution .bv-findcare-warning__link {
    color: #9a3412;
}

.bv-f4-request {
    display: grid;
    gap: 10px;
}

.bv-f4-request h2,
.bv-f4-request__note {
    margin: 0;
}

.bv-f4-request__note {
    font-size: 0.9rem;
    color: var(--bv-text);
}

/* No overflow clipping: the specialty list (doc 134) opens below the field and may extend past the panel.
   The rounded top comes from the first child instead. */
.bv-specialty-panel {
    padding: 0;
}

.bv-specialty-panel > :first-child {
    border-radius: var(--bv-radius-md) var(--bv-radius-md) 0 0;
}

.bv-specialty-panel__head {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 18px 20px;
    background: var(--bv-primary-dark);
    color: #fff;
}

.bv-specialty-panel__icon {
    display: grid;
    place-items: center;
    flex: none;
    width: 44px;
    height: 44px;
    border-radius: var(--bv-radius-sm);
    background: rgba(255, 255, 255, 0.14);
}

.bv-specialty-panel__icon svg {
    width: 26px;
    height: 26px;
}

.bv-specialty-panel__heading h2 {
    margin: 0 0 4px;
    color: #fff;
}

.bv-specialty-panel__heading p {
    margin: 0;
    font-size: 0.88rem;
    line-height: 1.5;
    color: rgba(255, 255, 255, 0.86);
}

.bv-specialty-panel__body {
    display: grid;
    gap: 14px;
    padding: 20px;
}

.bv-specialty-panel__filter {
    max-width: none;
}

.bv-specialty-panel__filter:focus {
    border-color: var(--bv-primary);
}

.bv-f4-request[hidden] {
    display: none;
}

/* R1 summary */
.bv-summary {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 10px;
    font-size: 0.88rem;
    color: var(--bv-text);
}

.bv-chips--inline {
    display: inline-flex;
}

.bv-link-button {
    padding: 0;
    border: 0;
    background: none;
    color: var(--bv-primary-dark);
    font: inherit;
    font-weight: 600;
    text-decoration: underline;
    cursor: pointer;
}

@media (max-width: 640px) {
    .bv-findcare-signs {
        columns: 1;
    }

    .bv-findcare-options-inline,
    .bv-findcare-options-exclusive {
        flex-direction: column;
    }

    .bv-findcare-options-list {
        grid-template-columns: 1fr;
    }

    .bv-understood__actions {
        flex-direction: column-reverse;
    }

    .bv-understood__actions--start {
        flex-direction: column;
    }

    .bv-understood__actions .bv-btn {
        width: 100%;
    }

    /* Primary action stays reachable at the bottom of the screen while scrolling (R1.2 #6). */
    .bv-findcare-sticky-actions {
        position: sticky;
        bottom: 0;
        z-index: 5;
        margin: 14px -16px -16px;
        padding: 12px 14px;
        border-top: 1px solid var(--bv-border);
        background: var(--bv-surface);
        box-shadow: 0 -4px 12px rgba(15, 36, 34, 0.06);
    }

    .bv-findcare-sticky-actions .bv-btn {
        width: 100%;
    }
}

.bv-understood[hidden],
.bv-understood__quote[hidden],
.bv-findcare-signs[hidden],
.bv-symptom-field[hidden] {
    display: none;
}

/* S2 W5 (doc 17 §R3.5): T-70 learning notice, shown above "Đúng, tiếp tục" only while a learningToken is held. */
.bv-learning-note {
    margin: 0;
    font-size: 0.82rem;
    color: var(--bv-text-muted);
    display: flex;
    gap: 8px;
    align-items: flex-start;
}

.bv-i {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    border: 1.5px solid var(--bv-primary);
    color: var(--bv-primary);
    display: grid;
    place-items: center;
    font-size: 0.7rem;
    font-weight: 800;
    flex: none;
    margin-top: 2px;
}

/* ── Route split (doc 129 §5.4–5.5) ──────────────────────────────────── */

.bv-specialty-panel__steps {
    margin: 0;
    padding: 10px 20px;
    background: var(--bv-primary-light);
}

.bv-need-summary {
    margin: 0 0 16px;
    padding: 10px 12px;
    background: var(--bv-background);
    border: 1px solid var(--bv-border);
    border-radius: var(--bv-radius-sm);
}

.bv-findcare-locked-actions {
    margin-top: 20px;
}

@media (max-width: 640px) {
    .bv-findcare-locked-actions .bv-btn {
        width: 100%;
    }
}

/* ── Doc 134: value pickers, first symptom screen, basis of the results ─ */

.bv-findcare-label {
    display: block;
    margin: 0 0 6px;
    font-weight: 600;
}

.bv-findcare-label__optional {
    font-weight: 400;
    color: var(--bv-text-muted);
}

.bv-findcare-field-hint {
    margin: 6px 0 0;
    font-size: 0.82rem;
    color: var(--bv-text-muted);
}

.bv-findcare-field-error {
    margin: 8px 0 0;
    font-size: 0.86rem;
    font-weight: 600;
    color: var(--bv-danger);
}

.bv-findcare-field-error[hidden],
.bv-findcare-basis[hidden],
.bv-understood__area[hidden],
.bv-findcare-basis__line[hidden],
.bv-findcare-limits[hidden] {
    display: none;
}

/* Combobox base styles (value-picker.js) live in components/search-hero.css, shared with Home tab 2. */
.bv-findcare-field .bv-value-picker__input {
    min-height: 44px;
    padding: 0 12px;
    border: 1px solid var(--bv-border);
    border-radius: var(--bv-radius-sm);
    background: var(--bv-background);
}

/* First symptom screen: description, then the SAFETY_CHECK question in the same form. */
.bv-findcare-safety {
    margin-top: 20px;
}

.bv-understood__area {
    max-width: 420px;
}

.bv-understood__area .bv-findcare-add-input {
    max-width: none;
}

/* R1: what the list is based on, and its limits. */
.bv-findcare-basis {
    display: grid;
    gap: 8px;
}

.bv-findcare-basis__line {
    margin: 0;
    font-size: 0.88rem;
    color: var(--bv-text);
}

.bv-findcare-result-card__reasons-label {
    margin: 0 0 -6px;
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--bv-text);
}

.bv-findcare-limits {
    margin: 12px 0 0;
    font-size: 0.82rem;
    line-height: 1.55;
    color: var(--bv-text-muted);
}

/* First symptom screen actions: on phones only "Tìm nơi khám phù hợp" sticks to the bottom. display: contents lets the
   sticky bar use the whole form as its range, and the secondary action follows it in the flow. */
@media (max-width: 640px) {
    .bv-findcare-first-actions {
        display: contents;
    }

    .bv-findcare-first-actions .bv-findcare-sticky-actions {
        margin-bottom: 0;
    }

    .bv-findcare-first-actions > .bv-btn {
        width: 100%;
        margin-top: 12px;
    }
}
