/* ======================================== */
/* CSS CORREGIDO - TEMA OSCURO (SOLO CREMAS) */
/* ======================================== */
:root {
  --bg-main: #1f368d;
  --bg-input: #2240b2;
  --bg-cart: #2240b2; /* Fondo de contenedores ahora oscuro */

  /* Paleta de colores de texto (Solo Cremas y Blancos) */
  --text-light: #FDFBF5;     /* Blanco-crema principal para texto de cuerpo */
  --text-accent: #F1F1F1;    /* Crema principal para títulos, labels y acentos */
  --text-muted: #C9BFA8;     /* Crema-khaki suave para placeholders y texto de ayuda */
  --text-on-accent: #2240b2; /* Texto azul oscuro (para usar SOBRE botones crema) */

  --footer-h: 70px;
  --radius: 16px;
  --ot-primary: #2240b2;
  --ot-primary-weak: #1f368d;
}

html,
body {
  height: 100%;
  overflow-x: hidden;
}

html {
  scroll-behavior: smooth;
}

body {
  background: var(--bg-main);
  color: var(--text-light); /* Texto principal ahora es blanco-crema */
  font-size: 16px;
}

.ot-shell {
  padding: 1rem 1rem calc(var(--footer-h) + 1.5rem);
}

.container-xxl {
  max-width: 1200px;
}

/* Header */
.ot-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.5rem 0 1.5rem;
}

.ot-brand .ti {
  font-size: 1.8rem;
  color: var(--text-accent);
}

.ot-brand-name {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-accent);
}

/* Cards y Secciones */
.ot-card {
  background: var(--bg-main);
  border: none;
  padding: 0;
}

.card.pasajero-card {
  background-color: transparent !important;
  border: none !important;
  padding: 0 !important;
}

/* Texto en labels y inputs en color crema/acento */
.pasajero-card .form-label {
  color: var(--text-accent) !important;
  font-weight: 700;
}

.pasajero-card .form-control {
  color: var(--text-accent) !important;
  background: var(--bg-input) !important;
}

.ot-card .section-card,
.section-card {
  background: transparent !important;
  padding: 1.5rem;
  border-radius: 14px;
}

section {
  scroll-margin-top: 20px;
  margin-bottom: 1.5rem;
}

h5 {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 1.2rem;
  color: var(--text-accent);
}

h6 {
  margin: 0 0 0.35rem;
  font-weight: 800;
  color: var(--text-accent);
}

/* Formularios - Color de texto "crema" */
.form-control,
.form-select {
  background: var(--bg-input);
  color: var(--text-accent) !important;
  border: 1px solid transparent;
  border-radius: 12px;
  padding: 0.75rem 1rem;
  height: 48px;
  font-size: 1rem;
  transition: all 0.2s ease-in-out;
}

.form-control:focus,
.form-select:focus {
  background: var(--bg-input);
  color: var(--text-accent) !important;
  border-color: var(--text-accent);
  box-shadow: 0 0 0 3px rgba(230, 213, 184, 0.25); /* Sombra de focus crema */
}

.form-control::placeholder {
  color: var(--text-muted) !important;
  opacity: 1;
}

/* Labels en color "crema" */
label.form-label,
label {
  color: var(--text-accent) !important;
  margin-bottom: 0.5rem;
  font-weight: 500;
  font-size: 0.9rem;
}

/* Botones */
.btn {
  border-radius: 999px;
  padding: 0.6rem 1.5rem;
  font-weight: 700;
  border: 2px solid;
}

.btn-primary {
  background-color: var(--text-accent);
  border-color: var(--text-accent);
  color: var(--text-on-accent) !important; /* Texto azul oscuro sobre botón crema */
}

.btn-primary:hover {
  background-color: #F0EAD6; /* Crema más claro */
  border-color: #F0EAD6;
  color: var(--text-on-accent) !important;
}

.btn-outline-primary {
  color: var(--text-accent) !important;
  border-color: var(--text-accent);
}

.btn-outline-primary:hover,
.btn-check:checked + .btn-outline-primary {
  background-color: var(--text-accent);
  border-color: var(--text-accent);
  color: var(--text-on-accent) !important;
}

.btn-registrar {
  padding: 0.85rem 1.25rem;
  font-weight: 800;
  margin-top: 20px;
  display: block;
  width: 100%;
  max-width: 300px;
  margin-left: auto;
  margin-right: auto;
}

/* Carrito Sticky - CORREGIDO A OSCURO */
.ot-cart {
  background: var(--bg-cart); /* Fondo azul oscuro */
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
  color: var(--text-light); /* Texto blanco-crema */
}

.ot-cart-header {
  font-weight: 700;
  color: var(--text-accent); /* Título en crema */
}

.ot-cart .small {
  opacity: 0.9;
  color: var(--text-light);
}

.ot-total {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--text-light); /* Total en blanco-crema */
}

/* Footer Fijo */
.footer-buttons {
  position: fixed;
  left: 0;
  bottom: 0;
  width: 100%;
  height: var(--footer-h);
  background: rgba(15, 42, 69, 0.8);
  backdrop-filter: blur(10px);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  justify-content: space-evenly;
  align-items: center;
  z-index: 1050;
}

.footer-buttons button {
  background: transparent;
  border: none;
  color: var(--text-muted); /* Iconos inactivos en crema-khaki */
  font-size: 1.5rem;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  transition: all 0.2s ease;
}

.footer-buttons button.active {
  background: var(--text-accent);
  color: var(--text-on-accent);
}

/* Toggle "Solo ida / Redondo" */
.trip-toggle {
  display: flex;
  width: 100%;
  border-radius: 12px;
  overflow: hidden;
  background: var(--ot-primary-weak);
  margin-bottom: 14px;
}

.trip-check {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.trip-btn {
  flex: 1 1 0;
  display: block;
  margin: 0;
  padding: 0.72rem 1rem;
  text-align: center;
  font-weight: 700;
  color: var(--text-accent) !important; /* Texto en crema */
  cursor: pointer;
  user-select: none;
  background: transparent;
  transition: filter 0.18s ease, background-color 0.18s ease;
  border: 0;
  line-height: 1.2;
  position: relative;
  z-index: 0;
}

.trip-btn + .trip-btn {
  box-shadow: inset 1px 0 0 rgba(255, 255, 255, 0.18);
}

.trip-check:checked + .trip-btn {
  background: var(--ot-primary);
  box-shadow: none;
  z-index: 1;
  color: var(--text-light) !important; /* Texto en blanco-crema */
}

.trip-btn:hover {
  filter: brightness(1.05);
}

/* Utilidades */
.divider {
  height: 1px;
  background: rgba(255, 255, 255, 0.1);
  margin: 1rem 0;
}

/* .bg-white-soft ahora es OSCURO */
.bg-white-soft {
  background: var(--bg-cart) !important; /* Fondo azul oscuro */
  color: var(--text-light) !important; /* Texto blanco-crema */
  border-radius: var(--radius);
}

.ot-hidden {
  display: none !important;
}

#datos-reserva {
  display: none;
}

/* Estilos para campos de regreso */
.campos-regreso {
  margin-top: 15px;
  padding-top: 15px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* ======================================== */
/* CORRECCIÓN: Estilos para el tercer tab (resumen) */
/* ======================================== */

.bg-white-soft h5,
.bg-white-soft h6 {
  color: var(--text-accent) !important; /* Títulos en crema */
}

/* Regla general para CUALQUIER texto (p, div, span, label) */
.bg-white-soft,
.bg-white-soft p,
.bg-white-soft div,
.bg-white-soft span,
.bg-white-soft label,
.bg-white-soft small,
.bg-white-soft strong {
    color: var(--text-light) !important; /* Todo el texto base será blanco-crema */
}

/* Sobreescribir clases de Bootstrap (text-dark, text-muted, etc.) */
.bg-white-soft .text-dark,
.bg-white-soft .text-darkish,
.bg-white-soft .text-muted,
.bg-white-soft .small {
  color: var(--text-muted) !important; /* Texto más suave (crema-khaki) */
  opacity: 0.9;
}

/* * !!!!!!!!! NUEVAS REGLAS !!!!!!!!!
 * Esto limpia el resumen como pediste.
 * Cero fondos, cero bordes.
 */
.pasajero-resumen {
  background: none !important;
  border: none !important;
  padding: 0 !important;
  margin-bottom: 0.5rem !important;
}

.pasajero-resumen .pasajero-nombre {
  font-weight: 600;
  color: var(--text-accent) !important; /* Nombre en crema */
}

.pasajero-resumen .pasajero-doc {
  color: var(--text-muted) !important; /* Documento en color suave */
  font-size: 0.85rem;
  margin-left: 1.25rem;
}

.boleto-item {
  background: none !important;
  border: none !important;
  padding: 0.5rem 0 !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1) !important; /* Borde claro */
}

.boleto-item:last-child {
  border-bottom: none !important;
}

.boleto-ruta {
  font-weight: 600;
  color: var(--text-accent) !important; /* Nombre de pasajero en boleto en crema */
}

.boleto-fecha {
  color: var(--text-muted) !important; /* Fecha/Ruta en color suave */
  font-size: 0.9rem;
  margin-left: 1.25rem;
}
/* !!!!!!!!! FIN DE NUEVAS REGLAS !!!!!!!!! */


/* Input de descuento en Tab 3 */
.bg-white-soft .form-control {
    background: var(--bg-main); /* Fondo de input más oscuro */
    color: var(--text-accent) !important;
}
.bg-white-soft .form-control:focus {
    background: var(--bg-main);
}
.bg-white-soft .form-control::placeholder {
    color: var(--text-muted) !important;
}

/* Total y subtotales en Tab 3 */
.bg-white-soft .text-end p,
.bg-white-soft .text-end .fw-bold {
    color: var(--text-light) !important;
}

/* Descuento y Total ahora son color crema */
.bg-white-soft .text-success,
.bg-white-soft .text-primary,
.bg-white-soft #total_valor {
  color: var(--text-accent) !important;
}

/* Términos y condiciones en Tab 3 */
.bg-white-soft .form-check-label {
    color: var(--text-light) !important;
}

.bg-white-soft .form-check-label a {
    color: var(--text-accent) !important;
    text-decoration: underline;
}
.bg-white-soft .form-check-label a:hover {
    color: var(--text-light) !important;
}


/* Responsive */
@media (max-width: 991.98px) {
  .ot-shell {
    padding: 0.5rem 0.5rem calc(var(--footer-h) + 1rem);
  }

  .col-lg-4 {
    order: -1;
  }

  .ot-cart {
    margin-bottom: 1rem;
    position: static; /* Quitar sticky en móvil */
  }

  .section-card {
    padding: 1rem;
  }
}

@media (max-width: 576px) {
  .section-card {
    padding: 14px 14px 18px;
  }

  .trip-btn {
    padding: 0.65rem 0.75rem;
  }

  .btn-registrar {
    margin-top: 15px;
  }
}

.btn-primary span,
.btn-primary i {
  color: var(--text-on-accent) !important;
}