/* 
  SARDINIAN VETERANS - Stili Form di Iscrizione
  ==============================================
  Questo file va caricato nel child theme o inline nel widget HTML.
  Vedi guida implementazione per le istruzioni.
*/

/* ---- Reset e contenitore principale ---- */
#sv-registration-form {
  max-width: 800px;
  margin: 0 auto;
  padding: 20px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  color: #333;
  font-size: 15px;
  line-height: 1.5;
}

#sv-registration-form * {
  box-sizing: border-box;
}

/* ---- Sezioni ---- */
.sv-section {
  background: #fff;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  padding: 28px 24px;
  margin-bottom: 24px;
}

.sv-section-title {
  font-size: 20px;
  font-weight: 700;
  margin: 0 0 20px 0;
  padding-bottom: 12px;
  border-bottom: 2px solid #1a5276;
  color: #1a5276;
}

.sv-subsection-title {
  font-size: 16px;
  font-weight: 600;
  margin: 16px 0 12px 0;
  color: #2c3e50;
}

/* ---- Griglia ---- */
.sv-row {
  display: flex;
  gap: 16px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.sv-col {
  flex: 1;
  min-width: 240px;
}

.sv-col-full {
  flex: 0 0 100%;
  min-width: 100%;
}

/* ---- Campi form ---- */
#sv-registration-form label {
  display: block;
  font-weight: 600;
  margin-bottom: 6px;
  font-size: 14px;
  color: #2c3e50;
}

#sv-registration-form input[type="text"],
#sv-registration-form input[type="email"],
#sv-registration-form input[type="date"],
#sv-registration-form input[type="number"],
#sv-registration-form select,
#sv-registration-form textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #ccc;
  border-radius: 6px;
  font-size: 15px;
  font-family: inherit;
  background: #fafafa;
  transition: border-color 0.2s, box-shadow 0.2s;
}

#sv-registration-form input:focus,
#sv-registration-form select:focus,
#sv-registration-form textarea:focus {
  border-color: #1a5276;
  box-shadow: 0 0 0 3px rgba(26, 82, 118, 0.12);
  outline: none;
  background: #fff;
}

#sv-registration-form input.sv-field-error,
#sv-registration-form select.sv-field-error {
  border-color: #c0392b;
  box-shadow: 0 0 0 3px rgba(192, 57, 43, 0.12);
}

.sv-required {
  color: #c0392b;
  font-weight: 700;
}

.sv-note {
  font-size: 13px;
  color: #7f8c8d;
  margin-top: 4px;
}

.sv-info-text {
  background: #eaf2f8;
  border-left: 4px solid #1a5276;
  padding: 10px 14px;
  margin-bottom: 16px;
  border-radius: 0 6px 6px 0;
  font-size: 14px;
  color: #1a5276;
}

.sv-placeholder-text {
  color: #7f8c8d;
  font-style: italic;
  text-align: center;
  padding: 20px;
}

/* ---- Pacchetti ---- */
.sv-packages {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.sv-package-card {
  flex: 1;
  min-width: 200px;
  border: 2px solid #e0e0e0;
  border-radius: 10px;
  padding: 20px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s;
  background: #fff;
  position: relative;
}

.sv-package-card:hover {
  border-color: #1a5276;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.sv-package-card.sv-package-selected {
  border-color: #1a5276;
  background: #eaf2f8;
  box-shadow: 0 4px 12px rgba(26, 82, 118, 0.15);
}

.sv-package-card.sv-package-disabled {
  opacity: 0.4;
  cursor: not-allowed;
  pointer-events: none;
}

.sv-package-name {
  font-size: 18px;
  font-weight: 700;
  color: #1a5276;
  margin-bottom: 8px;
}

.sv-package-price {
  font-size: 28px;
  font-weight: 700;
  color: #2c3e50;
  margin-bottom: 12px;
}

.sv-package-details {
  font-size: 13px;
  color: #555;
  line-height: 1.6;
}

.sv-package-radio {
  position: absolute;
  top: 12px;
  right: 12px;
}

/* ---- Checkboxes categorie ---- */
.sv-category-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  margin-bottom: 6px;
  background: #fafafa;
  border: 1px solid #e0e0e0;
  border-radius: 6px;
  transition: background 0.15s;
  flex-wrap: wrap;
}

.sv-category-item:hover {
  background: #eaf2f8;
}

.sv-category-item.sv-category-disabled {
  opacity: 0.4;
  pointer-events: none;
}

.sv-category-item label {
  cursor: pointer;
  font-weight: 500 !important;
  margin-bottom: 0 !important;
  flex: 1;
  min-width: 200px;
}

.sv-category-item input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: #1a5276;
  cursor: pointer;
  flex-shrink: 0;
}

.sv-partner-input {
  flex: 0 0 100%;
  margin-top: 6px;
  padding-left: 28px;
}

.sv-partner-input label {
  font-weight: 500 !important;
  font-size: 13px !important;
  color: #555 !important;
}

.sv-partner-input input {
  margin-top: 4px;
}

/* ---- Riepilogo ---- */
#sv-riepilogo-content {
  margin-bottom: 20px;
}

.sv-riepilogo-row {
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
  border-bottom: 1px solid #eee;
  font-size: 14px;
}

.sv-riepilogo-row:last-child {
  border-bottom: none;
}

.sv-riepilogo-label {
  color: #555;
}

.sv-riepilogo-value {
  font-weight: 600;
  color: #2c3e50;
  text-align: right;
}

#sv-totale-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #1a5276;
  color: #fff;
  padding: 16px 20px;
  border-radius: 8px;
  margin-top: 12px;
}

.sv-totale-label {
  font-size: 18px;
  font-weight: 700;
}

.sv-totale-importo {
  font-size: 24px;
  font-weight: 700;
}

/* ---- Bottone submit ---- */
.sv-submit-container {
  text-align: center;
  margin-top: 24px;
}

.sv-submit-btn {
  background: #1a5276;
  color: #fff;
  border: none;
  padding: 14px 48px;
  font-size: 17px;
  font-weight: 700;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.2s, transform 0.1s;
}

.sv-submit-btn:hover {
  background: #154360;
  transform: translateY(-1px);
}

.sv-submit-btn:active {
  transform: translateY(0);
}

.sv-submit-btn:disabled {
  background: #95a5a6;
  cursor: not-allowed;
  transform: none;
}

/* ---- Messaggi ---- */
.sv-errori {
  background: #fdecea;
  border: 1px solid #f5c6cb;
  border-radius: 8px;
  padding: 16px 20px;
  margin-bottom: 16px;
  color: #721c24;
  font-size: 14px;
}

.sv-errori ul {
  margin: 8px 0 0 0;
  padding-left: 20px;
}

.sv-successo {
  background: #d4edda;
  border: 1px solid #c3e6cb;
  border-radius: 8px;
  padding: 24px;
  text-align: center;
  color: #155724;
}

.sv-successo h3 {
  font-size: 20px;
  margin: 0 0 8px 0;
  color: #155724;
}

/* ---- Responsive ---- */
@media (max-width: 600px) {
  #sv-registration-form {
    padding: 10px;
  }

  .sv-section {
    padding: 20px 16px;
  }

  .sv-row {
    flex-direction: column;
    gap: 12px;
  }

  .sv-col {
    min-width: 100%;
  }

  .sv-packages {
    flex-direction: column;
  }

  .sv-package-card {
    min-width: 100%;
  }

  .sv-package-price {
    font-size: 24px;
  }

  #sv-totale-container {
    flex-direction: column;
    gap: 4px;
    text-align: center;
  }
}
