/* Keep the original select in the layout and form. Only its presentation changes. */
body select.ifr-select {
    --ds-bg: #fff;
    --ds-ink: #191c27;
    --ds-muted: #596478;
    --ds-line: #c8cdd5;
    --ds-hover: #f0f2f4;
    --ds-selected: #fff3c4;
    --ds-selected-ink: #191c27;
    --ds-focus: #596478;
    --ds-error: #b42332;
    --ds-radius: 3px;
    --ds-row: 44px;
    --ds-arrow: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='m4 6 4 4 4-4' fill='none' stroke='%23191c27' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    appearance: none !important;
    -webkit-appearance: none !important;
    box-sizing: border-box;
    min-height: 44px;
    max-width: 100%;
    padding: 10px 42px 10px 13px !important;
    border: 1px solid var(--ds-line) !important;
    border-radius: var(--ds-radius) !important;
    background-color: var(--ds-bg) !important;
    background-image: var(--ds-arrow) !important;
    background-repeat: no-repeat !important;
    background-size: 16px 16px !important;
    background-position: right 13px center !important;
    color: var(--ds-ink) !important;
    font-family: inherit;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.5;
    text-transform: none;
    letter-spacing: normal;
    text-overflow: ellipsis;
    cursor: pointer;
    box-shadow: none !important;
    -webkit-tap-highlight-color: transparent;
}
body select.ifr-select:hover:not(:disabled) { border-color: var(--ds-focus) !important; }
/* A close, one-pixel keyboard indicator. Mouse/touch focus never creates a frame. */
body select.ifr-select:focus {
    outline: none !important;
    box-shadow: none !important;
}
body select.ifr-select:focus-visible:not([data-ifr-pointer-focus]) {
    outline: 1px solid var(--ds-focus) !important;
    outline-offset: 2px !important;
    border-color: var(--ds-focus) !important;
}
body select.ifr-select[aria-expanded="true"] { border-color: var(--ds-focus) !important; }
body select.ifr-select:disabled {
    opacity: .55;
    cursor: not-allowed;
}
body select.ifr-select option, body select.ifr-select optgroup {
    background: var(--ds-bg);
    color: var(--ds-ink);
}
/* Generous fields for enquiries and registration; compact controls for filters. */
body :is(.contact-fields,.ifr-kit-fields,.cup-registration-field,.finder-fields,.beach-form,.lf-form,.booking-surface) select.ifr-select {
    min-height: 48px;
    font-size: 16px;
    font-weight: 400;
}
body :is(.fl-fixture-tools,.league-season-control,.cup-edition-control,.padel-edition-control,.news-filters) select.ifr-select {
    --ds-bg: #f8f9fa;
    --ds-radius: 2px;
}
body .ifr-village select.ifr-select {
    --ds-bg: var(--c-card,#fff);
    --ds-ink: var(--c-ink,#191c27);
    --ds-line: var(--c-line,#c8cdd5);
    --ds-radius: 4px;
    width: 100%;
}
/* Brochure controls follow the navy reader, including open menus. */
body :is(.ifr-standalone-brochure,.ifr-proposal-reader) select.ifr-select,
body:is(.ifr-standalone-brochure,.ifr-proposal-reader,.ifr-standalone-brand-guide) select.ifr-select,
body [data-dropdown-theme="dark"] select.ifr-select {
    --ds-bg: #242936;
    --ds-ink: #f7f8fb;
    --ds-muted: #bfc7d5;
    --ds-line: #535b6c;
    --ds-hover: #343b4b;
    --ds-selected: #ffdf6b;
    --ds-selected-ink: #191c27;
    --ds-focus: #ffdf6b;
    --ds-error: #ff9b8c;
    --ds-arrow: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='m4 6 4 4 4-4' fill='none' stroke='%23ffdf6b' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}
/* Light registration panels can be embedded inside a dark brochure. */
body :is(.cup-registration-dialog,.cup-registration-inline) select.ifr-select {
    --ds-bg: #fff; --ds-ink: #191c27; --ds-muted: #596478; --ds-line: #c8cdd5;
    --ds-hover: #f0f2f4; --ds-selected: #fff3c4; --ds-selected-ink: #191c27; --ds-focus: #596478;
    --ds-error: #b42332;
    --ds-arrow: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='m4 6 4 4 4-4' fill='none' stroke='%23191c27' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}
body .proposal-location select.ifr-select { --ds-radius: 0px; font-weight: 700; }
body select.ifr-select[aria-invalid="true"], body select.ifr-select:user-invalid { border-color: var(--ds-error) !important; }
body.ifr-dropdown-admin .wrap select.ifr-select {
    --ds-bg: #fff;
    --ds-hover: #edf0f4;
    --ds-selected: #e9edf2;
    --ds-row: 38px;
    --ds-radius: 3px;
    min-height: 40px;
    padding-block: 8px !important;
    font-size: 14px;
}
/* One lazy-created list, shown in the browser top layer even inside map dialogs. */
body .ifr-select-menu {
    box-sizing: border-box !important;
    position: fixed !important;
    inset: auto !important;
    margin: 0 !important;
    padding: 5px !important;
    border: 1px solid var(--ds-line) !important;
    border-radius: var(--ds-radius) !important;
    background: var(--ds-bg) !important;
    color: var(--ds-ink) !important;
    box-shadow: 0 12px 32px #10152226 !important;
    overflow: auto !important;
    overscroll-behavior: contain;
    scrollbar-width: thin;
    scrollbar-color: var(--ds-line) var(--ds-bg);
    font-style: normal;
    font-weight: 500;
    line-height: 1.45;
    text-align: start;
    text-transform: none;
    letter-spacing: normal;
    z-index: 2147483647;
    outline: none !important;
    touch-action: pan-y;
}
body .ifr-select-menu::backdrop { background: transparent; pointer-events: none; }
body .ifr-select-menu .ifr-select-option {
    box-sizing: border-box;
    display: flex;
    align-items: center;
    position: relative;
    min-height: var(--ds-row);
    margin: 0;
    padding: 9px 35px 9px 11px;
    border: 0;
    border-radius: 2px;
    background: transparent;
    color: var(--ds-ink);
    cursor: pointer;
    white-space: normal;
    overflow-wrap: anywhere;
}
body .ifr-select-menu .ifr-select-option.is-active { background: var(--ds-hover); }
body .ifr-select-menu .ifr-select-option[aria-selected="true"] {
    background: var(--ds-selected);
    color: var(--ds-selected-ink);
    font-weight: 700;
}
body .ifr-select-menu .ifr-select-option[aria-selected="true"]::after {
    content: "";
    position: absolute;
    right: 14px;
    width: 6px;
    height: 10px;
    border: solid currentColor;
    border-width: 0 1.7px 1.7px 0;
    transform: rotate(45deg);
}
body .ifr-select-menu .ifr-select-option.is-active { box-shadow: inset 3px 0 var(--ds-focus); }
body .ifr-select-menu .ifr-select-option[aria-disabled="true"] { opacity: .5; cursor: not-allowed; }
body .ifr-select-menu .ifr-select-group-label {
    margin: 5px 0 3px;
    padding: 9px 11px 5px;
    color: var(--ds-muted);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .025em;
}
@media (max-width: 767px) {
    body select.ifr-select, body.ifr-dropdown-admin .wrap select.ifr-select { font-size: 16px; min-height: 44px; }
    body .ifr-select-menu { font-size: 16px !important; --ds-row: 44px !important; }
    body .ifr-village .vm-expanded-dialog .vm-picker select.ifr-select { min-height: 40px; padding-block: 7px !important; }
}
@media (forced-colors: active) {
    body select.ifr-select { appearance: auto !important; background-image: none !important; color: ButtonText !important; background-color: ButtonFace !important; border-color: ButtonText !important; }
    body select.ifr-select:focus { outline: 1px solid Highlight !important; outline-offset: 2px !important; }
}
@media print { body .ifr-select-menu { display: none !important; } }
