/* password_gate_styles.css */

/* Variabili base (se non già importate o definite globalmente) */
:root {
    --color-primary: #FF6600;
    --color-secondary: #19C37D;
    --color-background-app: #0f141b;
    --color-background-content: #1a2432;
    --color-background-subtle: #243142;
    --color-text-dark: #ecf0f7;
    --color-text-medium: #a0aec0;
    --color-text-muted: #718096;
    --color-error: #DC3545;
    --color-border: #2d3748;
    --color-border-light: #404b5a;
    --font-family-primary: 'Inter', sans-serif;
    --border-radius-md: 8px;
    --border-radius-full: 50%;
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 8px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 8px 16px rgba(0, 0, 0, 0.5);
    --z-index-dropdown: 1000;
}

/* Stili per l'overlay del password gate */
#civora-password-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--color-background-app);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 99999;
    flex-direction: column;
    color: var(--color-text-dark);
    font-family: var(--font-family-primary);
    text-align: center;
    padding: 20px;
    box-sizing: border-box;
}

#civora-password-overlay > div { /* contentDiv */
    max-width: 400px;
    background: var(--color-background-content);
    padding: 40px;
    border-radius: 12px;
    box-shadow: var(--shadow-lg);
    position: relative; /* Per posizionare il language selector al suo interno se necessario, altrimenti va al root dell'overlay */
}

#civora-password-overlay img {
    max-width: 120px;
    margin-bottom: 25px;
    display: block;
    margin-left: auto;
    margin-right: auto;
}

#civora-password-overlay h1 {
    color: var(--color-primary);
    margin-bottom: 25px;
    font-size: 1.8em;
}

#civora-password-overlay p {
    color: var(--color-text-medium);
    margin-bottom: 30px;
    line-height: 1.6;
    font-size: 1em;
}

#civora-password-overlay input[type="password"] {
    width: calc(100% - 20px);
    padding: 12px 10px;
    margin-bottom: 20px;
    border: 1px solid var(--color-border);
    border-radius: var(--border-radius-md);
    background: var(--color-background-subtle);
    color: var(--color-text-dark);
    font-size: 1.1em;
    outline: none;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.3);
    transition: border-color 0.3s ease;
}

#civora-password-overlay input[type="password"]:focus {
    border-color: var(--color-primary);
}

#civora-password-overlay button {
    background: var(--color-primary);
    color: var(--color-background-app); /* Testo scuro per contrasto */
    padding: 12px 25px;
    border: none;
    border-radius: var(--border-radius-md);
    font-size: 1.1em;
    cursor: pointer;
    transition: background 0.3s ease, transform 0.2s ease;
    font-weight: bold;
    box-shadow: var(--shadow-md);
}

#civora-password-overlay button:hover {
    background: #ff8533; /* Primary light per hover */
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.4);
}

#civora-password-overlay button:active {
    transform: translateY(0);
    box-shadow: var(--shadow-sm);
}

#civora-password-overlay .error-message {
    color: var(--color-error);
    margin-top: 15px;
    visibility: hidden;
    font-size: 0.9em;
}

/* --- NEW: Stili per il selettore lingua personalizzato --- */
#password-gate-lang-selector-container {
    position: absolute; /* Posizionalo rispetto all'overlay principale */
    top: 20px;
    right: 20px;
    z-index: 10000; /* Assicurati che sia sopra il contentDiv */
}

.password-gate-lang-button {
    background: linear-gradient(135deg, var(--color-secondary), #2196F3); /* Gradiente vivace */
    border: none;
    width: 48px;
    height: 48px;
    border-radius: var(--border-radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 24px; /* Dimensione dell'icona */
    cursor: pointer;
    box-shadow: var(--shadow-md);
    transition: all 0.3s ease;
    position: relative; /* Per il potenziale badge, anche se non lo useremo qui */
}

.password-gate-lang-button:hover {
    transform: scale(1.05);
    box-shadow: var(--shadow-lg);
}

.password-gate-lang-button:active {
    transform: scale(0.98);
}

.password-gate-lang-button:focus-visible {
    outline: 2px solid var(--color-primary);
    outline-offset: 3px;
    border-radius: var(--border-radius-full);
}

/* Stili per il dropdown delle lingue */
.password-gate-lang-dropdown {
    display: none; /* Nascosto di default */
    position: absolute;
    top: calc(100% + 10px); /* Sotto il bottone */
    right: 0;
    background-color: var(--color-background-content);
    border: 1px solid var(--color-border-light);
    border-radius: var(--border-radius-md);
    box-shadow: var(--shadow-lg);
    min-width: 160px;
    overflow: hidden;
    animation: fadeInScale 0.2s ease-out; /* Animazione di apertura */
    transform-origin: top right;
}

.password-gate-lang-dropdown.show {
    display: flex;
    flex-direction: column;
}

.password-gate-lang-dropdown a {
    padding: 10px 15px;
    color: var(--color-text-dark);
    text-align: left;
    transition: background-color 0.2s ease, color 0.2s ease;
    display: block; /* Rende l'intera area cliccabile */
    font-size: 0.95em;
    font-weight: 500;
}

.password-gate-lang-dropdown a:hover {
    background-color: var(--color-background-subtle);
    color: var(--color-primary);
}

.password-gate-lang-dropdown a.active-lang {
    background-color: var(--color-primary-ultralight); /* Sfondo leggero per la lingua attiva */
    color: var(--color-primary);
    font-weight: bold;
}

@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}
/* --- FINE NEW: Stili per il selettore lingua personalizzato --- */

/* Animazioni generiche */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}