/*
 * Sorting tabs above [get_operator_review] lists.
 * Colors come from the theme palette (theme.json → Color 1–4), so they follow
 * whatever palette the site uses, with the default palette as fallback.
 */
.operator-sort {
    display: flex;
    gap: 10px;
    margin: 0 0 var(--wp--preset--spacing--30, 1rem);
    width: 100%;
    box-sizing: border-box;
}

.operator-sort__tab {
    appearance: none;
    -webkit-appearance: none;
    flex: 1 1 0;
    min-width: 0;
    margin: 0;
    padding: 12px 10px;
    border: 1px solid rgba(0, 0, 0, .25);
    border-radius: 8px;
    background: #fff;
    color: var(--wp--preset--color--custom-color-3, #2d6a4f);
    font: inherit;
    font-size: 0.9rem;
    font-weight: 700;
    line-height: 1.2;
    text-align: center;
    cursor: pointer;
    transition: background-color .15s ease, color .15s ease, border-color .15s ease;
}

.operator-sort__tab:hover {
    border-color: var(--wp--preset--color--custom-color-3, #2d6a4f);
    background: var(--wp--preset--color--custom-color-1, #d8f3dc);
}

.operator-sort__tab:focus-visible {
    outline: 2px solid var(--wp--preset--color--custom-color-3, #2d6a4f);
    outline-offset: 2px;
}

.operator-sort__tab.is-active,
.operator-sort__tab.is-active:hover {
    background: var(--wp--preset--color--custom-color-3, #2d6a4f);
    border-color: var(--wp--preset--color--custom-color-3, #2d6a4f);
    color: #fff;
    box-shadow: 0 2px 6px rgba(0, 0, 0, .15);
    cursor: default;
}

/* The badges on each card sit 13px above it; leave room under the tabs. */
.operator-sort + .operator-review-list {
    padding-top: 6px;
}

@media (max-width: 480px) {
    .operator-sort {
        flex-wrap: wrap;
        gap: 8px;
    }
    .operator-sort__tab {
        flex: 1 1 calc(50% - 8px);
        padding: 10px 8px;
        font-size: 0.85rem;
    }
}
