:root {
    --vs-red: #e2232a;
    --vs-red-dark: #be1d22;
    --vs-paper: #fffdf9;
    --vs-ink: #1d1d1f;
}

* {
    box-sizing: border-box;
}

.lang-switcher {
    position: fixed;
    top: var(--switcher-offset, 14px);
    right: 14px;
    z-index: 1200;
}

.lang-switcher__label {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

.lang-switcher__select {
    width: 40px;
    min-width: 40px;
    height: 34px;
    border: 1px solid transparent;
    border-radius: 10px;
    background: transparent;
    color: #514e52;
    font: 600 18px/1 -apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", sans-serif;
    padding: 7px 8px;
    box-shadow: none;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    cursor: pointer;
    text-align: center;
}

.lang-switcher__select:focus {
    outline: 2px solid rgba(226, 35, 42, 0.32);
    outline-offset: 1px;
    background: #ffece8;
}

.lang-switcher__select:hover {
    background: #ffe6e0;
    color: #2d2b30;
}

.lang-switcher:not(.lang-switcher--nav) .lang-switcher__select {
    border-color: rgba(30, 31, 34, 0.16);
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.14);
}

.lang-switcher--nav {
    position: static;
    top: auto;
    right: auto;
    z-index: auto;
}

.lang-switcher--nav .lang-switcher__select {
    width: auto;
    min-width: 154px;
    max-width: 220px;
    padding: 7px 10px;
    text-align: left;
    font-size: 14px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

html[dir="rtl"] .lang-switcher {
    right: auto;
    left: 14px;
}

html[dir="rtl"] .lang-switcher__label,
html[dir="rtl"] .lang-switcher__select {
    text-align: right;
}

@media (max-width: 600px) {
    .lang-switcher:not(.lang-switcher--nav) .lang-switcher__select {
        width: 36px;
        min-width: 36px;
        height: 32px;
        font-size: 16px;
        padding: 6px 7px;
    }

    .lang-switcher--nav .lang-switcher__select {
        min-width: 132px;
        max-width: 176px;
        height: 32px;
        font-size: 13px;
        padding: 6px 9px;
    }
}
