/* Language gate & switcher */
html.lang-gate-active,
html.lang-gate-active body {
    overflow: hidden;
}

body.lang-gate-pending .main-header,
body.lang-gate-pending .main-content,
body.lang-gate-pending .main-footer,
body.lang-gate-pending .lang-sidebar {
    visibility: hidden;
}

.lang-gate {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(8px);
    transition: opacity 0.45s ease, visibility 0.45s ease;
}

.lang-gate--leaving {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.lang-gate__panel {
    text-align: center;
    padding: 2rem 1.5rem;
    max-width: 420px;
    width: 100%;
}

.lang-gate__logo {
    margin: 0 auto 1.25rem;
    display: block;
    height: auto;
}

.lang-gate__title {
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0 0 0.5rem;
    color: var(--color-black, #111);
}

.lang-gate__subtitle {
    margin: 0 0 2rem;
    color: var(--color-gray, #666);
    font-size: 1rem;
    line-height: 1.5;
}

.lang-gate__options {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.lang-gate__option {
    width: 100%;
    padding: 1rem 1.25rem;
    font-size: 1.05rem;
    font-weight: 600;
    border: 1px solid var(--color-border-beige, #e8dfd0);
    border-radius: 8px;
    background: #fff;
    color: var(--color-black, #111);
    cursor: pointer;
    transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.lang-gate__option:hover {
    background: var(--color-beige-light, #f5f0e8);
    border-color: var(--color-beige, #c4a574);
    transform: translateY(-1px);
}

.lang-gate__option:disabled {
    opacity: 0.6;
    cursor: default;
    transform: none;
}

.header-lang {
    grid-column: 1;
    justify-self: start;
    display: flex;
    align-items: center;
}

.lang-sidebar {
    display: none;
}

.lang-switcher {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.2rem;
    border: 1px solid var(--color-border-beige, #e8dfd0);
    border-radius: 999px;
    background: #fff;
}

.lang-switcher--hidden {
    visibility: hidden;
}

.lang-switcher__btn {
    min-width: 2.25rem;
    padding: 0.35rem 0.55rem;
    border: none;
    border-radius: 999px;
    background: transparent;
    color: var(--color-gray, #666);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease;
}

.lang-switcher__btn:hover {
    color: var(--color-black, #111);
    background: rgba(0, 0, 0, 0.04);
}

.lang-switcher__btn.is-active {
    background: var(--color-beige, #c4a574);
    color: #fff;
}

.lang-switcher__ghost {
    position: fixed;
    z-index: 10001;
    margin: 0;
    pointer-events: none;
    transition: transform 0.65s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.2s ease 0.55s;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

/* Tablet + mobiel: sticky sidebar links */
@media (max-width: 1024px) {
    .header-lang {
        display: none;
    }

    .lang-sidebar {
        display: block;
        position: fixed;
        left: 0;
        top: 50%;
        transform: translateY(-50%);
        z-index: 1001;
        padding-left: env(safe-area-inset-left, 0);
    }

    .lang-switcher--sidebar {
        flex-direction: column;
        gap: 0.2rem;
        padding: 0.35rem 0.25rem;
        border-radius: 0 10px 10px 0;
        border-left: none;
        box-shadow: 2px 0 16px rgba(10, 10, 10, 0.08);
    }

    .lang-switcher--sidebar .lang-switcher__btn {
        min-width: 2.5rem;
        min-height: 2.5rem;
        padding: 0.4rem 0.35rem;
        font-size: 0.7rem;
    }
}

/* Desktop: horizontaal in navbar */
@media (min-width: 1025px) {
    .lang-sidebar {
        display: none;
    }
}
