/* ── Tool switcher (doc 129 §5.1) — /tra-cuu, /tim-noi-kham, /tim-noi-kham-theo-trieu-chung ───── */

.bv-tool-nav {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin: 16px 0 20px;
    background: var(--bv-surface);
    border: 1px solid var(--bv-border);
    border-radius: var(--bv-radius-md);
    overflow: hidden;
}

.bv-tool-nav__item {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 56px;
    padding: 10px 16px;
    border-bottom: 3px solid transparent;
    color: var(--bv-text-muted);
    font-size: 0.92rem;
    font-weight: 600;
    text-decoration: none;
}

.bv-tool-nav__item + .bv-tool-nav__item {
    border-left: 1px solid var(--bv-border);
}

.bv-tool-nav__item:hover {
    color: var(--bv-text);
    background: var(--bv-background);
}

.bv-tool-nav__item.is-active {
    color: var(--bv-primary-dark);
    background: var(--bv-primary-light);
    border-bottom-color: var(--bv-primary);
}

.bv-tool-nav__item:focus-visible {
    outline: 3px solid var(--bv-primary);
    outline-offset: -3px;
}

.bv-tool-nav__icon {
    flex: none;
    width: 28px;
    height: 28px;
    border-radius: var(--bv-radius-sm);
    background-color: var(--bv-surface);
}

.bv-tool-nav__item.is-active .bv-tool-nav__icon {
    background-color: var(--bv-surface);
}

.bv-tool-nav__label--short {
    display: none;
}

/* PO UI-1 (2026-10-24): on desktop and tablet every tab label stays on one line. */
@media (min-width: 768px) {
    .bv-tool-nav__item {
        white-space: nowrap;
    }
}

@media (min-width: 768px) and (max-width: 1023px) {
    .bv-tool-nav__item {
        gap: 8px;
        padding: 10px 10px;
        font-size: 0.86rem;
    }

    .bv-tool-nav__icon {
        width: 22px;
        height: 22px;
    }
}

@media (max-width: 767px) {
    .bv-tool-nav {
        margin: 12px 0 16px;
    }

    .bv-tool-nav__item {
        flex-direction: column;
        justify-content: center;
        gap: 4px;
        padding: 8px 4px;
        font-size: 0.78rem;
        line-height: 1.25;
        text-align: center;
    }

    .bv-tool-nav__icon {
        width: 24px;
        height: 24px;
    }

    .bv-tool-nav__label--full {
        display: none;
    }

    .bv-tool-nav__label--short {
        display: inline;
    }
}
