/* assets/css/style.css */
.ci-wrapper {
  max-width: 700px;
  margin: 0 auto;
  font-family: 'Segoe UI', sans-serif;
  color: #333;
}

.ci-corso-header {
  text-align: center;
  margin-bottom: 30px;
}

.ci-corso-info {
  display: flex;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 10px;
}

.ci-corso-info span {
  background: #fff;
  border: 2px solid #e87722;
  border-radius: 6px;
  padding: 6px 14px;
  font-size: 13px;
}

.ci-corso-info span strong {
  display: block;
  color: #e87722;
  font-size: 16px;
}

.ci-form-container {
  background: #f9f9f9;
  padding: 30px;
  border-radius: 10px;
}

.ci-form-container h3 {
  text-align: center;
  font-size: 22px;
  margin-bottom: 5px;
}

.ci-subtitle {
  text-align: center;
  font-size: 13px;
  color: #666;
  margin-bottom: 25px;
}

.ci-section {
  background: #fff;
  border-radius: 8px;
  padding: 20px;
  margin-bottom: 20px;
  border: 1px solid #eee;
}

.ci-section h4 {
  margin: 0 0 15px;
  font-size: 15px;
  color: #e87722;
  display: flex;
  align-items: center;
  gap: 8px;
}

.ci-num {
  background: #e87722;
  color: #fff;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: bold;
}

.ci-row {
  display: flex;
  gap: 15px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.ci-col { flex: 1; min-width: 140px; }
.ci-col-wide  { flex: 3; }
.ci-col-small { flex: 0.5; min-width: 80px; }
.ci-col-full  { flex: 1 0 100%; }

.ci-col label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  margin-bottom: 4px;
  color: #555;
}

.ci-col input[type="text"],
.ci-col input[type="email"],
.ci-col input[type="tel"],
.ci-col input[type="date"] {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid #ddd;
  border-radius: 5px;
  font-size: 13px;
  box-sizing: border-box;
}

.ci-col input:focus {
  outline: none;
  border-color: #e87722;
  box-shadow: 0 0 0 2px rgba(232,119,34,0.15);
}

.ci-checkboxes {
  display: flex;
  gap: 15px;
  flex-wrap: wrap;
  margin-top: 5px;
}

.ci-checkboxes label {
  font-size: 13px;
  font-weight: normal !important;
  color: #444 !important;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.ci-checkboxes input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: #1a73e8;
  cursor: pointer;
  flex-shrink: 0;
}

.ci-privacy-box {
  background: #fff8f0;
  border: 1px solid #f0c080;
  border-radius: 6px;
  padding: 12px;
  margin-top: 15px;
  font-size: 13px;
}

.ci-privacy-box input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: #1a73e8;
  cursor: pointer;
  vertical-align: middle;
  margin-right: 5px;
}

.ci-info-evento {
  background: #f0f4f8;
  border-radius: 8px;
  padding: 15px 20px;
  margin-bottom: 20px;
  font-size: 13px;
  line-height: 1.8;
}

.ci-submit-btn {
  display: block;
  width: 100%;
  background: #e87722;
  color: #fff;
  border: none;
  padding: 15px;
  border-radius: 8px;
  font-size: 16px;
  font-weight: bold;
  cursor: pointer;
  letter-spacing: 0.5px;
  transition: background 0.2s;
}

.ci-submit-btn:hover { background: #cf6010; }

#ci-message {
  padding: 12px;
  border-radius: 6px;
  margin-bottom: 20px;
  text-align: center;
  font-weight: bold;
}

#ci-message.success { background: #d4edda; color: #155724; }
#ci-message.error   { background: #f8d7da; color: #721c24; }
#ci-message.error a { color: #721c24; text-decoration: underline; }
#ci-message.error a:hover { color: #4a0f14; }

@media (max-width: 600px) {
  .ci-row { flex-direction: column; }
  .ci-corso-info { flex-direction: column; align-items: center; }
}
/* ── Header OPI evento ── */
.ci-opi-logo-area {
  text-align: center;
  margin-bottom: 8px;
}
.ci-opi-logo {
  height: 55px;
  width: auto;
}
.ci-ecm-badge {
  display: inline-block;
  background: #e87722;
  color: #fff;
  font-size: 11px;
  font-weight: bold;
  padding: 3px 14px;
  border-radius: 12px;
  letter-spacing: 0.5px;
  margin-bottom: 8px;
}
.ci-corso-titolo {
  font-size: 22px;
  font-weight: bold;
  color: #c0392b;
  text-transform: uppercase;
  margin: 6px 0 4px;
  line-height: 1.3;
}
.ci-corso-luogo-data {
  font-size: 13px;
  color: #c0392b;
  font-weight: 600;
  margin-bottom: 12px;
}
.ci-corso-info span {
  display: flex;
  flex-direction: column;
  align-items: center;
  background: #fff;
  border: 2px solid #e87722;
  border-radius: 8px;
  padding: 8px 18px;
  font-size: 20px;
  font-weight: bold;
  color: #e87722;
  min-width: 80px;
}
.ci-corso-info span small {
  font-size: 10px;
  font-weight: normal;
  color: #888;
  margin-top: 2px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

/* ══════════════════════════════════════════════════════════
   VALIDAZIONE CODICE FISCALE — feedback in tempo reale
   ══════════════════════════════════════════════════════════ */

.ci-cf-hint {
  display: block;
  font-size: 11px;
  margin-top: 4px;
  min-height: 16px;
  transition: color .2s;
}
.ci-cf-ok   { color: #2d7a34; font-weight: 600; }
.ci-cf-warn { color: #856404; font-weight: 600; }
.ci-cf-err  { color: #a00;    font-weight: 600; }

.ci-input-ok   { border-color: #46b450 !important; background: #f8fff8 !important; }
.ci-input-warn { border-color: #f0a500 !important; background: #fffdf0 !important; }
.ci-input-err  { border-color: #dc3232 !important; background: #fff8f8 !important; }

.ci-cf-compare {
  margin-top: 6px;
  border-radius: 6px;
  overflow: hidden;
}
.ci-cf-compare-inner {
  background: #fff8e1;
  border: 1px solid #f0c040;
  border-radius: 6px;
  padding: 10px 14px;
  font-size: 12px;
  line-height: 1.7;
  color: #5a4000;
}
.ci-cf-compare-inner code {
  background: #fde68a;
  padding: 1px 5px;
  border-radius: 3px;
  font-weight: bold;
  font-family: monospace;
}

/* Campo errore generico */
.ci-field-error {
  border-color: #dc3232 !important;
  background: #fff8f8 !important;
}

/* ══════════════════════════════════════════════════════════
   OPI MATERA — blocco radio + campo numero
   ══════════════════════════════════════════════════════════ */

.ci-opi-block {
  margin-bottom: 4px;
}

.ci-opi-label-row {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 4px;
}

.ci-opi-label-text {
  font-size: 12px;
  font-weight: 600;
  color: #555;
  flex-shrink: 0;
}

.ci-opi-radios {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.ci-opi-radio-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  border-radius: 20px;
  border: 2px solid #ddd;
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  transition: all .2s;
  user-select: none;
  background: #fff;
  color: #555;
}

.ci-opi-radio-label input[type="radio"] {
  margin: 0;
  accent-color: #e87722;
}

.ci-opi-si:hover,
.ci-opi-si.ci-opi-active {
  border-color: #46b450;
  background: #f0fff3;
  color: #2d7a34;
}

.ci-opi-no:hover,
.ci-opi-no.ci-opi-active {
  border-color: #dc3232;
  background: #fff0f0;
  color: #a00;
}

#ci-opi-numero-wrap {
  margin-top: 10px;
}

#ci-opi-numero {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid #ddd;
  border-left: 3px solid #46b450 !important;
  background: #f0fff3;
  border-radius: 5px;
  font-size: 13px;
  box-sizing: border-box;
}

/* ══════════════════════════════════════════════════════════
   POPUP ALERT — Solo OPI Matera
   ══════════════════════════════════════════════════════════ */

#ci-opi-alert-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0);
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  transition: background .25s;
}

#ci-opi-alert-overlay.ci-opi-alert-visible {
  background: rgba(0,0,0,.55);
}

#ci-opi-alert-box {
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 20px 60px rgba(0,0,0,.3);
  padding: 36px 32px 28px;
  max-width: 420px;
  width: 100%;
  text-align: center;
  transform: scale(.85);
  opacity: 0;
  transition: transform .25s, opacity .25s;
}

#ci-opi-alert-overlay.ci-opi-alert-visible #ci-opi-alert-box {
  transform: scale(1);
  opacity: 1;
}

#ci-opi-alert-icon {
  font-size: 52px;
  margin-bottom: 12px;
  line-height: 1;
}

#ci-opi-alert-box h3 {
  font-size: 18px;
  color: #a00;
  margin: 0 0 12px;
  line-height: 1.3;
}

#ci-opi-alert-box p {
  font-size: 14px;
  color: #555;
  line-height: 1.6;
  margin: 0 0 24px;
}

#ci-opi-alert-close {
  background: #e87722;
  color: #fff;
  border: none;
  padding: 11px 32px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: bold;
  cursor: pointer;
  transition: background .2s;
}

#ci-opi-alert-close:hover { background: #cf6010; }

@media (max-width: 480px) {
  .ci-opi-label-row  { flex-direction: column; align-items: flex-start; }
  #ci-opi-alert-box  { padding: 28px 20px 22px; }
}

/* ── Partecipante Reclutato ── */
.ci-reclutato-radios {
  display: flex;
  gap: 12px;
  margin-top: 6px;
  flex-wrap: wrap;
}

.ci-reclutato-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 20px;
  border-radius: 7px;
  border: 2px solid #ddd;
  background: #f9f9f9;
  color: #888;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: border .2s, background .2s, color .2s;
  user-select: none;
}

.ci-reclutato-label input[type="radio"] {
  accent-color: #e87722;
  width: 16px;
  height: 16px;
}

.ci-reclutato-label.ci-reclutato-active-no {
  border-color: #46b450;
  background: #f0fff0;
  color: #2a7a2e;
}

.ci-reclutato-label.ci-reclutato-active-si {
  border-color: #e87722;
  background: #fff8f0;
  color: #c0500a;
}

.ci-sponsor-info {
  background: #fff8f0;
  border: 1px solid #f0c080;
  border-radius: 7px;
  padding: 12px 15px;
  font-size: 12.5px;
  color: #5a3a00;
  line-height: 1.6;
  margin-top: 10px;
}

.ci-sponsor-info strong {
  display: block;
  font-size: 13px;
  margin-bottom: 4px;
  color: #c0500a;
}
