/* ── Event Registration – form.css v1.1.0 ── */
.er-form-wrap {
    max-width: 620px;
    margin: 0 auto;
    font-family: inherit;
}

/* ── Griglia campi ── */
.er-row {
    margin-bottom: 20px;
}
.er-two-cols {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}
@media (max-width: 540px) {
    .er-two-cols { grid-template-columns: 1fr; }
}

/* ── Singolo campo ── */
.er-field {
    display: flex;
    flex-direction: column;
    gap: 5px;
}
.er-field > label {
    font-size: 1.75rem;
    font-weight: normal;
    color: #333;
    display: flex;
    align-items: baseline;
    gap: 5px;
    flex-wrap: wrap;
}
.er-req {
    color: #c0392b;
}
.er-optional {
    font-weight: 400;
    font-size: .8rem;
    color: #888;
}

/* Input testuali, email e number */
.er-field input[type="text"],
.er-field input[type="email"],
.er-field input[type="number"] {
    padding: 10px 13px;
    border: 1.5px solid #ccc;
    border-radius: 6px;
    font-size: 1.5rem;
    transition: border-color .2s, box-shadow .2s;
    background: #fff;
    width: 100%;
    box-sizing: border-box;
}
.er-field input:focus {
    border-color: #2563eb;
    outline: none;
    box-shadow: 0 0 0 3px rgba(37,99,235,.15);
}
.er-field input.er-input-error {
    border-color: #c0392b;
}
.er-field-narrow {
    max-width: 200px;
}

/* Textarea note */
.er-field textarea {
    padding: 10px 13px;
    border: 1.5px solid #ccc;
    border-radius: 6px;
    font-size: 1.5rem;
    font-family: inherit;
    resize: vertical;
    transition: border-color .2s, box-shadow .2s;
    background: #fff;
    width: 100%;
    box-sizing: border-box;
    line-height: 1.5;
}
.er-field textarea:focus {
    border-color: #2563eb;
    outline: none;
    box-shadow: 0 0 0 3px rgba(37,99,235,.15);
}

/* ── Radio modalità ── */
.er-field-radio > label:first-child {
    margin-bottom: 8px;
}
.er-radio-group {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
}
.er-radio-label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    padding: 10px 18px;
    border: 1.5px solid #ccc;
    border-radius: 8px;
    transition: border-color .2s, background .2s;
    font-size: 1.25rem;
    font-weight: normal !important;
    user-select: none;
}
.er-radio-label input[type="radio"] {
    accent-color: #2563eb;
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}
/* :has() supportato in tutti i browser moderni */
.er-radio-label:has(input:checked) {
    border-color: #2563eb;
    background: #eff6ff;
}

/* ── Checkbox privacy ── */
.er-field-checkbox {
    gap: 6px;
}
.er-checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    cursor: pointer;
    font-size: .9rem;
    line-height: 1.5;
    font-weight: normal !important;
    color: #444;
}
.er-checkbox-label input[type="checkbox"] {
    accent-color: #2563eb;
    width: 17px;
    height: 17px;
    flex-shrink: 0;
    margin-top: 2px;
    cursor: pointer;
}
.er-checkbox-label input.er-input-error {
    outline: 2px solid #c0392b;
    outline-offset: 2px;
}
.er-checkbox-label a {
    color: #2563eb;
    text-decoration: underline;
}
.er-checkbox-label a:hover {
    color: #1d4ed8;
}

/* ── Messaggi errore campo ── */
.er-error {
    font-size: .8rem;
    color: #c0392b;
    min-height: 1em;
}

/* ── Bottone submit ── */
.er-submit-row {
    margin-top: 8px;
}
.er-btn {
    display: block;
    align-items: center;
    gap: 8px;
    background: #004aad;
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 13px 28px;
    font-size: 1.5rem;
    font-weight: 600;
    cursor: pointer;
    transition: background .2s, transform .1s;
    margin: auto;
}
.er-btn:hover  { background: #1d4ed8; }
.er-btn:active { transform: scale(.98); }
.er-btn:disabled {
    background: #93c5fd;
    cursor: not-allowed;
}

/* ── Messaggio ringraziamento ── */
.er-thankyou-box {
    background: #f0fdf4;
    border: 1.5px solid #16a34a;
    border-radius: 10px;
    padding: 22px 26px;
    color: #166534;
    font-size: 1rem;
    line-height: 1.6;
}
.er-thankyou-box p { margin: 0 0 .6em; }

/* ── Errore generico ── */
.er-form-error {
    background: #fef2f2;
    border: 1.5px solid #c0392b;
    border-radius: 8px;
    padding: 14px 18px;
    color: #c0392b;
    font-size: .95rem;
}
