.bds-search-widget {
    --bds-navy: #0f1f33;
    --bds-gold: #f0b429;
    --bds-gold-dark: #d99a0f;
    --bds-card-bg: #ffffff;
    --bds-border: rgba(15, 31, 51, 0.12);
    --bds-radius: 10px;

    width: 100%;
    max-width: 900px;
    font-family: inherit;
}

.bds-panels {
    display: block;
}

/* Only one panel shows at a time, switched by which .bds-mode-radio below is
   checked. :has() does this with no JS; business-directory-search.js mirrors
   it onto a .bds-mode-city class for browsers that don't support :has() yet. */
.bds-panel.bds-panel-business {
    display: flex;
}

.bds-panel.bds-panel-city {
    display: none;
}

.bds-search-widget:has(.bds-mode-radio[value="city"]:checked) .bds-panel-business,
.bds-search-widget.bds-mode-city .bds-panel-business {
    display: none;
}

.bds-search-widget:has(.bds-mode-radio[value="city"]:checked) .bds-panel-city,
.bds-search-widget.bds-mode-city .bds-panel-city {
    display: flex;
}

/* Pill tabs — a plain radio group styled as a tab strip. The active tab
   (checked radio) gets the white "floating" look and overlaps the card
   directly beneath it; everything else stays solid gold. */
.bds-tabs {
    display: flex;
    gap: 0.25rem;
    margin: 0 0 -1px;
    padding: 0 0.5rem;
    position: relative;
    z-index: 1;
}

.bds-tab {
    cursor: pointer;
}

.bds-tab input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.bds-tab span {
    display: block;
    padding: 0.65rem 1.5rem;
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--bds-navy);
    background: var(--bds-gold);
    border-radius: var(--bds-radius) var(--bds-radius) 0 0;
    transition: background-color 0.15s ease;
}

.bds-tab input:hover + span {
    background: var(--bds-gold-dark);
}

.bds-tab input:checked + span {
    background: var(--bds-card-bg);
}

.bds-tab input:focus-visible + span {
    outline: 2px solid var(--bds-navy);
    outline-offset: -2px;
}

/* The filter card — a panel's own form. Stacks the status pills (if any)
   above the field row. */
.bds-card {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    background: var(--bds-card-bg);
    border-radius: var(--bds-radius);
    box-shadow: 0 20px 40px rgba(15, 31, 51, 0.18);
    padding: 1.5rem;
    position: relative;
    z-index: 0;
}

.bds-card-fields {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 1rem;
}

/* Status filter, nested inside the Search Business panel — smaller and
   self-contained, unlike the page-level .bds-tabs strip above the card. */
.bds-status-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.bds-pill {
    cursor: pointer;
}

.bds-pill input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.bds-pill span {
    display: inline-block;
    padding: 0.4rem 0.9rem;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--bds-navy);
    background: rgba(15, 31, 51, 0.06);
    border-radius: 999px;
    transition: background-color 0.15s ease, color 0.15s ease;
}

.bds-pill input:hover + span {
    background: rgba(15, 31, 51, 0.12);
}

.bds-pill input:checked + span {
    background: var(--bds-navy);
    color: #fff;
}

.bds-pill input:focus-visible + span {
    outline: 2px solid var(--bds-navy);
    outline-offset: 2px;
}

.bds-field {
    flex: 1 1 180px;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.bds-field label {
    font-weight: 700;
    font-size: 0.85rem;
    color: var(--bds-navy);
}

.bds-field select,
.bds-field input[type="text"] {
    appearance: none;
    width: 100%;
    padding: 0.65rem 0.85rem;
    font-size: 0.95rem;
    line-height: 1.4;
    color: var(--bds-navy);
    background-color: #fff;
    border: 1px solid var(--bds-border);
    border-radius: calc(var(--bds-radius) - 4px);
}

.bds-field select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath fill='%230f1f33' d='M5.5 7.5l4.5 5 4.5-5z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    background-size: 14px;
    padding-right: 2.25rem;
}

.bds-field select:focus,
.bds-field input[type="text"]:focus {
    outline: none;
    border-color: var(--bds-navy);
}

.bds-search-button {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.7rem 1.75rem;
    font-size: 0.95rem;
    font-weight: 700;
    line-height: 1.4;
    color: var(--bds-navy);
    background-color: var(--bds-gold);
    border: none;
    border-radius: calc(var(--bds-radius) - 4px);
    cursor: pointer;
    transition: background-color 0.15s ease;
}

.bds-search-button svg {
    width: 16px;
    height: 16px;
}

.bds-search-button:hover,
.bds-search-button:focus {
    background-color: var(--bds-gold-dark);
}

.bds-not-configured {
    padding: 0.75rem 1rem;
    border: 1px solid #f0d58c;
    background: #fff8e5;
    border-radius: 0.375rem;
}

@media (max-width: 560px) {
    .bds-tabs {
        flex-wrap: wrap;
        margin-bottom: 0;
    }
    .bds-tab span {
        border-radius: var(--bds-radius);
    }
    .bds-card {
        margin-top: 0.5rem;
    }
    .bds-search-button {
        width: 100%;
    }
}
