/* ==========================================================================
   Language Switcher — custom overrides
   Hand-authored file (not part of the build pipeline), kept separate from
   app.min.css so these changes survive a theme rebuild/redeploy.
   Loaded after app.min.css, so rules here win the cascade without !important.
   ========================================================================== */

/* --- Toggle button (flag + code + caret) --- */
.header__btn-lang-toggle {
    align-items: center;
}

.header__btn-lang-toggle__flag {
    display: block;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.header__btn-lang-toggle__code {
    font-size: 16px;
    font-weight: 500;
    color: #1D1921;
    letter-spacing: 0.02em;
    white-space: nowrap;
    line-height: 1;
}

.header__btn-lang-toggle::after {
    background-color: #1D1921; /* caret icon */
}

/* --- Toggle pill background + width --- */
.header__btn-inner {
    background-color: #E8E7E8;
}

@media (min-width: 451px) {
    .header__btn-inner {
        min-width: 217px; /* mobile keeps the original 150px */
    }
}

/* --- Dropdown panel --- */
.header__btn-lang-drop {
    width: 220px;
    max-width: calc(100vw - 40px);
    left: auto;
    right: 0;
    padding: 80px 20px var(--spacing-mini, 30px) 20px;
    background-color: #E8E7E8;
    --text-color: #1D1921;
    --heading-color: #1D1921;
    color: #1D1921;
}

.lang-switcher-small .wpml-ls-item .wpml-ls-native {
    flex: 1;
    min-width: 0;
}

.wpml-ls-current-language {
	font-weight: 700;
}

.lang-switcher-small .wpml-ls-item.wpml-ls-current-language a::after {
    background-color: #1D1921; /* checkmark icon */
}

/* --- Scrollable list (shows ~6 languages, rest scroll) --- */
.header__btn-lang-drop--scroll .wpml-ls-legacy-list-horizontal > ul {
    max-height: 210px;
    overflow-y: auto;
    overflow-x: hidden;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    padding-right: 8px;
}

.header__btn-lang-drop--scroll .wpml-ls-legacy-list-horizontal > ul::-webkit-scrollbar {
    width: 6px;
}

.header__btn-lang-drop--scroll .wpml-ls-legacy-list-horizontal > ul::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, .2);
    border-radius: 999px;
}

/* --- Search box --- */
.header__btn-lang-search {
    position: relative;
    margin-bottom: 16px;
}

.header__btn-lang-search__input {
    height: 44px !important;
    padding: 10px 40px 10px 10px !important;
    font-size: 14px !important;
}

.header__btn-lang-search__input::placeholder {
    color: rgba(29, 25, 33, 0.4);
}

.header__btn-lang-search::after {
    content: "";
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    width: 13px;
    aspect-ratio: 1;
    -webkit-mask-image: url("../img/icons/search.svg");
    mask-image: url("../img/icons/search.svg");
    -webkit-mask-size: contain;
    mask-size: contain;
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
    -webkit-mask-position: center;
    mask-position: center;
    background-color: rgba(29, 25, 33, 0.4);
    pointer-events: none;
}