/* ── i18n loader ─────────────────────────────────── */
#i18n-loader {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    opacity: 0;
    transition: opacity 0.25s ease;
    pointer-events: none;
}

#i18n-loader.visible {
    opacity: 1;
    pointer-events: all;
}

#i18n-loader-card {
    background: #fff;
    border-radius: 100%;
    padding: 40px 52px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    transform: translateY(8px);
    transition: transform 0.3s ease;
}

#i18n-loader.visible #i18n-loader-card {
    transform: translateY(0);
}

/* Hoja giratoria */
@keyframes i18n-leaf-spin {
    0% {
        transform: rotate(0deg) scale(1);
    }

    50% {
        transform: rotate(180deg) scale(0.85);
    }

    100% {
        transform: rotate(360deg) scale(1);
    }
}

#i18n-loader svg {
    animation: i18n-leaf-spin 1.4s cubic-bezier(.5, 0, .5, 1) infinite;
    transform-origin: center;
}

/* Puntos */
.i18n-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #8ca527;
    display: inline-block;
}

@keyframes i18n-dot-pulse {

    0%,
    80%,
    100% {
        opacity: 0.2;
    }

    40% {
        opacity: 1;
    }
}

.i18n-dot:nth-child(1) {
    animation: i18n-dot-pulse 1.2s ease-in-out infinite 0s;
}

.i18n-dot:nth-child(2) {
    animation: i18n-dot-pulse 1.2s ease-in-out infinite 0.2s;
}

.i18n-dot:nth-child(3) {
    animation: i18n-dot-pulse 1.2s ease-in-out infinite 0.4s;
}

.lang-switcher {
    display: inline-flex;
    align-items: center;
    background: #f3f4f6;
    border-radius: 999px;
    padding: 4px;
    position: relative;
    cursor: pointer;
    user-select: none;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
    width: fit-content;
}

.lang-slider {
    position: absolute;
    top: 4px;
    left: 4px;
    height: calc(100% - 8px);
    width: calc(50% - 4px);
    background: #8ca527;
    border-radius: 999px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
    transition: transform 0.28s cubic-bezier(0.34, 1.56, 0.64, 1);
    pointer-events: none;
}

.lang-slider.right {
    transform: translateX(100%);
}

.lang-btn {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 7px 16px;
    border: none;
    background: transparent;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    color: #111827;
    transition: color 0.2s ease;
}

.lang-btn-active {
    color: #ffffff;
}