/* ---------- Cotiza tu proyecto ---------- */
.aviso {
  margin-bottom: 1.5rem;
  padding: 0.75rem 0.9rem;
  border-left: 3px solid var(--azul);
  background: rgb(5 101 226 / 0.12);
  font-size: 0.95rem;
}

.cotizador {
  display: grid;
  gap: 1.5rem;
  scroll-margin-top: 1rem;
}

/* Con JS, desde el primer cuadro solo se ve el paso 1 (antes de que cotiza.js tome el control) */
.js .cotizador:not(.cotizador--pasos) .paso:not([data-paso="que"]),
.js .cotizador:not(.cotizador--pasos) [data-atras] { display: none; }

/* Sin JS: no hay resumen que mostrar */
.cotizador:not(.cotizador--pasos) .resumen { display: none; }

/* ---------- Barra de avance: 5 capas ---------- */
.avance {
  display: grid;
  gap: 0.5rem;
}

.avance__texto {
  font-family: var(--f-mono);
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--azul-claro);
}

.avance__barra {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 3px;
}

.avance__barra li {
  height: 6px;
  background: var(--linea);
}

.avance__barra li.lleno { background: var(--azul); }

/* ---------- Pasos ---------- */
.paso {
  display: grid;
  gap: 0.85rem;
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.paso[hidden] { display: none; }

.paso__pregunta {
  padding: 0;
  margin-bottom: 0.35rem;
  font-family: var(--f-titulo);
  font-size: clamp(1.05rem, 5vw, 1.35rem);
  font-weight: 400;
  line-height: 1.3;
}

.paso__pregunta:focus { outline: none; }

.paso__ayuda {
  font-size: 0.9rem;
  color: var(--texto-suave);
}

.paso__error {
  font-family: var(--f-mono);
  font-size: 0.82rem;
  color: #ffb4a8;
}

.paso__error:empty { display: none; }

/* ---------- Campos ---------- */
.campo {
  width: 100%;
  min-height: 3.25rem;
  padding: 0 0.9rem;
  border: 1px solid var(--linea-fuerte);
  border-radius: 0;
  background: rgb(0 0 0 / 0.22);
  color: var(--texto);
  font-family: var(--f-mono);
  font-size: 1rem; /* 16 px: así el iPhone no hace zoom al tocar el campo */
  -webkit-appearance: none;
  appearance: none;
  scroll-margin: 6rem 0;
}

.campo::placeholder { color: var(--texto-tenue); }

.campo:focus {
  outline: none;
  border-color: var(--blanco);
}

.paso--con-error .campo { border-color: #ffb4a8; }

.campo[type="date"] {
  display: flex;
  align-items: center;
  color-scheme: dark;
}

/* ---------- Opciones (tamaño y "sin afán") ---------- */
.opciones {
  display: grid;
  border-top: 1px solid var(--linea);
}

.opcion {
  position: relative;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  min-height: 3.5rem;
  padding: 1rem 0.9rem 1rem 2.6rem;
  border-bottom: 1px solid var(--linea);
  cursor: pointer;
}

/* Marcador cuadrado en vez del círculo del sistema */
.opcion::before {
  content: "";
  position: absolute;
  left: 0.9rem;
  top: 50%;
  width: 0.9rem;
  height: 0.9rem;
  margin-top: -0.45rem;
  border: 1px solid var(--linea-fuerte);
}

.opcion:has(input:checked) { background: rgb(255 255 255 / 0.06); }
.opcion:has(input:checked)::before {
  border-color: var(--blanco);
  background: var(--blanco);
  box-shadow: inset 0 0 0 3px var(--fondo);
}

.opcion:has(input:focus-visible) {
  outline: 2px solid var(--azul-claro);
  outline-offset: -2px;
}

.opcion input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.opcion span { font-size: 1rem; }

.opcion small {
  font-family: var(--f-mono);
  font-size: 0.78rem;
  color: var(--texto-suave);
  text-align: right;
}

.opcion--sola { border-top: 1px solid var(--linea); }

/* ---------- Contador de cantidad ---------- */
.contador {
  display: grid;
  grid-template-columns: 3.5rem 1fr 3.5rem;
}

.contador__boton {
  min-height: 3.5rem;
  border: 1px solid var(--linea-fuerte);
  background: none;
  font-family: var(--f-mono);
  font-size: 1.4rem;
  cursor: pointer;
}

.contador__boton:active { background: rgb(255 255 255 / 0.08); }

.contador__valor {
  min-height: 3.5rem;
  border-left: 0;
  border-right: 0;
  text-align: center;
  font-size: 1.25rem;
  -moz-appearance: textfield;
}

.contador__valor::-webkit-inner-spin-button,
.contador__valor::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

/* ---------- Resumen ---------- */
.resumen__datos {
  margin: 0;
  border-top: 1px solid var(--linea);
}

.resumen__datos div {
  display: grid;
  grid-template-columns: 6.5rem 1fr;
  gap: 0.75rem;
  padding: 0.7rem 0;
  border-bottom: 1px solid var(--linea);
}

.resumen__datos dt {
  font-family: var(--f-mono);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--texto-tenue);
  padding-top: 0.15rem;
}

.resumen__datos dd {
  margin: 0;
  font-family: var(--f-mono);
  font-size: 0.92rem;
  overflow-wrap: anywhere;
}

.resumen__wa {
  width: 100%;
  min-height: 3.5rem;
  margin-top: 0.5rem;
  font-size: 1rem;
}

.resumen__correo {
  justify-self: center;
  padding: 0.6rem 0.5rem;
  font-size: 0.95rem;
  color: var(--texto-suave);
  text-underline-offset: 0.25em;
}

/* ---------- Navegación ---------- */
.cotizador__nav {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 0.75rem;
}

.cotizador__nav .boton {
  min-height: 3.5rem;
  font-size: 1rem;
}

.cotizador__nav .boton[hidden] { display: none; }

/* Sin "Atrás" (primer paso), "Siguiente" ocupa todo el ancho */
.cotizador__nav [data-siguiente] { grid-column: 2; }
.cotizador__nav [data-atras][hidden] + [data-siguiente] { grid-column: 1 / -1; }

.boton--secundario {
  border-color: var(--linea-fuerte);
  background: none;
  color: var(--texto);
}

.boton--secundario:active { background: rgb(255 255 255 / 0.08); }
