/**
 * Nexus Atomic Form — Styles
 * Matches the va-* design system exactly.
 *
 * Autor: Jesús Ángel Hernández / Jetechnik
 * Versión: 1.0.0
 */

/* ============================================================
   VARIABLES (hereda de va-* si están disponibles)
   ============================================================ */
.naf-wrapper {
  --naf-blue:    var(--va-blue,    #1A3F7A);
  --naf-orange:  var(--va-orange,  #D9581A);
  --naf-bg:      var(--va-bg,      #FAF8F5);
  --naf-bg2:     var(--va-bg2,     #F0EDE8);
  --naf-white:   var(--va-white,   #FFFFFF);
  --naf-text:    var(--va-text,    #2C2C3A);
  --naf-muted:   var(--va-muted,   #6B6B7D);
  --naf-border:  #F0EDE8;
  --naf-radius:  10px;
  --naf-shadow:  0 20px 60px rgba(26,63,122,.12);
  font-family: 'Nunito', -apple-system, sans-serif;
}

/* ============================================================
   WRAPPERS POR ESTILO
   ============================================================ */

/* Estilo Inscripción — idéntico a .va-form-wrapper */
.naf-style-inscripcion {
  background: var(--naf-white);
  border-radius: 24px;
  padding: 52px 48px;
  box-shadow: var(--naf-shadow);
  max-width: 820px;
  margin: 0 auto;
}

/* Estilo Contacto — idéntico a .va-contact-form */
.naf-style-contacto {
  background: var(--naf-bg2);
  border-radius: 20px;
  padding: 40px;
}

.naf-style-contacto .naf-input {
  background: var(--naf-white) !important;
}

/* Sin wrapper */
.naf-style-plain {
  padding: 0;
}

/* ============================================================
   GRID DEL FORMULARIO
   ============================================================ */
.naf-form.naf-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 20px;
  width: 100%;
}

/* Columnas */
.naf-col-100 { grid-column: span 12; }
.naf-col-66  { grid-column: span 8;  }
.naf-col-50  { grid-column: span 6;  }
.naf-col-33  { grid-column: span 4;  }

@media (max-width: 640px) {
  .naf-col-66,
  .naf-col-50,
  .naf-col-33 { grid-column: span 12; }
}

/* ============================================================
   SEPARADORES
   ============================================================ */
.naf-sep {
  display: flex;
  align-items: center;
  gap: 14px;
  font-family: 'Nunito', sans-serif;
  font-size: .75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--naf-muted);
  margin: 6px 0 0;
}

.naf-sep::before,
.naf-sep::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--naf-border);
}

/* ============================================================
   CAMPOS
   ============================================================ */
.naf-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.naf-label {
  display: block;
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .05em;
  text-transform: uppercase;
  color: var(--naf-blue);
  margin-bottom: 0;
}

.naf-required {
  color: #ef4444;
  margin-left: 2px;
}

/* Inputs, selects, textareas */
.naf-input {
  width: 100%;
  padding: 13px 17px;
  border-radius: var(--naf-radius);
  border: 2px solid var(--naf-border);
  font-family: 'Nunito', sans-serif;
  font-size: .95rem;
  color: var(--naf-text);
  background: var(--naf-bg);
  outline: none;
  box-sizing: border-box;
  transition: border-color .2s ease, box-shadow .2s ease;
  appearance: none;
  -webkit-appearance: none;
  display: block;
  margin: 0;
}

.naf-input:focus {
  border-color: var(--naf-blue);
  box-shadow: 0 0 0 3px rgba(26,63,122,.08);
}

/* Select — flecha personalizada */
.naf-select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%236B6B7D' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 42px;
  cursor: pointer;
}

/* Textarea */
.naf-textarea {
  resize: vertical;
  min-height: 120px;
  line-height: 1.6;
}

/* Campo inválido */
.naf-input.naf-invalid {
  border-color: #ef4444;
  box-shadow: 0 0 0 3px rgba(239,68,68,.1);
}

/* ============================================================
   CHECKBOXES
   ============================================================ */
.naf-check {
  grid-column: span 12;
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.naf-check input[type="checkbox"] {
  width: 17px !important;
  height: 17px !important;
  min-width: 17px;
  padding: 0 !important;
  border: none !important;
  box-shadow: none !important;
  margin-top: 3px;
  flex-shrink: 0;
  accent-color: var(--naf-blue);
  cursor: pointer;
}

.naf-check label {
  font-size: .86rem;
  color: var(--naf-muted);
  line-height: 1.55;
  cursor: pointer;
}

.naf-check input[type="checkbox"].naf-invalid {
  outline: 2px solid #ef4444;
  outline-offset: 2px;
}

/* ============================================================
   BOTÓN SUBMIT
   ============================================================ */
.naf-submit-area {
  text-align: center;
  margin-top: 8px;
}

.naf-submit-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: 'Nunito', sans-serif;
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: .04em;
  text-transform: uppercase;
  padding: 16px 52px;
  border-radius: 50px;
  border: none;
  cursor: pointer;
  background: #D9581A;
  color: #fff;
  box-shadow: 0 4px 18px rgba(217,88,26,.35);
  transition: all .25s ease;
  line-height: 1;
}

.naf-submit-btn:hover {
  background: #bf4d14;
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(217,88,26,.45);
}

.naf-submit-btn:disabled {
  opacity: .65;
  cursor: not-allowed;
  transform: none;
}

/* Botón azul alternativo */
.naf-style-contacto .naf-submit-btn {
  background: #1A3F7A;
  box-shadow: 0 4px 18px rgba(26,63,122,.3);
  width: 100%;
}

.naf-style-contacto .naf-submit-btn:hover {
  background: #2358A8;
}

.naf-submit-note {
  font-family: 'Nunito', sans-serif;
  font-size: .78rem;
  color: var(--naf-muted);
  margin-top: 12px;
  line-height: 1.55;
}

/* ============================================================
   MENSAJES DE ERROR / ALERTA
   ============================================================ */
.naf-alert {
  grid-column: span 12;
  padding: 12px 18px;
  border-radius: var(--naf-radius);
  font-family: 'Nunito', sans-serif;
  font-size: .9rem;
  font-weight: 600;
  line-height: 1.5;
  margin-top: 4px;
}

.naf-alert-error {
  background: #fef2f2;
  color: #b91c1c;
  border: 1px solid #fecaca;
}

.naf-alert-success {
  background: #f0fdf4;
  color: #15803d;
  border: 1px solid #bbf7d0;
}

/* ============================================================
   MENSAJE DE ÉXITO (pantalla completa)
   ============================================================ */
.naf-success {
  text-align: center;
  padding: 48px 20px;
}

.naf-success-icon {
  font-size: 4rem;
  margin-bottom: 16px;
  line-height: 1;
}

.naf-success-title {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--naf-text);
  margin: 0 0 12px;
}

.naf-success-desc {
  font-family: 'Nunito', sans-serif;
  font-size: 1rem;
  color: var(--naf-muted);
  line-height: 1.7;
  margin: 0;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 600px) {
  .naf-style-inscripcion {
    padding: 32px 20px;
  }
  .naf-style-contacto {
    padding: 28px 20px;
  }
  .naf-form.naf-grid {
    gap: 16px;
  }
}

/* ── Botón "Enviar otra respuesta" ── */
.naf-reset-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 20px;
  padding: 10px 24px;
  background: transparent;
  color: var(--naf-blue);
  border: 2px solid var(--naf-blue);
  border-radius: 50px;
  font-family: 'Nunito', sans-serif;
  font-size: .88rem;
  font-weight: 700;
  cursor: pointer;
  transition: all .2s ease;
}
.naf-reset-btn:hover {
  background: var(--naf-blue);
  color: #fff;
}
