/* stili_evento.css */

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background: #f3f4f6;
    color: #111827;
    line-height: 1.5;
}

.page-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
}

.form-card {
    background: #ffffff;
    border-radius: 12px;
    max-width: 520px;
    width: 100%;
    padding: 20px 18px 22px;
    box-shadow: 0 10px 25px rgba(15, 23, 42, 0.12);
}

/* su mobile molto stretti la card arriva a tutta larghezza */
@media (max-width: 480px) {
    .page-wrapper {
        padding: 8px;
    }

    .form-card {
        border-radius: 0;
        max-width: 100%;
        box-shadow: none;
        padding: 16px 12px 18px;
    }

    body {
        font-size: 15px;
    }
}

.form-card h1 {
    font-size: 1.5rem;
    margin-bottom: 4px;
}

/* Header evento */
.event-header {
    margin-bottom: 16px;
}

.event-title {
    font-size: 1.3rem;
    font-weight: 700;
    color: #111827;
    margin-bottom: 4px;
}

.event-description {
    font-size: 0.95rem;
    color: #374151;
    margin-bottom: 2px;
}

.event-date {
    font-size: 0.85rem;
    color: #6b7280;
}

.event-subtitle {
    font-size: 0.875rem;
    color: #6b7280;
    margin-bottom: 16px;
}

.alert {
    padding: 10px 12px;
    border-radius: 8px;
    font-size: 0.9rem;
    margin-bottom: 16px;
}

.alert-success {
    background-color: #ecfdf3;
    color: #166534;
    border: 1px solid #bbf7d0;
}

.alert-error {
    background-color: #fef2f2;
    color: #b91c1c;
    border: 1px solid #fecaca;
}

.form-row {
    margin-bottom: 12px;
    display: flex;
    flex-direction: column;
}

.form-row label {
    font-size: 0.9rem;
    margin-bottom: 4px;
    color: #374151;
}

.form-row input,
.form-row select {
    border-radius: 8px;
    border: 1px solid #d1d5db;
    padding: 8px 10px;
    font-size: 0.95rem;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
    width: 100%;
}

.form-row input:focus,
.form-row select:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.25);
}

.form-row input.error,
.form-row select.error {
    border-color: #dc2626;
}

.error-msg {
    font-size: 0.8rem;
    color: #b91c1c;
    margin-top: 2px;
    min-height: 14px;
}

.form-actions {
    margin-top: 18px;
    display: flex;
    justify-content: flex-end;
}

#btn-submit {
    background-color: #2563eb;
    color: #ffffff;
    border: none;
    border-radius: 999px;
    padding: 10px 20px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.15s ease, transform 0.1s ease;
    width: auto;
}

/* su mobile il bottone può essere più largo e centrato */
@media (max-width: 480px) {
    .form-actions {
        justify-content: center;
    }

    #btn-submit {
        width: 100%;
    }
}

/* campi extra albo, nascosti di default */
.form-row-albo-extra {
    display: none;
}

.form-row-albo-extra.visible {
    display: flex;
    flex-direction: column;
}

/* Stili riepilogo (usati nella pagina di conferma) */
.section-title {
    font-size: 1rem;
    margin-top: 18px;
    margin-bottom: 8px;
    color: #111827;
}

.summary-list {
    margin-bottom: 8px;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    padding: 4px 0;
    border-bottom: 1px solid #e5e7eb;
    font-size: 0.9rem;
    gap: 8px;
}

.summary-row dt {
    font-weight: 600;
    color: #374151;
    margin-right: 8px;
    flex: 0 0 40%;
}

.summary-row dd {
    margin: 0;
    text-align: right;
    color: #111827;
    flex: 1 1 60%;
    word-wrap: break-word;
}

/* versione più leggibile su schermi piccoli */
@media (max-width: 480px) {
    .summary-row {
        flex-direction: column;
        align-items: flex-start;
        font-size: 0.95rem;
    }

    .summary-row dt {
        flex: 0 0 auto;
        margin-right: 0;
        margin-bottom: 2px;
        text-align: left;
    }

    .summary-row dd {
        text-align: left;
        width: 100%;
    }
}

.btn-link {
    text-decoration: none;
    background-color: #e5e7eb;
    color: #111827;
    border-radius: 999px;
    padding: 8px 16px;
    font-size: 0.9rem;
    font-weight: 500;
    transition: background-color 0.15s ease;
}

.btn-link:hover {
    background-color: #d1d5db;
}

@media (max-width: 576px) {
    .form-card {
        padding: 16px 12px 18px;
    }
}


.table-wrapper {
    margin-top: 12px;
    overflow-x: auto;
}

.iscritti-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
    border: 1px solid #d1d5db; /* bordo esterno tabella grigio */
}

.iscritti-table th,
.iscritti-table td {
    border: 1px solid #d1d5db; /* bordi tra righe e colonne */
    padding: 6px 4px;
    text-align: left;
}

.iscritti-table th {
    background-color: #f9fafb;
    font-weight: 600;
    color: #374151;
}

@media (max-width: 480px) {
    .iscritti-table {
        font-size: 0.8rem;
    }
}

.input-uppercase {
    text-transform: uppercase;
}
