/* ==========================================================================
   Language picker (templates/partials/_language_picker.html)
   Shared by the public and the logged-in header.
   ========================================================================== */

.lang-picker {
    position: relative;
    font-family: 'Open Sans', sans-serif;
}

.lang-picker__current {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.25rem 0.45rem;
    border-radius: 4px;
    cursor: pointer;
    list-style: none;
    user-select: none;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.03em;
    color: #535353;
    transition: color 0.15s, background-color 0.15s;
}

.lang-picker__current::-webkit-details-marker { display: none; }
.lang-picker__current::marker { content: ''; }

.lang-picker__current:hover,
.lang-picker[open] .lang-picker__current {
    color: #ffc72c;
}

.lang-picker__current .fa-globe { font-size: 0.95rem; }
.lang-picker__caret { font-size: 0.6rem; transition: transform 0.15s; }
.lang-picker[open] .lang-picker__caret { transform: rotate(180deg); }

.lang-picker__menu {
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    min-width: 170px;
    margin: 0;
    padding: 0.3rem;
    background: #fff;
    border-radius: 6px;
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.22);
    z-index: 1000;
    display: flex;
    flex-direction: column;
}

.lang-picker__option {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    width: 100%;
    padding: 0.45rem 0.6rem;
    border: 0;
    border-radius: 4px;
    background: transparent;
    color: #363636;
    font: inherit;
    font-size: 0.85rem;
    text-align: left;
    cursor: pointer;
}

.lang-picker__option:hover,
.lang-picker__option:focus-visible {
    background: #fff8e1;
    outline: none;
}

.lang-picker__option-code {
    flex: 0 0 1.8rem;
    font-size: 0.72rem;
    font-weight: 700;
    color: #8a8a8a;
    letter-spacing: 0.03em;
}

.lang-picker__option.is-active { font-weight: 700; }
.lang-picker__option.is-active .lang-picker__option-code { color: #d8a925; }
.lang-picker__check { margin-left: auto; color: #d8a925; font-size: 0.75rem; }

/* Dark headers: the logged-in bar, and the public header over the hero image
   or on the dark inner pages. */
.lang-picker--header .lang-picker__current,
.public-header--transparent .lang-picker__current,
.public-header--dark .lang-picker__current {
    color: rgba(255, 255, 255, 0.85);
}

.lang-picker--header .lang-picker__current { color: #cfcfcf; }

.lang-picker--header .lang-picker__current:hover,
.lang-picker--header[open] .lang-picker__current,
.public-header--transparent .lang-picker__current:hover,
.public-header--transparent .lang-picker[open] .lang-picker__current,
.public-header--dark .lang-picker__current:hover,
.public-header--dark .lang-picker[open] .lang-picker__current {
    color: #ffc72c;
}

/* Phones: the public header is already full (the wordmark alone is ~210px),
   so the picker drops its caret and keeps just globe + code. */
@media (max-width: 768px) {
    .lang-picker__caret { display: none; }
    .lang-picker__current { padding: 0.2rem 0.3rem; gap: 0.3rem; }
}

/* The logged-in bar on phones was already at its limit before the picker
   joined it: tighten the gaps and drop the envelope (the contact address is
   in the footer of every page) so the bar is no wider than it used to be. */
@media (max-width: 480px) {
    .ws-header__actions { gap: 0.6rem; }
    .ws-header__actions > a.ws-header__icon[href^="mailto:"] { display: none; }
    .ws-header__logo:not(.ws-header__logo--custom) img { height: 12px; }
}
