/**
 * Shared native <select> appearance
 *
 * Visual-only. Keeps browser dropdown behaviour; no custom JS widgets.
 *
 * @package BTFC_Stats
 */

/* Closed-state chevron (navy) */
:root {
    --btfc-select-arrow: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' fill='none' viewBox='0 0 12 8'%3E%3Cpath stroke='%23071B36' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round' d='M1.5 1.75 6 6.25l4.5-4.5'/%3E%3C/svg%3E");
}

/*
 * Cover shared classes + archive contexts that still use bare <select>.
 * Layout-only overrides may remain in page CSS (width, min-width).
 */
select.btfc-dir-select,
select.btfc-form-select,
select.btfc-control-select,
select.btfc-select,
select.btfc-az-select,
select.btfc-season-dropdown,
select.btfc-dir-letter-select,
.btfc-dir-select,
.btfc-form-select,
.btfc-control-select,
.btfc-filters select,
.btfc-pstats-field select,
.btfc-season-form select,
.btfc-opp-season-form select,
.btfc-sr-season-form select,
.btfc-ch-filter select,
.btfc-mgrs-filters select,
.btfc-lg-controls select,
.btfc-contact-form select,
.btfc-squad-archive select.btfc-control-select,
#btfc-az-position,
#btfc-az-nationality,
#btfc-az-letter-select,
#btfc-oppaz-letter-select,
#btfc-pstats-season,
#btfc-pstats-competition,
#btfc-opp-season-select,
#btfc-mgrs-era,
#btfc-ch-round-filter,
#btfc-ch-result-filter,
#btfc_contact_subject,
#season-select {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    box-sizing: border-box;
    max-width: 100%;
    min-height: var(--btfc-control-height-sm, 2.5rem);
    padding: 0.45rem 2.35rem 0.45rem 0.75rem;
    border: 1px solid var(--color-gray-200, #e4e7ec);
    border-radius: 2px;
    background-color: var(--color-gray-100, #f4f6f8);
    background-image: var(--btfc-select-arrow);
    background-repeat: no-repeat;
    background-position: right 0.7rem center;
    background-size: 0.75rem 0.5rem;
    color: var(--color-primary, #071b36);
    font-family: var(--font-primary, inherit);
    font-size: 0.9rem;
    font-weight: 500;
    line-height: 1.3;
    cursor: pointer;
    vertical-align: middle;
}

select.btfc-dir-select::-ms-expand,
select.btfc-form-select::-ms-expand,
select.btfc-control-select::-ms-expand,
select.btfc-select::-ms-expand,
select.btfc-az-select::-ms-expand,
select.btfc-season-dropdown::-ms-expand,
select.btfc-dir-letter-select::-ms-expand,
.btfc-dir-select::-ms-expand,
.btfc-form-select::-ms-expand,
.btfc-control-select::-ms-expand,
.btfc-filters select::-ms-expand,
.btfc-pstats-field select::-ms-expand,
.btfc-season-form select::-ms-expand,
.btfc-opp-season-form select::-ms-expand,
.btfc-sr-season-form select::-ms-expand,
.btfc-ch-filter select::-ms-expand,
.btfc-mgrs-filters select::-ms-expand,
.btfc-lg-controls select::-ms-expand,
.btfc-contact-form select::-ms-expand,
#btfc-az-position::-ms-expand,
#btfc-az-nationality::-ms-expand,
#btfc-az-letter-select::-ms-expand,
#btfc-oppaz-letter-select::-ms-expand,
#btfc-pstats-season::-ms-expand,
#btfc-pstats-competition::-ms-expand,
#btfc-opp-season-select::-ms-expand,
#btfc-mgrs-era::-ms-expand,
#btfc-ch-round-filter::-ms-expand,
#btfc-ch-result-filter::-ms-expand,
#btfc_contact_subject::-ms-expand,
#season-select::-ms-expand {
    display: none;
}

select.btfc-dir-select:hover,
select.btfc-form-select:hover,
select.btfc-control-select:hover,
select.btfc-select:hover,
select.btfc-az-select:hover,
select.btfc-season-dropdown:hover,
select.btfc-dir-letter-select:hover,
.btfc-dir-select:hover,
.btfc-form-select:hover,
.btfc-control-select:hover,
.btfc-filters select:hover,
.btfc-pstats-field select:hover,
.btfc-season-form select:hover,
.btfc-opp-season-form select:hover,
.btfc-sr-season-form select:hover,
.btfc-ch-filter select:hover,
.btfc-mgrs-filters select:hover,
.btfc-lg-controls select:hover,
.btfc-contact-form select:hover,
#btfc-az-position:hover,
#btfc-az-nationality:hover,
#btfc-az-letter-select:hover,
#btfc-oppaz-letter-select:hover,
#btfc-pstats-season:hover,
#btfc-pstats-competition:hover,
#btfc-opp-season-select:hover,
#btfc-mgrs-era:hover,
#btfc-ch-round-filter:hover,
#btfc-ch-result-filter:hover,
#btfc_contact_subject:hover,
#season-select:hover {
    border-color: var(--color-primary-lighter, #163a5c);
}

select.btfc-dir-select:focus,
select.btfc-form-select:focus,
select.btfc-control-select:focus,
select.btfc-select:focus,
select.btfc-az-select:focus,
select.btfc-season-dropdown:focus,
select.btfc-dir-letter-select:focus,
.btfc-dir-select:focus,
.btfc-form-select:focus,
.btfc-control-select:focus,
.btfc-filters select:focus,
.btfc-pstats-field select:focus,
.btfc-season-form select:focus,
.btfc-opp-season-form select:focus,
.btfc-sr-season-form select:focus,
.btfc-ch-filter select:focus,
.btfc-mgrs-filters select:focus,
.btfc-lg-controls select:focus,
.btfc-contact-form select:focus,
#btfc-az-position:focus,
#btfc-az-nationality:focus,
#btfc-az-letter-select:focus,
#btfc-oppaz-letter-select:focus,
#btfc-pstats-season:focus,
#btfc-pstats-competition:focus,
#btfc-opp-season-select:focus,
#btfc-mgrs-era:focus,
#btfc-ch-round-filter:focus,
#btfc-ch-result-filter:focus,
#btfc_contact_subject:focus,
#season-select:focus {
    outline: 2px solid var(--color-secondary, #f5b800);
    outline-offset: 1px;
    border-color: var(--color-primary, #071b36);
    background-color: var(--color-white, #ffffff);
}

select.btfc-dir-select:disabled,
select.btfc-form-select:disabled,
select.btfc-control-select:disabled,
select.btfc-select:disabled,
select.btfc-az-select:disabled,
select.btfc-season-dropdown:disabled,
select.btfc-dir-letter-select:disabled,
.btfc-dir-select:disabled,
.btfc-form-select:disabled,
.btfc-control-select:disabled,
.btfc-filters select:disabled,
.btfc-pstats-field select:disabled,
.btfc-season-form select:disabled,
.btfc-opp-season-form select:disabled,
.btfc-sr-season-form select:disabled,
.btfc-ch-filter select:disabled,
.btfc-mgrs-filters select:disabled,
.btfc-lg-controls select:disabled,
.btfc-contact-form select:disabled,
#btfc-az-position:disabled,
#btfc-az-nationality:disabled,
#btfc-az-letter-select:disabled,
#btfc-oppaz-letter-select:disabled,
#btfc-pstats-season:disabled,
#btfc-pstats-competition:disabled,
#btfc-opp-season-select:disabled,
#btfc-mgrs-era:disabled,
#btfc-ch-round-filter:disabled,
#btfc-ch-result-filter:disabled,
#btfc_contact_subject:disabled,
#season-select:disabled {
    opacity: var(--opacity-disabled, 0.55);
    cursor: not-allowed;
}

@media (max-width: 768px) {
    select.btfc-dir-select,
    select.btfc-form-select,
    select.btfc-control-select,
    select.btfc-select,
    select.btfc-az-select,
    select.btfc-season-dropdown,
    select.btfc-dir-letter-select,
    .btfc-dir-select,
    .btfc-form-select,
    .btfc-control-select,
    .btfc-filters select,
    .btfc-pstats-field select,
    .btfc-season-form select,
    .btfc-opp-season-form select,
    .btfc-sr-season-form select,
    .btfc-ch-filter select,
    .btfc-mgrs-filters select,
    .btfc-lg-controls select,
    .btfc-contact-form select,
    .btfc-squad-archive select.btfc-control-select,
    #btfc-az-position,
    #btfc-az-nationality,
    #btfc-az-letter-select,
    #btfc-oppaz-letter-select,
    #btfc-pstats-season,
    #btfc-pstats-competition,
    #btfc-opp-season-select,
    #btfc-mgrs-era,
    #btfc-ch-round-filter,
    #btfc-ch-result-filter,
    #btfc_contact_subject,
    #season-select {
        min-height: var(--btfc-control-height, 2.75rem);
        padding-top: 0.55rem;
        padding-bottom: 0.55rem;
        padding-right: 2.5rem;
        font-size: 1rem; /* avoid iOS zoom on focus */
        background-position: right 0.85rem center;
    }
}
