.yana-language-select-native {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    min-height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    opacity: 0 !important;
    pointer-events: none !important;
    clip: rect(0 0 0 0) !important;
    clip-path: inset(50%) !important;
}

.yana-language-label {
    display: inline-flex !important;
    align-items: center;
    gap: 7px;
    color: #596170;
    font-weight: 800;
}

.yana-language-label::before {
    content: "translate";
    font-family: "Material Symbols Outlined";
    font-size: 18px;
    font-weight: 400;
    line-height: 1;
    color: #6b7280;
}

.yana-language-selector {
    --yana-language-track: #fbfbfc;
    --yana-language-border: #e8ebf0;
    --yana-language-active: #ffffff;
    --yana-language-strong: #1b1f2a;
    --yana-language-muted: #8a919d;
    --yana-language-shadow: 0 8px 18px rgba(15, 23, 42, 0.15), 0 1px 2px rgba(15, 23, 42, 0.08);
    position: relative;
    isolation: isolate;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0;
    width: 100%;
    min-height: 82px;
    margin-top: 12px;
    padding: 7px;
    border: 1px solid var(--yana-language-border);
    border-radius: 18px;
    background: var(--yana-language-track);
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.05), inset 0 1px 0 rgba(255, 255, 255, 0.95);
    box-sizing: border-box;
    direction: ltr;
    overflow: hidden;
}

.yana-language-selector::before {
    content: "";
    position: absolute;
    z-index: 0;
    top: 7px;
    bottom: 7px;
    left: 7px;
    width: calc(25% - 3.5px);
    border: 1px solid rgba(226, 232, 240, 0.95);
    border-radius: 12px;
    background: var(--yana-language-active);
    box-shadow: var(--yana-language-shadow);
    transition:
        left 460ms cubic-bezier(0.2, 0.9, 0.2, 1.12),
        transform 180ms ease,
        box-shadow 240ms ease;
}

.yana-language-selector[data-language-index="1"]::before {
    left: calc(25% + 3.5px);
}

.yana-language-selector[data-language-index="2"]::before {
    left: 50%;
}

.yana-language-selector[data-language-index="3"]::before {
    left: calc(75% - 3.5px);
}

.yana-language-selector:has(.yana-language-option:active)::before {
    transform: scale(0.96);
    box-shadow: 0 5px 12px rgba(15, 23, 42, 0.12);
}

.yana-language-option {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-rows: auto auto;
    place-items: center;
    gap: 6px;
    min-width: 0;
    min-height: 0;
    padding: 11px 4px 10px;
    border: 0;
    border-radius: 12px;
    background: transparent;
    color: var(--yana-language-muted);
    font-family: inherit;
    line-height: 1;
    cursor: pointer;
    user-select: none;
    touch-action: manipulation;
    transition: color 260ms ease, transform 180ms ease, opacity 220ms ease;
}

.yana-language-option:active {
    transform: scale(0.95);
}

.yana-language-option.is-active {
    color: var(--yana-language-strong);
}

.yana-language-flag {
    display: block;
    max-width: 100%;
    font-size: 18px;
    font-weight: 900;
    letter-spacing: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: transform 260ms cubic-bezier(0.2, 0.9, 0.2, 1.14), color 220ms ease;
}

.yana-language-name {
    display: block;
    max-width: 100%;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: 12px;
    font-weight: 750;
    color: var(--yana-language-muted);
    transition: transform 260ms cubic-bezier(0.2, 0.9, 0.2, 1.14), color 220ms ease;
}

.yana-language-option.is-active .yana-language-flag,
.yana-language-option.is-active .yana-language-name {
    color: var(--yana-language-strong);
}

.yana-language-check {
    position: absolute;
    top: 6px;
    inset-inline-end: 7px;
    width: 17px;
    height: 17px;
    border-radius: 999px;
    display: none;
    place-items: center;
    background: #151515;
    color: #ffffff;
    opacity: 0;
    transform: translateY(-4px) scale(0.5);
    transition:
        opacity 220ms ease,
        transform 320ms cubic-bezier(0.2, 0.9, 0.2, 1.18);
}

.yana-language-check .material-symbols-outlined {
    font-size: 13px;
    line-height: 1;
}

.yana-language-option.is-active .yana-language-check {
    opacity: 0;
    transform: translateY(-4px) scale(0.5);
}

.yana-language-option.is-animating .yana-language-flag {
    animation: yana-language-code-lift 520ms cubic-bezier(0.2, 0.9, 0.2, 1.12);
}

.yana-language-option.is-animating .yana-language-name {
    animation: yana-language-name-rise 520ms cubic-bezier(0.2, 0.9, 0.2, 1.12);
}

body.dark-mode .yana-language-label {
    color: #b7bdc7;
}

body.dark-mode .yana-language-label::before {
    color: #8f96a3;
}

body.dark-mode .yana-language-selector {
    --yana-language-track: #1a1a1a;
    --yana-language-border: #242424;
    --yana-language-active: #080808;
    --yana-language-strong: #f6f7f9;
    --yana-language-muted: #828891;
    --yana-language-shadow: 0 14px 26px rgba(0, 0, 0, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.035);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

@keyframes yana-language-code-lift {
    0% { transform: translateY(0) scale(1); }
    46% { transform: translateY(-4px) scale(1.08); }
    100% { transform: translateY(0) scale(1); }
}

@keyframes yana-language-name-rise {
    0% { transform: translateY(0); }
    46% { transform: translateY(3px); }
    100% { transform: translateY(0); }
}

@media (hover: hover) and (pointer: fine) {
    .yana-language-option:hover {
        color: var(--yana-language-strong);
        transform: translateY(-2px);
    }

    .yana-language-option:hover .yana-language-flag {
        transform: translateY(-2px) scale(1.06);
    }

    .yana-language-option:hover .yana-language-name {
        color: var(--yana-language-strong);
        transform: translateY(1px);
    }

    .yana-language-selector:has(.yana-language-option.is-active:hover)::before {
        transform: translateY(-2px) scale(1.015);
        box-shadow: 0 12px 24px rgba(15, 23, 42, 0.18), 0 2px 5px rgba(15, 23, 42, 0.08);
    }

    body.dark-mode .yana-language-selector:has(.yana-language-option.is-active:hover)::before {
        box-shadow: 0 16px 30px rgba(0, 0, 0, 0.54), inset 0 1px 0 rgba(255, 255, 255, 0.05);
    }
}

@media (max-width: 420px) {
    .yana-language-selector {
        min-height: 78px;
        padding: 6px;
        border-radius: 17px;
    }

    .yana-language-selector::before {
        top: 6px;
        bottom: 6px;
        left: 6px;
        width: calc(25% - 3px);
        border-radius: 11px;
    }

    .yana-language-selector[data-language-index="1"]::before {
        left: calc(25% + 3px);
    }

    .yana-language-selector[data-language-index="2"]::before {
        left: 50%;
    }

    .yana-language-selector[data-language-index="3"]::before {
        left: calc(75% - 3px);
    }

    .yana-language-option {
        gap: 6px;
        padding: 10px 2px 9px;
    }

    .yana-language-flag {
        font-size: 17px;
    }

    .yana-language-name {
        font-size: clamp(10.5px, 2.9vw, 12px);
    }

}

@media (max-width: 340px) {
    .yana-language-name {
        max-width: 8ch;
    }
}

@media (prefers-reduced-motion: reduce) {
    .yana-language-selector::before,
    .yana-language-option,
    .yana-language-flag,
    .yana-language-name,
    .yana-language-check {
        transition: none;
    }

    .yana-language-option.is-animating .yana-language-flag,
    .yana-language-option.is-animating .yana-language-name {
        animation: none;
    }
}
