/* SEK Forms - Estilos unificados */
@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@500;600;700&family=Source+Sans+Pro:wght@400;600&display=swap');

/* Formulario base */
.sek-fsi-form {
  max-width: 850px;
  margin: 20px auto;
  background: #fff;
  padding: 40px;
  border-radius: 12px;
  border-top: 5px solid #ff5f00;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.05);
  font-family: 'Source Sans Pro', sans-serif;
  color: #253746;
  font-size: 1.4rem;
}

.sek-fsi-form h3.fsi-section-title {
  font-family: 'Montserrat', sans-serif !important;
  font-size: 1.4rem !important;
  font-weight: 700 !important;
  color: #253746 !important;
  margin: 0 0 30px 0 !important;
  padding-bottom: 12px !important;
  border-bottom: 1px solid #edf2f7 !important;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Filas y grupos */
.sek-fsi-row {
  display: flex;
  flex-wrap: wrap;
  gap: 25px;
  margin-bottom: 16px;
}

.sek-fsi-group {
  flex: 1;
  min-width: 220px;
  display: flex;
  flex-direction: column;
  position: relative;
}

.sek-fsi-group label:not(.legal-item):not(.radio-label) {
  font-family: 'Montserrat', sans-serif !important;
  font-size: 1.1rem !important;
  font-weight: 700 !important;
  text-transform: uppercase !important;
  margin-bottom: 8px !important;
  color: #4a5568 !important;
  letter-spacing: 0.3px;
}

/* Inputs */
.sek-fsi-form .form-control {
  width: 100%;
  height: 42px;
  padding: 10px 16px;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  font-size: 1.5rem;
  background: #fcfdfe;
  color: #2d3748;
  transition: all 0.3s ease;
}

.iti {
  width: 100%;
}

.sek-fsi-form select.form-control {
  appearance: none !important;
  -webkit-appearance: none !important;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23253746' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") !important;
  background-repeat: no-repeat !important;
  background-position: right 20px center !important;
  background-size: 18px auto !important;
  padding-right: 50px !important;
}

.sek-fsi-form .form-control:focus {
  border-color: #ff5f00;
  outline: none;
  box-shadow: 0 0 0 4px rgba(255, 95, 0, 0.1);
}

/* Estados de error - mayor especificidad para overrides */
.sek-fsi-form .sek-fsi-group.fsi-has-error .form-control,
.sek-fsi-form .sek-fsi-group.fsi-has-error input[type='date'],
.sek-fsi-form .sek-fsi-group.fsi-has-error select.form-control {
  border-color: #dc2626 !important;
  background-color: #fef2f2 !important;
}

.sek-fsi-form
  .sek-fsi-group.fsi-has-error
  label:not(.legal-item):not(.radio-label) {
  color: #dc2626 !important;
}

.sek-fsi-error-msg {
  color: #dc2626;
  font-size: 1.2rem;
  font-weight: 600;
  margin-top: 5px;
  display: none;
}

.sek-fsi-form .sek-fsi-group.fsi-has-error .sek-fsi-error-msg {
  display: block;
}

/* Box de alumno */
.sek-fsi-group label.req:after {
  content: ' *';
  color: #dc2626;
}

/* Legal check error state */
#legal-check-container.fsi-has-error {
  border: 2px solid #dc2626;
  border-radius: 6px;
  padding: 12px;
  background-color: #fef2f2;
}

#legal-check-container.fsi-has-error .sek-fsi-error-msg {
  display: block;
  color: #dc2626;
  font-size: 1.2rem;
  font-weight: 600;
  margin: 8px 0;
}

#legal-check-container.fsi-has-error .legal-item:first-child {
  color: #dc2626;
}

/* Box de alumno */
.sek-fsi-alumno-box {
  background: #fbfbfb;
  padding: 30px;
  border: 1px solid #edf2f7;
  border-left: 5px solid #ff5f00;
  margin-bottom: 25px;
  position: relative;
  border-radius: 8px;
}

/* Botón eliminar alumno */
.btn-remove-student {
  position: absolute;
  top: 15px;
  right: 15px;
  background: #fff;
  border: 1px solid #e2e8f0;
  color: #a0aec0;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 12px;
  font-weight: bold;
}

/* Botón añadir alumno */
.btn-add-student {
  background: #fff;
  border: 2px dashed #cbd5e1;
  color: #64748b;
  padding: 15px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 1.4rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  margin-bottom: 14px;
}

.btn-add-student:hover {
  border-color: #ff5f00;
  color: #ff5f00;
}

/* Switch */
.sek-fsi-switch-wrapper {
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 20px 0;
}

.sek-switch {
  position: relative;
  display: inline-block;
  width: 48px;
  height: 24px;
}

.sek-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.sek-slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: #cbd5e1;
  transition: 0.4s;
  border-radius: 34px;
}

.sek-slider:before {
  position: absolute;
  content: '';
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background: #fff;
  transition: 0.4s;
  border-radius: 50%;
}

input:checked + .sek-slider {
  background: #ff5f00;
}

input:checked + .sek-slider:before {
  transform: translateX(24px);
}

/* Checkboxes legales */
.legal-container {
  display: flex;
  flex-direction: column;
  gap: 15px;
  padding: 0 5px;
}

.legal-item {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  cursor: pointer;
  font-size: 1.1rem;
  line-height: 1.4;
  color: #4a5568;
}

.legal-item span {
  font-size: 13px;
  font-weight: 400;
  line-height: 20px;
}

.legal-item input[type='checkbox'] {
  width: 20px;
  height: 20px;
  accent-color: #ff5f00;
  flex-shrink: 0;
  margin-top: 4px;
}

.legal-item a {
  color: #ff5f00;
  text-decoration: none;
  font-weight: 600;
}

/* reCAPTCHA */
.sek-fsi-recaptcha {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: 35px 0;
}

/* Botón principal */
.sek-fsi-btn-primary {
  background: #ff5f00;
  color: #fff;
  padding: 18px 50px;
  border: none;
  border-radius: 30px;
  font-family: 'Montserrat', sans-serif;
  font-weight: 700;
  font-size: 1.2rem;
  cursor: pointer;
  text-transform: uppercase;
  width: 100%;
  max-width: 350px;
  box-shadow: 0 4px 15px rgba(255, 95, 0, 0.3);
  transition: all 0.3s ease;
  margin-top: 22px;
}

.sek-fsi-btn-primary:hover {
  background: #e55300;
  transform: translateY(-2px);
}

.sek-fsi-btn-primary:disabled {
  background: #cbd5e1;
  cursor: not-allowed;
  transform: none;
}

/* Radio buttons */
.radio-group {
  display: flex;
  gap: 20px;
  align-items: center;
  padding: 10px 0;
}

.radio-label {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-size: 1.4rem;
  color: #4a5568;
}

.radio-label input[type='radio'] {
  width: 20px;
  height: 20px;
  accent-color: #ff5f00;
}

/* Date inputs */
.sek-fsi-form input[type='date'] {
  width: 100%;
  height: 42px;
  padding: 10px 16px;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  font-size: 1.5rem;
  background: #fcfdfe;
  color: #2d3748;
  transition: all 0.3s ease;
  font-family: inherit;
  cursor: pointer;
}

/* Responsive */
@media (max-width: 600px) {
  .sek-fsi-form {
    padding: 25px 20px;
  }

  .sek-fsi-row {
    flex-direction: column;
    gap: 15px;
  }

  .sek-fsi-btn-primary {
    max-width: 100%;
  }

  .radio-group {
    flex-direction: column;
    align-items: flex-start;
  }

  .btn-add-student {
    flex-direction: column;
  }
}

.iti__country::before {
  font-size: 20px;
  content: ' ';
  color: #ff5f00;
  padding-left: 8px;
}

.iti__divider {
  display: none;
}
