/* ¿Hoy circulo? — prefijo .hnc-* por la convencion de .cursorrules.
   Mobile-first: la respuesta de hoy tiene que entrar en la primera pantalla del
   telefono sin hacer scroll, porque se consulta de pie y con prisa. */

.hnc-container {
  max-width: 800px;
  margin: 2rem auto;
  padding: 1.5rem;
  background: #f8f9fa;
  border-radius: 10px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, .06);
}

.hnc-form { display: grid; gap: 1.25rem; }

.hnc-campo { display: flex; flex-direction: column; }

.hnc-campo label {
  font-weight: 600;
  margin-bottom: .5rem;
  font-size: 1.7rem;
}

.hnc-campo select {
  width: 100%;
  padding: .85rem .75rem;
  font-size: 1.8rem;          /* 16px reales: por debajo, iOS hace zoom al enfocar */
  border: 1px solid #ccd3da;
  border-radius: 8px;
  background: #fff;
  color: #15171a;
  -webkit-appearance: none;
  appearance: none;
  background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23738a94' stroke-width='2'%3e%3cpolyline points='6 9 12 15 18 9'/%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right .7rem center;
  background-size: 1.1rem;
  padding-right: 2.4rem;
}

.hnc-hint { font-size: 1.35rem; color: #738a94; margin-top: .4rem; }

.hnc-btn {
  width: 100%;
  padding: 1rem;
  font-size: 1.8rem;
  font-weight: 700;
  color: #fff;
  background: #2d6cdf;
  border: 0;
  border-radius: 8px;
  cursor: pointer;
}

/* ───────────────────────── banner de contingencia ─────────────────────────
   Va antes del formulario y tiene que ganar a todo lo demas de la pantalla:
   es la unica situacion en la que la respuesta habitual deja de valer. */

.hnc-banner {
  margin: 2rem auto 1rem;
  max-width: 800px;
  padding: 1.3rem 1.4rem;
  background: #fff4e0;
  border: 2px solid #d97706;
  border-left-width: 6px;
  border-radius: 10px;
}

.hnc-banner-titulo {
  font-size: 2rem;
  font-weight: 800;
  line-height: 1.25;
  color: #7c3a00;
  margin-bottom: .6rem;
}

.hnc-banner-texto { font-size: 1.6rem; line-height: 1.5; margin: 0; }

.hnc-banner-cita {
  margin: .9rem 0 0;
  padding: .8rem .9rem;
  background: rgba(255, 255, 255, .75);
  border-radius: 8px;
  font-size: 1.4rem;
  line-height: 1.5;
  color: #4a5a66;
  white-space: pre-wrap;
}

.hnc-banner-fuente { margin: .7rem 0 0; font-size: 1.4rem; }
.hnc-banner-fuente a { color: #9a4b00; font-weight: 600; }

@media (max-width: 480px) {
  .hnc-banner { padding: 1.1rem; margin: 1.2rem auto .8rem; }
  .hnc-banner-titulo { font-size: 1.85rem; }
}

/* ─────────────────────────── resultado ─────────────────────────── */

.hnc-card {
  margin-top: 1.5rem;
  padding: 1.4rem;
  border-radius: 12px;
  border: 2px solid;
}

/* El color hace el trabajo antes de que se lea nada: verde tranquiliza,
   rojo frena, ambar obliga a mirar. */
.hnc-si     { background: #eefaf1; border-color: #1f7a3d; }
.hnc-no     { background: #fdeeee; border-color: #c1121f; }
.hnc-alerta { background: #fff6e5; border-color: #e0a33e; }

.hnc-titulo {
  font-size: 2.4rem;
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: .5rem;
}

.hnc-fecha {
  font-size: 1.45rem;
  color: #4a5a66;
  margin-bottom: .9rem;
}

.hnc-fecha::first-letter { text-transform: uppercase; }

.hnc-motivo { font-size: 1.6rem; margin: 0; line-height: 1.5; }

.hnc-aviso {
  margin: .9rem 0 0;
  padding: .8rem .9rem;
  background: rgba(255, 255, 255, .7);
  border-radius: 8px;
  font-size: 1.45rem;
  line-height: 1.5;
}

.hnc-fuente {
  margin: 1rem 0 0;
  padding-top: .8rem;
  border-top: 1px solid rgba(0, 0, 0, .1);
  font-size: 1.3rem;
  color: #4a5a66;
  line-height: 1.5;
}

/* Cuando no hay dato de la CAMe la advertencia tiene que verse: es la
   diferencia entre "confirmado" y "calculado, puede haber contingencia". */
.hnc-fuente-parcial { color: #8a5a00; }

.hnc-tabla-wrap { overflow-x: auto; margin: 1.5rem 0; }
.hnc-tabla { width: 100%; border-collapse: collapse; font-size: 1.5rem; min-width: 420px; }
.hnc-tabla th, .hnc-tabla td { padding: .7rem .8rem; border-bottom: 1px solid #e3e9ed; text-align: left; }
.hnc-tabla thead th { background: #f1f5f9; font-weight: 700; }

@media (min-width: 768px) {
  .hnc-form { grid-template-columns: 1fr 1fr; }
  .hnc-btn { grid-column: span 2; max-width: 50%; margin: .5rem auto 0; }
  .hnc-titulo { font-size: 2.8rem; }
}

@media (max-width: 480px) {
  .hnc-container { padding: 1.1rem; margin: 1.2rem auto; }
  .hnc-titulo { font-size: 2.2rem; }
}
