/* =============================================
   SNS Form Styles - Trasmissione Dati Corso
   ============================================= */

.sns-form-wrapper {
  max-width: 900px;
  margin: 0 auto;
  padding: 20px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, sans-serif;
}

/* Fieldset e Legend */
.sns-fieldset {
  border: 1px solid #0066a1;
  border-radius: 8px;
  padding: 20px;
  margin-bottom: 25px;
  background: #fafbfc;
}

.sns-fieldset legend {
  font-size: 1.1rem;
  font-weight: 600;
  color: #0066a1;
  padding: 0 15px;
  background: #fff;
  border-radius: 4px;
}

/* Grid System */
.sns-row {
  display: flex;
  flex-wrap: wrap;
  margin: 0 -10px 15px -10px;
}

.sns-row:last-child {
  margin-bottom: 0;
}

.sns-col-full,
.sns-col-half,
.sns-col-third {
  padding: 0 10px;
  box-sizing: border-box;
}

.sns-col-full { width: 100%; }
.sns-col-half { width: 50%; }
.sns-col-third { width: 33.333%; }

/* Labels */
.sns-form-wrapper label {
  display: block;
  margin-bottom: 5px;
  font-weight: 500;
  color: #333;
  font-size: 0.9rem;
}

/* Input styles */
.sns-input,
.sns-select,
.sns-textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #ccd0d5;
  border-radius: 6px;
  font-size: 1rem;
  transition: border-color 0.2s, box-shadow 0.2s;
  box-sizing: border-box;
}

.sns-input:focus,
.sns-select:focus,
.sns-textarea:focus {
  outline: none;
  border-color: #0066a1;
  box-shadow: 0 0 0 3px rgba(0, 102, 161, 0.15);
}

.sns-textarea {
  min-height: 100px;
  resize: vertical;
}

.sns-select {
  background: #fff url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e") right 10px center/20px no-repeat;
  appearance: none;
  cursor: pointer;
}

/* Repeater Items */
.sns-repeater-item {
  background: #fff;
  border: 1px solid #e1e4e8;
  border-radius: 6px;
  padding: 15px;
  margin-bottom: 15px;
}

/* Plugin Repeatable Fields Styles */
.wpcf7-field-group-wrap {
  margin-bottom: 15px;
}

.wpcf7-field-group {
  background: #fff;
  border: 1px solid #e1e4e8;
  border-radius: 6px;
  padding: 15px;
  margin-bottom: 10px;
  position: relative;
}

.wpcf7-field-group-add,
.wpcf7-field-group-remove {
  background: #28a745;
  color: #fff;
  border: none;
  padding: 8px 16px;
  border-radius: 6px;
  font-size: 0.9rem;
  cursor: pointer;
  transition: background 0.2s;
  margin-top: 10px;
}

.wpcf7-field-group-remove {
  background: #dc3545;
  position: absolute;
  top: 10px;
  right: 10px;
  padding: 4px 10px;
  font-size: 0.85rem;
}

.wpcf7-field-group-add:hover {
  background: #218838;
}

.wpcf7-field-group-remove:hover {
  background: #c82333;
}

/* Info Box */
.sns-info-box {
  background: #e7f3ff;
  border-left: 4px solid #0066a1;
  padding: 12px 15px;
  margin-bottom: 15px;
  border-radius: 0 6px 6px 0;
}

.sns-info-box p {
  margin: 0;
  color: #004a75;
  font-size: 0.95rem;
}

/* Checkbox Group */
.sns-checkbox-group {
  background: #fff;
  border: 1px solid #e1e4e8;
  border-radius: 6px;
  padding: 15px;
}

.sns-checkbox-group p {
  margin: 0 0 10px 0;
  color: #333;
}

.sns-checkbox-group .wpcf7-list-item {
  display: block;
  margin: 8px 0;
}

.sns-checkbox-group .wpcf7-list-item label {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-weight: 400;
  cursor: pointer;
}

.sns-checkbox-group input[type="checkbox"] {
  width: 18px;
  height: 18px;
  margin-top: 2px;
  accent-color: #0066a1;
  cursor: pointer;
}

/* Utilities */
.sns-mt-15 {
  margin-top: 15px;
}

/* Colonne aggiuntive */
.sns-col-quarter { width: 25%; }
.sns-col-three-quarter { width: 75%; }

/* Header Box */
.sns-header-box {
  background: #0066a1;
  color: #fff;
  padding: 20px;
  border-radius: 8px;
  text-align: center;
  margin-bottom: 25px;
}

.sns-header-box h3 {
  margin: 0 0 5px 0;
  font-size: 1.3rem;
}

.sns-header-box p {
  margin: 0;
  opacity: 0.9;
  font-size: 0.95rem;
}

/* Info Box Warning */
.sns-info-box.sns-info-warning {
  background: #fff3cd;
  border-left-color: #ffc107;
}

.sns-info-box.sns-info-warning p {
  color: #856404;
}

/* Declaration Box */
.sns-dichiarazione-box {
  background: #f8f9fa;
}

.sns-declaration-text {
  background: #fff;
  border: 1px solid #e1e4e8;
  border-radius: 6px;
  padding: 15px 20px;
}

.sns-declaration-text p {
  margin: 0 0 10px 0;
  font-weight: 500;
}

.sns-declaration-text ul {
  margin: 0;
  padding-left: 20px;
}

.sns-declaration-text li {
  margin-bottom: 8px;
  line-height: 1.5;
}

.sns-declaration-text li:last-child {
  margin-bottom: 0;
}

/* Acceptance checkbox */
.sns-acceptance {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  background: #fff;
  border: 1px solid #e1e4e8;
  border-radius: 6px;
  padding: 15px;
}

.sns-acceptance input[type="checkbox"] {
  width: 20px;
  height: 20px;
  margin-top: 2px;
  accent-color: #0066a1;
}

.sns-acceptance .wpcf7-list-item-label {
  font-size: 0.95rem;
  line-height: 1.5;
}

/* Responsive - Colonne aggiuntive */
@media (max-width: 768px) {
  .sns-col-quarter,
  .sns-col-three-quarter {
    width: 100%;
    margin-bottom: 10px;
  }
}

/* Buttons */
.sns-btn-add {
  background: #28a745;
  color: #fff;
  border: none;
  padding: 10px 20px;
  border-radius: 6px;
  font-size: 0.95rem;
  cursor: pointer;
  transition: background 0.2s;
}

.sns-btn-add:hover {
  background: #218838;
}

.sns-btn-remove {
  background: #dc3545;
  color: #fff;
  border: none;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 1rem;
  line-height: 1;
  transition: background 0.2s;
}

.sns-btn-remove:hover {
  background: #c82333;
}

.sns-submit {
  background: #0066a1;
  color: #fff;
  border: none;
  padding: 14px 40px;
  border-radius: 6px;
  font-size: 1.1rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
}

.sns-submit:hover {
  background: #005285;
}

/* Utilities */
.sns-text-center {
  text-align: center;
}

/* =============================================
   RESPONSIVE - Tablet
   ============================================= */
@media (max-width: 768px) {
  .sns-col-half,
  .sns-col-third {
    width: 100%;
    margin-bottom: 10px;
  }
  
  .sns-fieldset {
    padding: 15px;
  }
  
  .sns-form-wrapper {
    padding: 10px;
  }
}

/* =============================================
   RESPONSIVE - Mobile
   ============================================= */
@media (max-width: 480px) {
  .sns-fieldset legend {
    font-size: 1rem;
  }
  
  .sns-input,
  .sns-select {
    padding: 12px 10px;
  }
  
  .sns-submit {
    width: 100%;
    padding: 16px 20px;
  }
  
  .sns-btn-add {
    width: 100%;
  }
}

/* =============================================
   CF7 Validation Styles
   ============================================= */
.wpcf7-not-valid {
  border-color: #dc3545 !important;
}

.wpcf7-not-valid-tip {
  color: #dc3545;
  font-size: 0.85rem;
  margin-top: 5px;
}

.wpcf7-response-output {
  margin: 20px 0 0 0;
  padding: 15px;
  border-radius: 6px;
}

.wpcf7-mail-sent-ok {
  background: #d4edda;
  border-color: #c3e6cb;
  color: #155724;
}

.wpcf7-mail-sent-ng,
.wpcf7-validation-errors {
  background: #f8d7da;
  border-color: #f5c6cb;
  color: #721c24;
}