/**
 * INSTUTECH — Language Switcher Styles
 * Mobile-first, works on all pages
 */

/* ── Language Switcher Pill ─────────────────────────────────── */
.it-lang-switcher {
    display: inline-flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 20px;
    padding: 3px;
    gap: 2px;
    user-select: none;
    flex-shrink: 0;
}

.it-lang-switcher button {
    border: none;
    background: transparent;
    color: rgba(255, 255, 255, 0.5);
    font-size: 12px;
    font-weight: 600;
    font-family: inherit;
    padding: 5px 10px;
    border-radius: 16px;
    cursor: pointer;
    transition: all 0.2s ease;
    letter-spacing: 0.3px;
    line-height: 1;
}

.it-lang-switcher button:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.08);
}

.it-lang-switcher button.active {
    background: rgba(0, 240, 255, 0.18);
    color: #00f0ff;
    box-shadow: 0 0 10px rgba(0, 240, 255, 0.15);
}

/* ── Login Page Language Switcher ────────────────────────────── */
.login-lang-selector-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    z-index: 100;
    width: 100%;
    margin-bottom: 2rem;
    position: relative;
}

.lang-selector-label {
    font-size: 13px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.7);
    text-shadow: 0 1px 3px rgba(0,0,0,0.5);
    font-family: 'Outfit', sans-serif;
    text-align: center;
    letter-spacing: 0.5px;
}

.login-lang-selector-container .it-lang-switcher {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 24px;
    padding: 4px;
    backdrop-filter: blur(10px);
}

.login-lang-selector-container .it-lang-switcher button {
    font-size: 13px;
    padding: 6px 16px;
    border-radius: 20px;
    color: rgba(255, 255, 255, 0.6);
}

.login-lang-selector-container .it-lang-switcher button.active {
    background: rgba(0, 240, 255, 0.2);
    border: 1px solid rgba(0, 240, 255, 0.4);
    color: #00f0ff;
    box-shadow: 0 0 12px rgba(0, 240, 255, 0.25);
}

/* ── Settings Language Section ───────────────────────────────── */
.it-lang-setting-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.it-lang-setting-label {
    font-size: 14px;
    color: #ccc;
    display: flex;
    align-items: center;
    gap: 8px;
}

.it-lang-setting-label i {
    color: #00f0ff;
    font-size: 15px;
}

/* ── Setup Language Modal (Layer 1) ──────────────────────────── */
#it-setup-lang-modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    padding: 20px;
    animation: itModalFadeIn 0.25s ease;
}

#it-setup-lang-modal .it-modal-card {
    background: linear-gradient(145deg, #0f1724, #141e2e);
    border: 1px solid rgba(0, 240, 255, 0.2);
    border-radius: 20px;
    padding: 32px 28px;
    max-width: 360px;
    width: 100%;
    text-align: center;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6), 0 0 40px rgba(0, 240, 255, 0.05);
}

#it-setup-lang-modal .it-modal-logo {
    width: 52px;
    height: 52px;
    margin: 0 auto 16px;
    display: block;
}

#it-setup-lang-modal .it-modal-title {
    font-size: 20px;
    font-weight: 700;
    color: #fff;
    margin: 0 0 8px;
}

#it-setup-lang-modal .it-modal-subtitle {
    font-size: 13px;
    color: #8b9ab8;
    margin: 0 0 24px;
    line-height: 1.5;
}

#it-setup-lang-modal .it-lang-options {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 24px;
}

#it-setup-lang-modal .it-lang-option {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    border: 1.5px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    background: rgba(255, 255, 255, 0.03);
}

#it-setup-lang-modal .it-lang-option:hover {
    border-color: rgba(0, 240, 255, 0.3);
    background: rgba(0, 240, 255, 0.05);
}

#it-setup-lang-modal .it-lang-option.selected {
    border-color: #00f0ff;
    background: rgba(0, 240, 255, 0.1);
}

#it-setup-lang-modal .it-lang-option input[type="radio"] {
    accent-color: #00f0ff;
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

#it-setup-lang-modal .it-lang-option .it-lang-name {
    font-size: 15px;
    font-weight: 600;
    color: #fff;
}

#it-setup-lang-modal .it-lang-option .it-lang-native {
    font-size: 12px;
    color: #8b9ab8;
    margin-top: 2px;
}

#it-setup-lang-modal .it-continue-btn {
    width: 100%;
    padding: 14px;
    background: linear-gradient(90deg, #00c9ff, #7b2fff);
    border: none;
    border-radius: 12px;
    color: #fff;
    font-size: 15px;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.2s ease;
    letter-spacing: 0.3px;
}

#it-setup-lang-modal .it-continue-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 20px rgba(123, 47, 255, 0.4);
}

/* ── Language-specific font override ─────────────────────────── */
:root {
    --font-lang: 'Outfit', sans-serif;
}

/* Apply lang font to body when language-specific font is set */
body {
    font-family: var(--font-lang);
}

/* ── Animations ───────────────────────────────────────────────── */
@keyframes itModalFadeIn {
    from { opacity: 0; transform: scale(0.96); }
    to   { opacity: 1; transform: scale(1); }
}

/* ── Mobile Adjustments ───────────────────────────────────────── */
@media (max-width: 480px) {
    .it-lang-switcher button {
        padding: 5px 8px;
        font-size: 11px;
    }

    #it-setup-lang-modal .it-modal-card {
        padding: 24px 20px;
    }
}
