/* FONT E BODY */
body {
    font-family: 'Libre Baskerville', serif;
    margin: 0;
    padding: 0;
    background: #fff; /* Sfondo pagina bianco */
    color: #849eac;
}

/* SEZIONE FORM */
.form-section,
.rsvp-section {
    padding: 0px 20px 40px 20px;
    background: #f2f2f2; /* Nessuno sfondo aggiuntivo */
}

/* CONTAINER */
.container {
    max-width: 800px;
    margin: auto;
    padding: 20px;
    background: transparent; /* Tolto sfondo */
    border-radius: 0; /* Nessun bordo arrotondato */
    border: none;
    box-shadow: none; /* Nessuna ombra */
    color: #849eac;
}

/* TITOLO */
h1 {
    margin-bottom: 5px;
    font-size: 32px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    text-align: center;
}

/* SOTTOTITOLO */
.subtitle {
    margin: 5px 0 25px 0;
    font-size: 16px;
    line-height: 1.5;
    text-align: center;
}

/* LABEL */
label {
    display: block;
    margin-bottom: 5px;
    text-transform: uppercase; /* Maiuscoli */
    letter-spacing: 0.5px;
    font-weight: 400; /* Non grassetto */
    font-size: 14px;

}

/* INPUT E SELECT */
input,
select {
    width: 100%;
    padding: 10px 12px;
    margin-bottom: 18px; /* Spazio sotto ogni campo */
    border: 1px solid #ccc;
    border-radius: 5px;
    box-sizing: border-box;
    background-color: #fff; /* Campo bianco */
    color: #849eac;
    font-family: 'Libre Baskerville', serif;
}
input {    font-size: 11px;}
select {     font-size: 18px; }
select option { font-size: 18px; }

/* Migliora leggibilità delle opzioni su mobile */
@media (max-width: 640px) {
  select { font-size: 18px; }
  select option { font-size: 18px; }
}

#righe_partecipanti input, select {
    width: calc(33.33% - 8px);
    padding: 10px 12px;
    margin-bottom: 10px;
    border: 1px solid #ccc;
    border-radius: 5px;
    box-sizing: border-box;
    background-color: #fff;
    color: #849eac;
    margin-right: 5px;
    font-family: 'Libre Baskerville', serif;
}

/* Layout riga partecipanti */
#righe_partecipanti .participant-row {
    display: flex;
    flex-wrap: wrap;
    gap: 12px 12px;
    margin: 20px 0px;
}

/* Assicura che l'etichetta (Adulto 1, Bambino 1, ...) stia su una riga separata */
#righe_partecipanti .participant-label {
    flex: 0 0 100%;
    width: 100%;
    font-weight: 600;
    margin-bottom: 4px;
}

/* Responsive: su mobile, Cognome+Nome al 50%, Intolleranza al 100% su due righe */
@media (max-width: 640px) {
    #righe_partecipanti .cognome-partecipante,
    #righe_partecipanti .nome-partecipante {
        width: calc(48% - 5px) !important;
    }
    #righe_partecipanti .intolleranza-partecipante {
        width: 100% !important;
    }
}

/* RIGHE FORM */
.form-row {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.form-row > div {
    flex: 1;
    min-width: 220px;
}

/* DIVISORE */
.divider {
    border-top: 1px solid #ccc;
    margin: 25px 0 15px 0;
}

/* PULSANTE */
button {
    background-color: #849eac;
    font-family: 'Libre Baskerville', serif;
    color: #fff;
    padding: 12px 24px;
    border: none;
    border-radius: 5px;
    font-size: 18px;
    cursor: pointer;
    transition: background 0.3s ease;
    width: auto; /* Pulsante compatto */
    font-weight: 400; /* Non grassetto */
    display: block;
    margin: 20px auto 0;
}

button:hover {
    background-color: #000;
}

/* CAMPO HONEYPOT (ANTISPAM) */
.hidden-field {
    display: none !important;
}

.ok-message {
    text-align: center;
    padding: 30px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.1);
}

.ok-message h2 {
    color: #28a745;
    margin-bottom: 10px;
    font-weight: 400;
    font-size: 22px;
    text-transform: uppercase;
}

.ok-message p {
    font-size: 16px;
    color: #333;
    margin-bottom: 20px;
}

.home-button {
    display: inline-block;
    padding: 10px 20px;
    background: #007bff;
    color: white;
    text-decoration: none;
    border-radius: 5px;
    transition: background 0.3s;
    font-family: 'Libre Baskerville', serif;
}

.home-button:hover {
    background: #0056b3;
}

.popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.6);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.popup-content {
    background: #fff;
    padding: 20px;
    border-radius: 10px;
    width: 90%;
    max-width: 500px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
    font-family: 'Lato', sans-serif;
}

.close-btn {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 22px;
    cursor: pointer;
}

.btn-save {
    display: block;
    margin-top: 15px;
    width: 100%;
    padding: 10px;
    background: #2b7de9;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
}

.btn-save:hover {
    background: #1a66d4;
}
/* Simple spinner keyframes used by loading overlay */
@keyframes spin {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

/* Mobile padding cap for RSVP section */
@media (max-width: 768px) {
  .rsvp-section { padding-left: 20px !important; padding-right: 20px !important; }
}
