/* ============================================================
 * ANIDIS – Auth pages: split screen layout
 * Sinistra: #051829 blu con logo | Destra: bianco con form
 * Palette: #051829 | #fdc900 | #020b12
 * ============================================================ */

body.anidis_auth_page,
body.anidis_auth_page * {
    box-sizing: border-box;
}

/* ── Sfondo pagina e centratura ─────────────────────────────── */

body.anidis_auth_page {
    background: #e8eaed;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0;
    padding: 2rem 1rem;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

/* ── Contenitore card verticale ─────────────────────────────── */

.anidis_split {
    display: flex;
    flex-direction: column;
    width: 100%;
    max-width: 580px;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 12px 48px rgba(0, 0, 0, 0.22), 0 2px 8px rgba(0, 0, 0, 0.12);
}

/* ── Banner in cima alla card ───────────────────────────────── */

.anidis_split_left {
    width: 100%;
    flex-shrink: 0;
    line-height: 0; /* elimina lo spazio sotto l'img */
}

/* Foto banner: larghezza piena, altezza proporzionale */
.anidis_split_left .anidis_banner_img {
    display: block;
    width: 100%;
    height: auto;
}

/* Fallback senza immagine: blocco navy di altezza minima */
.anidis_split_left:not(.anidis_has_banner) {
    background-color: #051829;
    min-height: 160px;
}

/* Contenuto branding centrato */
.anidis_split_brand {
    position: relative;
    z-index: 1;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0;
}

.anidis_auth_site_name {
    display: block;
    font-size: 1.5rem;
    font-weight: 700;
    color: #fdc900;
    letter-spacing: -0.01em;
    text-align: center;
}

/* Sottotitolo sotto il logo */
.anidis_split_subtitle {
    display: block;
    color: rgba(255, 255, 255, 0.65);
    font-size: 0.85rem;
    letter-spacing: 0.04em;
    margin-top: 1.5rem;
    text-transform: uppercase;
}

/* Linea oro decorativa */
.anidis_split_accent {
    display: block;
    width: 40px;
    height: 3px;
    background: #fdc900;
    border-radius: 2px;
    margin-top: 0.85rem;
}

/* ── Sezione form bianca ────────────────────────────────────── */

.anidis_split_right {
    background: #ffffff;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 2rem 3rem 3rem;
    overflow-y: auto;
}

/* Titolo convegno sopra il form (esterno al banner) */
.anidis_card_title {
    width: 100%;
    max-width: 480px;
    text-align: center;
    margin-bottom: 1.5rem;
}

.anidis_card_title p {
    font-size: 0.78rem;
    font-weight: 700;
    color: #051829;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin: 0 0 0.5rem;
}

.anidis_card_title .anidis_split_accent {
    margin: 0 auto;
}

/* ── Form wrapper ───────────────────────────────────────────── */

.anidis_auth_card {
    width: 100%;
    max-width: 400px;
}

/* ── Titolo del form ────────────────────────────────────────── */

.anidis_auth_card h1 {
    font-size: 1.5rem;
    font-weight: 700;
    color: #051829;
    margin: 0 0 0.4rem 0;
    padding: 0;
    border: none;
    letter-spacing: -0.01em;
}

.anidis_auth_card h1::after {
    content: "";
    display: block;
    width: 36px;
    height: 3px;
    background: #fdc900;
    margin-top: 0.6rem;
    margin-bottom: 1.75rem;
    border-radius: 2px;
}

/* ── Messaggi errore ────────────────────────────────────────── */

.anidis_auth_card .pkp_form_error,
.anidis_auth_card #formErrors {
    background: #fff5f5;
    border: 1px solid #feb2b2;
    border-radius: 6px;
    color: #c53030;
    padding: 0.8rem 1rem;
    font-size: 0.875rem;
    margin-bottom: 1.5rem;
    list-style: none;
}

.anidis_auth_message {
    background: #ebf8ff;
    border: 1px solid #bee3f8;
    border-radius: 6px;
    color: #2c5282;
    padding: 0.8rem 1rem;
    font-size: 0.875rem;
    margin-bottom: 1.5rem;
}

/* ── Fieldset e legend ──────────────────────────────────────── */

.anidis_auth_card fieldset {
    border: none;
    padding: 0;
    margin: 0 0 0.5rem 0;
}

.anidis_auth_card fieldset legend {
    font-size: 0.72rem;
    font-weight: 700;
    color: #051829;
    text-transform: uppercase;
    letter-spacing: 0.09em;
    padding-bottom: 0.4rem;
    border-bottom: 2px solid #fdc900;
    width: 100%;
    margin-bottom: 1rem;
    display: block;
}

/* ── Campi form ─────────────────────────────────────────────── */

.anidis_auth_card .cmp_form .fields > div,
.anidis_auth_card .fields > div {
    margin-bottom: 1.1rem;
}

.anidis_auth_card .cmp_form .label,
.anidis_auth_card .label {
    display: block;
    font-size: 0.82rem;
    font-weight: 600;
    color: #051829;
    margin-bottom: 0.35rem;
}

.anidis_auth_card .cmp_form input[type="text"],
.anidis_auth_card .cmp_form input[type="password"],
.anidis_auth_card .cmp_form input[type="email"],
.anidis_auth_card .cmp_form select,
.anidis_auth_card input[type="text"],
.anidis_auth_card input[type="password"],
.anidis_auth_card input[type="email"],
.anidis_auth_card select {
    width: 100%;
    max-width: 100%; /* sovrascrive il max-width: 20em del Default Theme */
    padding: 0.7rem 0.9rem;
    height: auto;    /* sovrascrive l'height fisso del Default Theme */
    border: 1.5px solid #d1d9e0;
    border-radius: 5px;
    font-size: 0.95rem;
    line-height: 1.4;
    color: #051829;
    background: #fff;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
    margin: 0;
    box-sizing: border-box;
}

/* Rende visibile il valore selezionato nella select della nazione */
.anidis_auth_card select option {
    color: #051829;
    background: #fff;
}

.anidis_auth_card input:focus,
.anidis_auth_card select:focus {
    outline: none;
    border-color: #051829;
    box-shadow: 0 0 0 3px rgba(5, 24, 41, 0.1);
}

/* ── Link password dimenticata ──────────────────────────────── */

.anidis_forgot {
    display: block;
    font-size: 0.78rem;
    color: #051829;
    text-decoration: none;
    margin-top: 0.4rem;
    text-align: right;
    opacity: 0.55;
}

.anidis_forgot:hover {
    opacity: 1;
    text-decoration: underline;
}

/* ── Checkbox ───────────────────────────────────────────────── */

.anidis_auth_card .checkbox label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
}

.anidis_auth_card .checkbox .label {
    font-size: 0.85rem;
    font-weight: 400;
    color: #6a6a6a;
    margin-bottom: 0;
}

.anidis_auth_card input[type="checkbox"] {
    margin-top: 0.15rem;
    flex-shrink: 0;
    width: auto;
    accent-color: #051829;
}

.anidis_auth_card .required {
    color: #c53030;
    margin-left: 0.1rem;
}

/* ── Pulsanti ───────────────────────────────────────────────── */

.anidis_auth_card .buttons {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
    margin-top: 1.75rem;
}

.anidis_auth_card .buttons .submit {
    display: block;
    width: 100%;
    padding: 0.875rem 1rem;
    background: #fdc900;
    color: #051829;
    border: none;
    border-radius: 5px;
    font-size: 0.95rem;
    font-weight: 700;
    cursor: pointer;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    text-align: center;
    text-decoration: none;
    transition: background 0.15s ease, transform 0.1s ease;
    line-height: 1;
    box-sizing: border-box;
}

.anidis_auth_card .buttons .submit:hover {
    background: #e4b500;
}

.anidis_auth_card .buttons .submit:active {
    background: #c9a000;
    transform: translateY(1px);
}

.anidis_auth_card .buttons a {
    display: block;
    text-align: center;
    font-size: 0.875rem;
    color: #051829;
    text-decoration: none;
    padding: 0.35rem;
    opacity: 0.6;
}

.anidis_auth_card .buttons a:hover {
    opacity: 1;
    text-decoration: underline;
}

/* ── CAPTCHA ────────────────────────────────────────────────── */

.anidis_auth_card .recaptcha_wrapper,
.anidis_auth_card .altcha_wrapper {
    margin-top: 1rem;
}

/* ── Responsive: tablet e mobile ────────────────────────────── */

@media (max-width: 600px) {
    body.anidis_auth_page {
        padding: 0;
        align-items: stretch;
    }

    .anidis_split {
        border-radius: 0;
        box-shadow: none;
        max-width: 100%;
    }

    .anidis_split_left {
        min-height: 160px;
        padding: 1.25rem 1.5rem;
    }

    .anidis_split_right {
        padding: 2rem 1.5rem;
        align-items: flex-start;
    }

    .anidis_auth_card {
        max-width: 100%;
    }
}
