/* ============================================================
   assets/css/formulario.css
   Estilos del formulario de registro, pantalla de confirmación
   y pantalla de error de acceso (enlace inválido).
   ============================================================ */


/* ─── Tarjeta principal del formulario ─────────────────────── */
.form-card {
  background: var(--card-bg);
  border-radius: 16px;
  box-shadow: 0 4px 24px rgba(26,60,110,.1);
  padding: 2.25rem 2.5rem;
  margin-top: -1.5rem;
  position: relative;
}


#pantallaFormulario {
  margin-top: -42px;
}

/* ─── Badge de competencia activa ───────────────────────────── */
/* Aparece en la parte superior del formulario para indicar
   a qué competencia pertenece el registro */
.competencia-badge {
  text-transform: uppercase;
  display: inline-flex;
  align-items: center;
  background: var(--azul);
  color: #fff;
  border-radius: 50px;
  padding: .35rem 1rem;
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: .3px;
}


/* ─── Pantalla de error de acceso ───────────────────────────── */
/* Se muestra cuando el parámetro 'c' es inválido o la
   competencia no existe en la base de datos */
.error-icono {
  width: 90px;
  height: 90px;
  border-radius: 50%;
  background: linear-gradient(135deg, #fee2e2, #fecaca);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.5rem;
}
.error-icono i { font-size: 2.6rem; color: var(--rojo); }

.error-titulo {
  font-family: "Roboto", sans-serif;
  font-size: 1.85rem;
  color: var(--texto);
  margin-bottom: .75rem;
}

.error-subtitulo {
  font-size: .95rem;
  color: var(--gris);
  line-height: 1.65;
  max-width: 400px;
  margin: 0 auto 1.5rem;
}

.error-codigo {
  display: inline-flex;
  align-items: center;
  background: #fee2e2;
  color: var(--rojo);
  border: 1px solid #fecaca;
  border-radius: 50px;
  padding: .4rem 1.1rem;
  font-size: .82rem;
  font-weight: 600;
}


/* ─── Etiquetas de sección (ej: "DATOS DEL ESTUDIANTE ─────") ─ */
.section-label {
  font-size: .7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  color: var(--azul-claro);
  margin-bottom: .75rem;
  display: flex;
  align-items: center;
  gap: .4rem;
}
/* Línea decorativa que se extiende a la derecha del label */
.section-label::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--borde);
}


/* ─── Caja de consentimiento (fondo amarillo) ──────────────── */
.consent-box {
  background: linear-gradient(135deg, #fffbeb, #fef3c7);
  border: 2px solid #fcd34d;
  border-radius: 12px;
  padding: 1.25rem 1.5rem;
}
.consent-texto {
  font-size: .85rem;
  color: var(--gris);
  line-height: 1.55;
  margin-bottom: .85rem;
}
.consent-box .form-check-label {
  font-size: .9rem;
  font-weight: 500;
  line-height: 1.5;
}


/* ─── Radio buttons ─────────────────────────────────────────── */
.form-check-input {
  width: 1.1em;
  height: 1.1em;
  margin-top: .2em;
  cursor: pointer;
  border: 1px solid #000;
}
.form-check-input:checked {
  background-color: var(--azul);
  border-color: var(--azul);
}


/* ─── Botón Guardar ─────────────────────────────────────────── */
.btn-guardar {
  background: var(--azul);
  color: #fff;
  border: none;
  border-radius: 10px;
  font-weight: 600;
  font-size: 1rem;
  padding: .7rem 2.2rem;
  letter-spacing: .4px;
  transition: opacity .2s, transform .15s, box-shadow .2s;
  box-shadow: 0 4px 14px rgba(26,60,110,.3);
}
.btn-guardar:hover    { background: var(--azul); opacity: .9; transform: translateY(-1px); box-shadow: 0 6px 18px rgba(26,60,110,.35); color: #fff; }
.btn-guardar:active   { background-color: var(--azul) !important; transform: translateY(0); color: #fff !important; }
.btn-guardar:disabled { opacity: .65; transform: none; color: #fff; }
.btn-guardar .spinner-border { width: 1rem; height: 1rem; border-width: .15em; color: #fff; }


/* ─── Pantalla de confirmación ──────────────────────────────── */
#pantallaGracias {
  display: none;
  text-align: center;
  padding: 2.5rem 1rem 2rem;
  animation: fadeUp .5s ease both;
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Círculo verde con checkmark */
.check-circulo {
  width: 90px;
  height: 90px;
  border-radius: 50%;
  background: linear-gradient(135deg, #d1fae5, #a7f3d0);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.5rem;
  animation: pulsarVerde 2.5s ease infinite;
}
@keyframes pulsarVerde {
  0%, 100% { box-shadow: 0 0 0 14px rgba(16,185,129,.1), 0 0 0 28px rgba(16,185,129,.05); }
  50%       { box-shadow: 0 0 0 18px rgba(16,185,129,.15), 0 0 0 34px rgba(16,185,129,.07); }
}
.check-circulo i { font-size: 2.8rem; color: #059669; }

/* Título */
.gracias-titulo {
  font-family: "Roboto", sans-serif;
  font-size: 2rem;
  color: var(--azul);
  margin-bottom: 1rem;
}

/* Badge con el nombre del estudiante */
.gracias-nombre-badge {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  background: #eff6ff;
  border: 1.5px solid #bfdbfe;
  color: var(--azul-claro);
  border-radius: 50px;
  padding: .4rem 1.25rem;
  font-size: .9rem;
  font-weight: 600;
  margin-bottom: 1.25rem;
}

/* Separador decorativo */
.gracias-linea {
  width: 44px;
  height: 3px;
  background: linear-gradient(90deg, var(--azul), var(--azul-claro));
  border-radius: 4px;
  margin: 0 auto 1.25rem;
}

/* ─── Feedback de autorizaciones (generado por JS) ──────────── */
.gracias-feedback {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .6rem;
  margin-bottom: .5rem;
}
/* Item individual de feedback */
.feedback-item {
  display: inline-flex;
  align-items: center;
  font-size: .9rem;
  font-weight: 500;
  padding: .45rem 1.1rem;
  border-radius: 50px;
  min-width: 280px;
  justify-content: center;
}
/* Autorización aceptada → verde */
.feedback-si {
  background: #dcfce7;
  color: var(--verde);
  border: 1px solid #bbf7d0;
}
/* Autorización no aceptada → rojo */
.feedback-no {
  background: #fee2e2;
  color: var(--rojo);
  border: 1px solid #fecaca;
}


/* ─── Botón "Registrar otro" ────────────────────────────────── */
.btn-nuevo-registro {
  border: 2px solid var(--azul);
  background: var(--azul);
  color: #fff;
  border-radius: 10px;
  font-weight: 600;
  font-size: .92rem;
  padding: .6rem 1.8rem;
  transition: background .2s, color .2s;
}
.btn-nuevo-registro:hover { background: var(--azul); color: #fff; }
.btn-nuevo-registro:active { background: var(--azul) !important; color: #fff !important; }


/* ─── Responsive ────────────────────────────────────────────── */
@media (max-width: 576px) {
  .form-card      { padding: 1.5rem 1.25rem; }
  .gracias-titulo { font-size: 1.6rem; }
  .feedback-item  { min-width: unset; width: 100%; }
}
