/* ═══════════════════════════════════════════════════════════
   BUS CONCIERTOS — Pantallas públicas de compra
   Formulario → Resumen + cupón → Webpay → Resultado
   ═══════════════════════════════════════════════════════════ */

/* ─── STEPPER (Datos → Resumen → Pago) ─────────────────────── */
.stepper {
  display: flex;
  justify-content: center;
  gap: 0;
  list-style: none;
  max-width: 520px;
  margin: 2rem auto 0;
  padding: 0 1rem;
}

.stepper li {
  flex: 1;
  text-align: center;
  position: relative;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--gris-medio);
}

.stepper li::before {
  content: attr(data-paso);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  margin: 0 auto 0.4rem;
  border-radius: 50%;
  background: #ddd;
  color: var(--gris-medio);
  font-family: 'Bebas Neue', sans-serif;
  font-size: 1.2rem;
  position: relative;
  z-index: 1;
}

/* Línea entre pasos */
.stepper li + li::after {
  content: '';
  position: absolute;
  top: 18px;
  right: 50%;
  width: 100%;
  height: 3px;
  background: #ddd;
}

.stepper li.activo,
.stepper li.hecho { color: var(--negro); }
.stepper li.activo::before { background: var(--amarillo); color: var(--negro); box-shadow: 0 0 0 4px rgba(255,214,0,0.3); }
.stepper li.hecho::before { background: var(--negro); color: var(--amarillo); }
.stepper li.hecho + li::after,
.stepper li.activo::after { background: var(--negro); }

/* ─── OPCIONES DE TARIFA (radio en forma de tarjeta) ───────── */
.tarifas-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
}

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

.tarifa-opcion .tarifa-cuerpo {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.2rem;
  padding: 1rem 0.5rem;
  border: 2px solid #ddd;
  border-radius: var(--radio);
  background: var(--blanco);
  transition: all 0.2s;
  text-align: center;
}

.tarifa-opcion .tarifa-nombre {
  font-weight: 600;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--gris-oscuro);
}

.tarifa-opcion .tarifa-precio {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 1.9rem;
  line-height: 1;
  color: var(--negro);
}

.tarifa-opcion:hover .tarifa-cuerpo { border-color: var(--amarillo-hover); }
.tarifa-opcion input:checked + .tarifa-cuerpo {
  border-color: var(--negro);
  background: var(--amarillo);
  box-shadow: var(--sombra);
}
.tarifa-opcion input:focus-visible + .tarifa-cuerpo { box-shadow: 0 0 0 3px rgba(255,214,0,0.5); }

/* Subtotal informativo del formulario (el real se calcula en el servidor) */
.subtotal-estimado {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  background: var(--amarillo-light);
  border-left: 4px solid var(--amarillo);
  border-radius: var(--radio);
  padding: 0.7rem 1rem;
  margin-bottom: 1rem;
  font-size: 0.95rem;
}
.subtotal-estimado strong { font-family: 'Bebas Neue', sans-serif; font-size: 1.6rem; font-weight: 400; }

/* ─── RESUMEN DE COMPRA ────────────────────────────────────── */
.resumen-compra {
  background: var(--gris-claro);
  border-radius: var(--radio);
  padding: 1.25rem 1.5rem;
  margin: 1.5rem 0;
}

.resumen-fila {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.45rem 0;
  font-size: 0.95rem;
}

.resumen-fila .resumen-detalle { color: var(--gris-medio); font-size: 0.82rem; display: block; }
.resumen-fila.descuento { color: var(--exito); font-weight: 600; }

.resumen-total {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  border-top: 2px solid var(--negro);
  margin-top: 0.6rem;
  padding-top: 0.8rem;
}

.resumen-total .etiqueta {
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 700;
  font-size: 1.2rem;
  text-transform: uppercase;
}

.resumen-total .monto {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 2.4rem;
  line-height: 1;
}

.datos-comprador { list-style: none; font-size: 0.9rem; }
.datos-comprador li { padding: 0.2rem 0; }
.datos-comprador strong { display: inline-block; min-width: 90px; color: var(--gris-oscuro); }

/* ─── CUPÓN ────────────────────────────────────────────────── */
.cupon-box {
  border: 2px dashed #ccc;
  border-radius: var(--radio);
  padding: 1rem 1.2rem;
}

.cupon-box .cupon-fila { display: flex; gap: 0.5rem; }
.cupon-box .cupon-fila .form-control { text-transform: uppercase; }
.cupon-box .cupon-mensaje { font-size: 0.85rem; margin-top: 0.5rem; }

.cupon-box.aplicado { border-color: var(--exito); border-style: solid; background: #f1faf3; }
.cupon-box.aplicado .cupon-mensaje { color: #155724; }
.cupon-box.invalido { border-color: var(--peligro); }
.cupon-box.invalido .cupon-mensaje { color: var(--peligro); }

/* ─── RESULTADO DEL PAGO ───────────────────────────────────── */
.resultado-pago { text-align: center; }

.resultado-icono {
  width: 84px;
  height: 84px;
  margin: 0 auto 1rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.6rem;
}

.resultado-pago.exito .resultado-icono { background: #d4edda; color: var(--exito); }
.resultado-pago.fallo .resultado-icono { background: #f8d7da; color: var(--peligro); }
.resultado-pago.anulado .resultado-icono { background: #fff3cd; color: #856404; }

.resultado-pago .resumen-compra { text-align: left; }

.orden-numero {
  display: inline-block;
  font-family: 'Bebas Neue', sans-serif;
  font-size: 1.4rem;
  letter-spacing: 2px;
  background: var(--negro);
  color: var(--amarillo);
  padding: 0.2rem 0.9rem;
  border-radius: var(--radio);
}

/* Pantalla intermedia de redirección a Webpay */
.redirect-webpay { text-align: center; padding: 4rem 1rem; }
.spinner {
  width: 48px;
  height: 48px;
  margin: 0 auto 1rem;
  border: 5px solid #ddd;
  border-top-color: var(--amarillo);
  border-radius: 50%;
  animation: girar 0.9s linear infinite;
}
@keyframes girar { to { transform: rotate(360deg); } }

/* ─── RESPONSIVE ───────────────────────────────────────────── */
@media (max-width: 560px) {
  .tarifas-grid { grid-template-columns: 1fr; }
  .tarifa-opcion .tarifa-cuerpo { flex-direction: row; justify-content: space-between; padding: 0.8rem 1rem; }
  .tarifa-opcion .tarifa-precio { font-size: 1.6rem; }
  .cupon-box .cupon-fila { flex-direction: column; }
  .resumen-total .monto { font-size: 2rem; }
}
