/*
 * Hover and focus affordances for <select> across the app.
 *
 * Every dropdown - the language switchers, the entries-per-page picker, bank account, currency,
 * validity, phone prefix - was flat and static, so none of them read as clickable. These rules add
 * the same lift, highlight and chevron nudge everywhere without touching each page's own colours.
 *
 * Specificity note: the per-page rules are typically `.some-class select` (0,1,1), so the hover
 * rules here carry two pseudo-classes (0,2,1) to win regardless of stylesheet order.
 */

select {
    cursor: pointer;
    transition: transform .16s ease, border-color .16s ease, box-shadow .16s ease,
                background-color .16s ease;
}

/* Light-background dropdowns. The language switchers sit on a dark hero and are styled below. */
select:hover:not(:disabled):not(.language-select):not(.lang-select) {
    border-color: #1E5BFF;
    box-shadow: 0 4px 12px rgba(11, 31, 58, .10);
    transform: translateY(-1px);
}

select:focus-visible:not(:disabled):not(.language-select):not(.lang-select) {
    outline: none;
    border-color: #1E5BFF;
    box-shadow: 0 0 0 3px rgba(30, 91, 255, .12);
}

select:active:not(:disabled) { transform: translateY(0); }

select:disabled { cursor: default; }

/* ── Language switcher (dark hero) ────────────────────────────
   Base rules were duplicated across four shells plus the sign-in and register pages; they live
   here now so all six stay in step. The !important flags are carried over: they exist to beat the
   theme stylesheet, which also targets bare form controls. */
.language-select {
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    appearance: none !important;
    width: 110px !important;
    height: 38px !important;
    border: 1px solid rgba(255, 255, 255, .18) !important;
    border-radius: 10px !important;
    background-color: rgba(255, 255, 255, .08) !important;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E") !important;
    background-repeat: no-repeat !important;
    background-position: right 10px center !important;
    color: #fff !important;
    font-size: 13px !important;
    font-weight: 700 !important;
    padding: 0 28px 0 8px !important;
    cursor: pointer;
    transition: transform .16s ease, background-color .16s ease, border-color .16s ease,
                box-shadow .16s ease, background-position .16s ease;
}

.language-select:hover:not(:disabled) {
    transform: translateY(-1px);
    background-color: rgba(255, 255, 255, .16) !important;
    border-color: rgba(255, 255, 255, .42) !important;
    background-position: right 10px top calc(50% + 2px) !important;
    box-shadow: 0 6px 18px rgba(0, 0, 0, .16);
}

.language-select:active:not(:disabled) { transform: translateY(0); }

.language-select:focus-visible {
    outline: none;
    border-color: #fff !important;
    box-shadow: 0 0 0 3px rgba(255, 255, 255, .28);
}

.language-select option { color: #0B1F3A; }

@media (prefers-reduced-motion: reduce) {
    select,
    .language-select { transition: border-color .16s ease, background-color .16s ease; }

    select:hover:not(:disabled),
    .language-select:hover:not(:disabled) { transform: none; }

    .language-select:hover:not(:disabled) { background-position: right 10px center !important; }
}

/* ── Language switcher on a light card ────────────────────────
   The rules above dress the switcher for the dark navy hero the four consoles put it on: white
   text, a translucent white fill and a white chevron. Sign-in and register place the same control
   inside a white card, where all three vanish - only the flag emoji survived, which is what made
   it look broken. This variant keeps the identical shape, size and hover lift but re-colours it
   for a light surface, so the two contexts stay recognisably the same control. */
.language-select.on-light {
    width: 116px !important;
    border: 1px solid #DDE6F3 !important;
    background-color: #F7F9FC !important;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%231E5BFF' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E") !important;
    color: #0B1F3A !important;
    padding: 0 28px 0 10px !important;
    letter-spacing: .02em;
}

.language-select.on-light:hover:not(:disabled) {
    background-color: #FFFFFF !important;
    border-color: #1E5BFF !important;
    box-shadow: 0 4px 12px rgba(11, 31, 58, .10);
}

.language-select.on-light:focus-visible {
    border-color: #1E5BFF !important;
    box-shadow: 0 0 0 3px rgba(30, 91, 255, .12);
}
