/* ALT-LANGMODAL — модалка выбора языка в нашем стиле (стекло, маджента, круглые флаги). */

.alt-lang {
    position: fixed;
    inset: 0;
    z-index: 1500;
    display: grid;
    place-items: center;
    padding: 16px;
    opacity: 0;
    pointer-events: none;
    transition: opacity .18s ease;
}
.alt-lang.show { opacity: 1; pointer-events: auto; }
.alt-lang__bg {
    position: absolute;
    inset: 0;
    background: radial-gradient(120% 90% at 50% 0%, rgba(90, 8, 72, .55), rgba(6, 3, 10, .82) 65%);
    -webkit-backdrop-filter: blur(8px) saturate(130%);
    backdrop-filter: blur(8px) saturate(130%);
}
.alt-lang__panel {
    position: relative;
    width: min(520px, 100%);
    padding: 22px 18px 20px;
    border-radius: 26px;
    background:
        linear-gradient(165deg, rgba(120, 20, 100, .34), rgba(22, 9, 26, .94) 58%),
        rgba(16, 8, 20, .92);
    -webkit-backdrop-filter: blur(24px) saturate(155%);
    backdrop-filter: blur(24px) saturate(155%);
    border: 1px solid rgba(249, 181, 204, .20);
    box-shadow: 0 30px 80px rgba(0, 0, 0, .7), 0 0 46px rgba(239, 2, 203, .20), inset 0 1px 0 rgba(255, 255, 255, .12);
    transform: translateY(10px) scale(.98);
    transition: transform .2s cubic-bezier(.22, .9, .25, 1);
}
.alt-lang.show .alt-lang__panel { transform: none; }
.alt-lang__title {
    margin: 0 0 4px;
    font: 800 22px/1.15 Unbounded, Montserrat, system-ui, sans-serif;
    color: #fff;
    text-align: center;
    letter-spacing: -.01em;
}
.alt-lang__sub {
    margin: 0 0 16px;
    font: 600 13px/1.3 Montserrat, system-ui, sans-serif;
    color: rgba(255, 255, 255, .55);
    text-align: center;
}
.alt-lang__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.alt-lang__tile {
    position: relative;
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 58px;
    padding: 10px 12px;
    border: 0;
    border-radius: 16px;
    cursor: pointer;
    text-align: left;
    color: #fff;
    background:
        linear-gradient(150deg, rgba(255, 255, 255, .12), rgba(255, 255, 255, .02) 55%),
        linear-gradient(160deg, rgba(182, 2, 206, .20), rgba(34, 10, 40, .60));
    box-shadow: inset 0 0 0 1px rgba(249, 181, 204, .14), inset 0 1px 0 rgba(255, 255, 255, .18);
    transition: transform .14s ease, box-shadow .16s ease;
}
.alt-lang__tile:active { transform: scale(.98); }
@media (hover: hover) and (pointer: fine) {
    .alt-lang__tile:hover {
        box-shadow: inset 0 0 0 1px rgba(249, 181, 204, .34), inset 0 1px 0 rgba(255, 255, 255, .24), 0 0 24px rgba(239, 2, 203, .25);
    }
}
.alt-lang__tile.is-on {
    background:
        linear-gradient(150deg, rgba(255, 255, 255, .16), rgba(255, 255, 255, .03) 55%),
        linear-gradient(160deg, rgba(239, 2, 203, .45), rgba(117, 2, 127, .55));
    box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, .45), 0 0 26px rgba(239, 2, 203, .35);
}
.alt-lang__flag { flex: none; width: 30px; height: 30px; display: grid; place-items: center; }
.alt-lang__flag svg { width: 30px; height: 30px; display: block; filter: drop-shadow(0 2px 4px rgba(0, 0, 0, .5)); }
.alt-lang__name {
    font: 800 14.5px/1.25 Montserrat, system-ui, sans-serif;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.alt-lang__check { margin-left: auto; flex: none; opacity: 0; color: #fff; transition: opacity .15s ease; }
.alt-lang__tile.is-on .alt-lang__check { opacity: 1; }
.alt-lang__x {
    position: absolute;
    right: 12px;
    top: 12px;
    width: 32px;
    height: 32px;
    display: grid;
    place-items: center;
    border: 0;
    border-radius: 50%;
    cursor: pointer;
    color: #fff;
    font: 800 14px/1 system-ui, sans-serif;
    background: rgba(255, 255, 255, .08);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .14);
}
html.alt-lang-open, html.alt-lang-open body { overflow: hidden; }
@media (max-width: 400px) {
    .alt-lang__grid { grid-template-columns: 1fr; }
    .alt-lang__title { font-size: 19px; }
}
@media (prefers-reduced-motion: reduce) {
    .alt-lang, .alt-lang__panel, .alt-lang__tile { transition-duration: 1ms; }
}
