/**
 * ENTTEC My Account locale switcher.
 *
 * Custom dropdown that matches the adjacent
 * .btn.btn-lg.fs-14.px-4.py-2.rounded-xxxl pills ("Back to Home", "Sign Out").
 * Native <select> can't be styled consistently across browsers — this is a
 * minimal custom widget driven by JS in inc/i18n.php.
 */

.enttec-locale-switcher {
    position: relative;
    display: inline-flex;
    align-items: center;
    vertical-align: middle;
    margin: 0 0.25rem;
    line-height: 1;
}

/* --- Toggle button (the visible pill) --- */
body .enttec-locale-switcher .enttec-locale-switcher__toggle,
.enttec-locale-switcher .enttec-locale-switcher__toggle {
    display: inline-flex !important;
    align-items: center !important;
    gap: 0.4rem !important;
    background: transparent !important;
    border: 1px solid rgba(0, 0, 0, 0.5) !important;
    border-radius: 50rem !important;
    padding: 0.5rem 1.25rem !important;
    margin: 0 !important; /* defeat .woocommerce-account .woocommerce button { margin-top: 15px } */
    font-size: 14px !important;
    line-height: 1.5 !important;
    color: inherit !important;
    cursor: pointer !important;
    height: auto !important;
    box-shadow: none !important;
    transition: background-color .15s ease, color .15s ease, border-color .15s ease;
    -webkit-appearance: none;
    appearance: none;
}

.enttec-locale-switcher .enttec-locale-switcher__toggle:hover,
.enttec-locale-switcher .enttec-locale-switcher__toggle[aria-expanded="true"] {
    background-color: #343a40 !important;
    color: #fff !important;
    border-color: #343a40 !important;
}

.enttec-locale-switcher .enttec-locale-switcher__toggle:focus {
    outline: none !important;
    box-shadow: 0 0 0 3px rgba(52, 58, 64, 0.15) !important;
}

.enttec-locale-switcher__globe {
    font-size: 14px;
    opacity: 0.75;
}

.enttec-locale-switcher__current {
    line-height: 1.5;
    white-space: nowrap;
}

.enttec-locale-switcher__chevron {
    display: inline-flex;
    align-items: center;
    margin-left: 0.15rem;
    opacity: 0.7;
}

.enttec-locale-switcher__chevron svg {
    display: block;
    width: 10px;
    height: 6px;
}

/* --- Menu (the dropdown panel) --- */
.enttec-locale-switcher__menu {
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    z-index: 1050;
    list-style: none;
    margin: 0;
    padding: 6px 0;
    min-width: 100%;
    background: #fff;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12), 0 2px 6px rgba(0, 0, 0, 0.06);
    font-size: 14px;
    line-height: 1.5;
    overflow: hidden;
}

.enttec-locale-switcher__menu[hidden] {
    display: none !important;
}

.enttec-locale-switcher__option {
    display: flex;
    align-items: center;
    padding: 0.5rem 1.25rem;
    cursor: pointer;
    color: #212529;
    white-space: nowrap;
    transition: background-color .12s ease;
}

.enttec-locale-switcher__option:hover,
.enttec-locale-switcher__option:focus {
    background-color: rgba(52, 58, 64, 0.08);
}

.enttec-locale-switcher__option[aria-selected="true"] {
    background-color: rgba(52, 58, 64, 0.12);
    font-weight: 600;
}

.enttec-locale-switcher__option[aria-selected="true"]::after {
    content: "✓";
    margin-left: auto;
    padding-left: 0.75rem;
    color: #343a40;
    font-weight: 600;
}

.enttec-locale-switcher__option-label {
    line-height: 1.5;
}

/* --- Inert "label only" state (one locale, no dropdown to open) --- */
.enttec-locale-switcher--single .enttec-locale-switcher__label {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.5rem 1.25rem;
    font-size: 14px;
    line-height: 1.5;
    color: rgba(0, 0, 0, 0.6);
    border: 1px solid rgba(0, 0, 0, 0.15);
    border-radius: 50rem;
}

/* Screen-reader-only utility (in case theme doesn't define it) */
.enttec-locale-switcher .sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}
