.vinut-language-switcher,
.vinut-language-switcher__panel {
    --vinut-ls-ink: #21372b;
    --vinut-ls-muted: #718078;
    --vinut-ls-border: #e2e9e4;
    --vinut-ls-accent: #176b3a;
    --vinut-ls-soft: #edf7f0;
}

.vinut-language-switcher {
    position: relative;
    z-index: 1000;
    display: inline-flex;
    color: var(--vinut-ls-ink);
    font: inherit;
    isolation: isolate;
}

.vinut-language-switcher *,
.vinut-language-switcher *::before,
.vinut-language-switcher *::after { box-sizing: border-box; }

.vinut-language-switcher .vinut-language-switcher__toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    min-width: 88px;
    min-height: 44px;
    max-width: 100%;
    padding: 0 15px;
    border: 1px solid var(--vinut-ls-border);
    border-radius: 999px;
    background: linear-gradient(180deg, #fff 0%, #fbfdfb 100%);
    box-shadow: 0 2px 8px rgb(21 49 32 / 6%), inset 0 1px 0 rgb(255 255 255 / 90%);
    color: var(--vinut-ls-ink);
    font: inherit;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.2;
    letter-spacing: .01em;
    text-align: start;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    transition: border-color .18s ease, background-color .18s ease, box-shadow .18s ease, transform .18s ease;
}

/* Protect the compact brand treatment from generic WordPress theme button rules. */
.vinut-language-switcher button.vinut-language-switcher__toggle {
    min-height: 44px !important;
    padding: 0 15px !important;
    border: 1px solid var(--vinut-ls-border) !important;
    border-radius: 999px !important;
    background: linear-gradient(180deg, #fff 0%, #fbfdfb 100%) !important;
    box-shadow: 0 2px 8px rgb(21 49 32 / 6%), inset 0 1px 0 rgb(255 255 255 / 90%) !important;
    color: var(--vinut-ls-ink) !important;
    font: inherit !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    line-height: 1.2 !important;
    text-transform: none !important;
}

.vinut-language-switcher .vinut-language-switcher__toggle:hover {
    border-color: #bbd0c1;
    background: #fff;
    box-shadow: 0 4px 12px rgb(21 49 32 / 10%);
}
.vinut-language-switcher button.vinut-language-switcher__toggle:hover {
    border-color: #bbd0c1 !important;
    background: #fff !important;
    box-shadow: 0 4px 12px rgb(21 49 32 / 10%) !important;
}

.vinut-language-switcher .vinut-language-switcher__toggle:active { transform: translateY(1px); }
.vinut-language-switcher .vinut-language-switcher__toggle:focus-visible,
.vinut-language-switcher .vinut-language-switcher__search:focus-visible,
.vinut-language-switcher .vinut-language-switcher__option:focus-visible {
    outline: 2px solid var(--vinut-ls-accent);
    outline-offset: 3px;
}

.vinut-language-switcher__flag { width: 20px; flex: 0 0 20px; border-radius: 3px; box-shadow: 0 0 0 1px rgb(0 0 0 / 8%); }
.vinut-language-switcher__current-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vinut-language-switcher__chevron { width: 14px; height: 14px; flex: 0 0 14px; color: #78857d; transition: transform .18s ease; }
.vinut-language-switcher.is-open .vinut-language-switcher__chevron { transform: rotate(180deg); }

.vinut-language-switcher .vinut-language-switcher__panel {
    position: absolute;
    inset-block-start: calc(100% + 10px);
    inset-inline-end: 0;
    z-index: 1200;
    display: flex;
    flex-direction: column;
    width: min(324px, calc(100vw - 32px));
    max-height: min(64vh, 432px);
    min-height: 190px;
    padding: 12px;
    overflow: hidden;
    border: 1px solid rgb(222 232 225 / 94%);
    border-radius: 18px;
    background: rgb(255 255 255 / 98%);
    box-shadow: 0 24px 64px rgb(21 42 29 / 18%), 0 5px 16px rgb(21 42 29 / 8%), 0 1px 2px rgb(21 42 29 / 5%);
    -webkit-backdrop-filter: blur(16px);
    backdrop-filter: blur(16px);
    transform-origin: top right;
    animation: vinut-language-panel-in .16s ease-out both;
}

.vinut-language-switcher .vinut-language-switcher__panel[hidden],
.vinut-language-switcher__panel[hidden],
.vinut-language-switcher__suggestion[hidden],
.vinut-language-switcher__scrim[hidden] { display: none !important; }

.vinut-language-switcher__panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    min-height: 32px;
    margin: 0 2px 8px;
}
.vinut-language-switcher__panel-title {
    margin: 0;
    color: #283b30;
    font: inherit;
    font-size: 14px;
    font-weight: 650;
    line-height: 1.3;
    letter-spacing: -.01em;
}
.vinut-language-switcher button.vinut-language-switcher__close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    flex: 0 0 34px;
    padding: 0 !important;
    border: 1px solid transparent !important;
    border-radius: 50% !important;
    background: transparent !important;
    box-shadow: none !important;
    color: #69776f !important;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
}
.vinut-language-switcher button.vinut-language-switcher__close:hover {
    border-color: #e7eee9 !important;
    background: #f4f8f5 !important;
    color: #264633 !important;
}
.vinut-language-switcher__close svg { width: 17px; height: 17px; }
.vinut-language-switcher__close:focus-visible { outline: 2px solid var(--vinut-ls-accent); outline-offset: 2px; }

.vinut-language-switcher__scrim { display: none; }
.vinut-language-switcher__scrim:not([hidden]) {
    position: fixed;
    inset: 0;
    z-index: 9998;
    display: block;
    background: rgb(18 31 23 / 36%);
    -webkit-backdrop-filter: blur(2px);
    backdrop-filter: blur(2px);
    animation: vinut-language-scrim-in .18s ease-out both;
}

@keyframes vinut-language-scrim-in {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes vinut-language-panel-in {
    from { opacity: 0; transform: translateY(-4px) scale(.985); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.vinut-language-switcher__search-label {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.vinut-language-switcher__search-wrap { position: relative; flex: 0 0 auto; }
.vinut-language-switcher__search-icon {
    position: absolute;
    inset-inline-start: 13px;
    top: 50%;
    width: 17px;
    height: 17px;
    color: #78867e;
    pointer-events: none;
    transform: translateY(-50%);
}

.vinut-language-switcher .vinut-language-switcher__search {
    display: block;
    width: 100%;
    min-height: 44px;
    margin: 0;
    padding: 10px 13px 10px 39px;
    border: 1px solid #e0e8e2;
    border-radius: 11px;
    background: #f8faf8;
    box-shadow: inset 0 1px 2px rgb(24 44 31 / 3%);
    color: var(--vinut-ls-ink);
    font: inherit;
    font-size: 14px;
    line-height: 1.35;
    appearance: none;
    -webkit-appearance: none;
}

.vinut-language-switcher__panel input[type="search"].vinut-language-switcher__search {
    box-sizing: border-box !important;
    height: 44px !important;
    min-height: 44px !important;
    max-height: 44px !important;
    padding: 10px 13px 10px 39px !important;
    border: 1px solid #e0e8e2 !important;
    border-radius: 11px !important;
    background: #f8faf8 !important;
    box-shadow: inset 0 1px 2px rgb(24 44 31 / 3%) !important;
    color: var(--vinut-ls-ink) !important;
    font: inherit !important;
    font-size: 14px !important;
    line-height: 1.35 !important;
}

.vinut-language-switcher .vinut-language-switcher__search:focus {
    border-color: var(--vinut-ls-accent) !important;
    background: #fff !important;
    box-shadow: inset 0 0 0 1px var(--vinut-ls-accent) !important;
    outline: none !important;
}
.vinut-language-switcher__panel input[type="search"].vinut-language-switcher__search:focus {
    border-color: var(--vinut-ls-accent) !important;
    background: #fff !important;
    box-shadow: inset 0 0 0 1px var(--vinut-ls-accent) !important;
}
.vinut-language-switcher__panel input.vinut-language-switcher__search:focus-visible {
    border-color: var(--vinut-ls-accent) !important;
    box-shadow: inset 0 0 0 1px var(--vinut-ls-accent) !important;
    outline: none !important;
}
.vinut-language-switcher__search::placeholder { color: #849088; opacity: 1; }
.vinut-language-switcher__search::-webkit-search-cancel-button { cursor: pointer; }

.vinut-language-switcher__suggestion {
    flex: 0 0 auto;
    margin-top: 10px;
    padding: 7px;
    border: 1px solid #e1eee5;
    border-radius: 13px;
    background: linear-gradient(135deg, #f1f8f3 0%, #f8fbf8 100%);
}

.vinut-language-switcher__results {
    min-height: 0;
    margin-top: 9px;
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-color: #c5d0c8 transparent;
    scrollbar-width: thin;
}
.vinut-language-switcher__results::-webkit-scrollbar { width: 6px; }
.vinut-language-switcher__results::-webkit-scrollbar-track { background: transparent; }
.vinut-language-switcher__results::-webkit-scrollbar-thumb { border: 1px solid #fff; border-radius: 99px; background: #c5d0c8; }
.vinut-language-switcher__results::-webkit-scrollbar-thumb:hover { background: #9eafa3; }

.vinut-language-switcher__section + .vinut-language-switcher__section {
    margin-top: 7px;
    padding-top: 8px;
    border-top: 1px solid #edf1ee;
}
.vinut-language-switcher__section-title {
    margin: 3px 10px 6px;
    color: #78857d;
    font-size: 10px;
    font-weight: 700;
    line-height: 1.4;
    letter-spacing: .11em;
    text-transform: uppercase;
}
.vinut-language-switcher__option {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 42px;
    margin: 1px 0;
    padding: 8px 10px;
    border: 1px solid transparent;
    border-radius: 10px;
    color: #334239;
    font-size: 14px;
    font-weight: 450;
    line-height: 1.35;
    text-decoration: none;
    transition: border-color .15s ease, background-color .15s ease, color .15s ease;
}
.vinut-language-switcher__option:hover {
    border-color: #edf2ee;
    background: #f7faf7;
    color: #1c3b29;
}
.vinut-language-switcher__option[aria-current="page"] {
    border-color: #dcebe0;
    background: linear-gradient(100deg, #eef7f0 0%, #f4faf5 100%);
    color: #14552f;
    font-weight: 650;
}
.vinut-language-switcher__option .fi { width: 20px; flex: 0 0 20px; border-radius: 3px; box-shadow: 0 0 0 1px rgb(0 0 0 / 8%); }
.vinut-language-switcher__option-name { min-width: 0; overflow-wrap: anywhere; }
.vinut-language-switcher__check { margin-inline-start: auto; color: var(--vinut-ls-accent); font-size: 14px; font-weight: 700; }
.vinut-language-switcher__empty { margin: 0; padding: 14px 10px; color: var(--vinut-ls-muted); font-size: 13px; line-height: 1.5; }

.vinut-language-switcher__panel.is-mobile-sheet {
    position: fixed;
    inset-block-start: auto;
    inset-inline: 12px;
    inset-inline-end: 12px;
    z-index: 9999;
    width: auto;
    max-height: min(72vh, 560px);
    min-height: 240px;
    padding: 18px 14px max(14px, env(safe-area-inset-bottom));
    border: 1px solid #e2e9e4;
    border-radius: 22px;
    background: #fff;
    box-shadow: 0 24px 72px rgb(10 22 15 / 24%), 0 5px 18px rgb(10 22 15 / 10%);
    transform-origin: bottom center;
}
.vinut-language-switcher__panel.is-mobile-sheet::before {
    position: absolute;
    top: 7px;
    left: 50%;
    width: 34px;
    height: 4px;
    border-radius: 99px;
    background: #dce4de;
    content: '';
    transform: translateX(-50%);
}
.vinut-language-switcher__panel.is-mobile-sheet .vinut-language-switcher__panel-header { margin-top: 4px; }
.vinut-language-switcher__panel.is-mobile-sheet .vinut-language-switcher__option { min-height: 46px; }

@media (prefers-reduced-motion: reduce) {
    .vinut-language-switcher__toggle,
    .vinut-language-switcher__chevron,
    .vinut-language-switcher__option { transition: none; }
    .vinut-language-switcher__panel,
    .vinut-language-switcher__scrim { animation: none; }
}
