/* ============================================================
   home.css — Elegir viaje, elegir planta, menú principal
   ============================================================ */

/* ===== Encabezado de bienvenida (view-choose) ===== */

/* Card que envuelve saludo + título + subtítulo, separada del logo fijo
   del topbar de arriba. */
.trip-hero-card{
  background: var(--card);
  border: 1.5px solid rgba(17,24,39,.09);
  border-radius: 20px;
  padding: 18px 20px 4px;
  margin-bottom: 16px;
}

.hello-greeting{
  margin:0; font-size:.95rem; font-weight:700; letter-spacing:.01em;
  color:var(--primary);
}

/* ===== Bases y condiciones (view-bases) ===== */
.bases-card{
  background: var(--card);
  border: 1.5px solid rgba(17,24,39,.09);
  border-radius: 20px;
  padding: 28px 24px;
  box-shadow: var(--shadow);
  color: var(--text);
}

/* --- Pantalla 1: landing --- */
.bases-icon{
  width: 64px; height: 64px; margin: 0 auto 18px;
  border-radius: 50%;
  background: linear-gradient(145deg, #dbeafe, #bfdbfe);
  color: var(--primary);
  display: grid; place-items: center;
}

.bases-title{
  margin: 0 0 10px; font-size: 1.3rem; font-weight: 800;
  color: var(--text); text-align: center; line-height: 1.25;
}

.bases-text{
  margin: 0 0 22px; font-size: .92rem; line-height: 1.55;
  color: var(--muted); text-align: center;
}

.bases-cta{
  display: flex; align-items: center; justify-content: center; gap: 8px;
  width: 100%; background: #111827; color: #fff;
  border-radius: 999px; min-height: 52px; font-size: .98rem; font-weight: 700;
}
.bases-cta:hover{ background: #1f2937; }
.bases-cta svg{ flex-shrink: 0; }

.bases-hint{
  display: flex; align-items: center; justify-content: center; gap: 6px;
  margin: 14px 0 0; font-size: .8rem; color: var(--muted);
}

/* --- Pantalla 3: confirmación --- */
.bases-confirmed{
  text-align: center;
  animation: cardIn .35s ease both;
}

.bases-confirmed-icon{
  width: 64px; height: 64px; margin: 0 auto 18px;
  border-radius: 50%;
  background: linear-gradient(145deg, #d1fae5, #a7f3d0);
  color: #047857;
  display: grid; place-items: center;
}

.bases-confirmed-title{
  margin: 0 0 8px; font-size: 1.25rem; font-weight: 800;
  color: var(--text); line-height: 1.3;
}

.bases-confirmed-text{
  margin: 0 0 20px; font-size: .92rem; line-height: 1.55;
  color: var(--muted);
}

.bases-confirmed-notice{
  display: flex; align-items: flex-start; gap: 10px; text-align: left;
  background: #eef2ff; border: 1.5px solid #c7d2fe; border-radius: 14px;
  padding: 12px 14px; margin-bottom: 20px;
}
.bases-confirmed-notice-icon{ flex-shrink: 0; margin-top: 1px; color: #3730a3; }
.bases-confirmed-notice-text{ flex: 1; font-size: .85rem; line-height: 1.5; color: #3730a3; }

.bases-confirmed-signature{
  margin: 0 0 22px; font-size: .9rem; font-weight: 700; color: var(--text);
}

/* --- Pantalla 2: formulario --- */
.bases-form-title{
  margin: 0 0 4px; font-size: 1.15rem; font-weight: 800; color: var(--text);
}
.bases-form-subtitle{
  margin: 0 0 20px; font-size: .85rem; line-height: 1.5; color: var(--muted);
}

/* Aviso: hay que leer las Bases y Condiciones antes de continuar (link
   externo a Drive). Mismo lenguaje visual que .byc-banner de view-choose. */
.bases-read-notice{
  display: flex; align-items: flex-start; gap: 10px;
  background: #fff8e1; border: 1.5px solid #f9a825; border-radius: 14px;
  padding: 12px 14px; margin-bottom: 20px;
  text-decoration: none; transition: background-color .15s ease;
}
.bases-read-notice:hover, .bases-read-notice:active{ background: #fff3cd; }
.bases-read-notice-icon{ flex-shrink: 0; margin-top: 1px; color: #92400e; }
.bases-read-notice-text{
  flex: 1; font-size: .85rem; line-height: 1.5; color: #92400e;
}
.bases-read-notice-text strong{ display: block; margin-bottom: 2px; }
.bases-read-notice-arrow{ flex-shrink: 0; margin-top: 2px; color: #c2820a; }

.bases-checkbox-row{
  display: flex; align-items: center; gap: 10px;
  padding: 12px 14px; border-radius: 12px;
  background: #f9fafb; border: 1.5px solid #e5e7eb;
  font-size: .92rem; font-weight: 600; color: var(--text);
  cursor: pointer;
  transition: border-color .15s ease, background-color .15s ease;
}
.bases-checkbox-row input[type="checkbox"]{
  width: 18px; height: 18px; accent-color: var(--primary); flex-shrink: 0; cursor: pointer;
}

/* Aclaración sobre el uso del correo, debajo del campo cuando está visible. */
.bases-email-hint{
  margin: 6px 0 0; font-size: .8rem; line-height: 1.45; color: var(--muted);
}

/* Estado de error para filas de checkbox (no se puede usar .field-error
   directo: esa clase apunta a bordes de <input> de texto). */
.bases-checkbox-row.field-error-row{
  border-color: #f87171; background: #fff5f5;
  box-shadow: 0 0 0 4px rgba(239,68,68,.10);
  animation: shake .3s ease;
}

/* --- Pantalla 2: "¿Tenés correo?" --- */
.bases-choice-options{
  display: flex; flex-direction: column; gap: 12px; margin-top: 22px;
}

.bases-choice-btn{
  display: flex; align-items: center; justify-content: center; gap: 10px;
  width: 100%; min-height: 56px; border-radius: 16px; border: 1.5px solid transparent;
  font-size: .98rem; font-weight: 700; cursor: pointer;
  background: linear-gradient(145deg, #d1fae5, #a7f3d0); color: #047857;
  transition: transform .15s ease, box-shadow .15s ease;
}
.bases-choice-btn:hover{ transform: translateY(-2px); box-shadow: 0 8px 20px rgba(4,120,87,.18); }
.bases-choice-btn:active{ transform: translateY(0); }
.bases-choice-btn svg{ flex-shrink: 0; }

.bases-choice-btn-alt{
  background: #f9fafb; color: var(--muted); border-color: #e5e7eb;
}
.bases-choice-btn-alt:hover{ box-shadow: 0 8px 20px rgba(17,24,39,.10); background: #f3f4f6; }

/* ===== Lista de viajes (view-choose) ===== */
.trip-list{ display:flex; flex-direction:column; gap:12px; }

.trip-card{
  background: var(--card);
  border-radius:16px;
  box-shadow:var(--shadow);
  padding:16px;
  cursor:pointer;
  transition: transform .2s ease, box-shadow .2s ease;
  animation: cardIn .35s ease both;
  border-left:4px solid transparent;
}
.trip-card.single-floor{ border-left-color:#60a5fa; }
.trip-card.double-floor{ border-left-color:#f59e0b; }
.trip-card:hover{ transform:translateY(-3px); box-shadow:0 14px 30px rgba(17,24,39,.14); }
@keyframes cardIn{ from{opacity:0; transform:translateY(8px);} to{opacity:1; transform:none;} }

.trip-head{ display:flex; align-items:center; gap:12px; }
.trip-head-left{ display:flex; align-items:center; gap:12px; min-width:0; flex:1; }
.trip-head-right{ flex-shrink:0; display:flex; flex-direction:column; align-items:flex-end; gap:8px; }

.trip-bus-icon{
  flex-shrink:0; width:44px; height:44px; border-radius:12px;
  display:grid; place-items:center;
  background: linear-gradient(145deg, #eef2ff, #e0e7ff);
  color:#4f46e5;
  box-shadow: 0 3px 10px rgba(79,70,229,.18), inset 0 1px 0 rgba(255,255,255,.6);
}
.trip-bus-icon.floors-icon{
  background: linear-gradient(145deg, #fef3c7, #fde68a); color:#92400e;
  box-shadow: 0 3px 10px rgba(180,131,3,.18), inset 0 1px 0 rgba(255,255,255,.6);
}
.trip-bus-icon svg{ width:22px; height:22px; }

.trip-card h3{ margin:0; font-size:1.05rem; font-weight:800; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }

.trip-pill{
  display:inline-flex; flex-shrink:0; font-size:.72rem; font-weight:700; padding:4px 9px;
  border-radius:999px; background:#e0e7ff; color:#3730a3; letter-spacing:.01em;
}
.trip-pill.doble{ background:#fde68a; color:#92400e; }

.trip-arrow{ flex-shrink:0; color:#9ca3af; display:grid; place-items:center; }

.trip-countdown-wrap{ margin-top:16px; }
.trip-countdown{
  display:inline-flex; align-items:center; gap:8px; font-size:.78rem; font-weight:700;
  padding:5px 10px 5px 8px; border-radius:999px; background:#f3f4f6; color:#4b5563;
  box-shadow: inset 3px 0 0 #9ca3af;
}
.trip-countdown.live{ background:#d1fae5; color:#065f46; box-shadow: inset 3px 0 0 #10b981; }
.trip-countdown.future{ background:#eef2ff; color:#3730a3; box-shadow: inset 3px 0 0 #6366f1; }

.empty-state{
  text-align:center; padding:48px 20px; color:var(--muted);
  animation: cardIn .35s ease both;
}
.empty-state-icon{
  width:56px; height:56px; margin:0 auto 16px; border-radius:16px;
  display:grid; place-items:center;
  background: linear-gradient(145deg, #eef2ff, #e0e7ff); color:#6366f1;
  box-shadow: 0 3px 10px rgba(99,102,241,.14), inset 0 1px 0 rgba(255,255,255,.6);
}
.empty-state-icon svg{ width:26px; height:26px; }
.empty-state h3{ margin:0 0 6px; color:var(--text); font-size:1rem; }
.empty-state p{ margin:0; font-size:.9rem; }

/* ===== Cards de acción (bottom-sheet de planta) ===== */
.action-cards{ display:flex; flex-direction:column; gap:12px; max-width:480px; width:100%; margin:0 auto; }

.action-card{
  background: linear-gradient(180deg, #ffffff 0%, #fafbff 100%);
  border-radius:16px; box-shadow:var(--shadow);
  padding:16px; display:flex; align-items:center; gap:14px;
  cursor:pointer; position:relative; overflow:hidden;
  transition: transform .25s ease, box-shadow .25s ease;
  animation: cardIn .35s ease both;
}
.action-card::before{
  content:""; position:absolute; left:0; top:12px; bottom:12px; width:4px; border-radius:999px;
  background: linear-gradient(180deg, rgba(99,102,241,.45), rgba(99,102,241,0));
}
@media (hover:hover){
  .action-card:hover{ transform:translateY(-4px); box-shadow:0 14px 32px rgba(17,24,39,.14); }
}

.action-card-icon{
  flex-shrink:0; width:46px; height:46px; border-radius:12px; display:grid; place-items:center;
}
.action-card-icon svg{ width:22px; height:22px; }
.action-card-icon.select-icon{ background: linear-gradient(145deg, #d1fae5, #a7f3d0); color:#047857; }
.action-card-icon.find-icon{ background: linear-gradient(145deg, #dbeafe, #bfdbfe); color:#1e40af; }
.action-card-icon.floor-alta-icon{ background: linear-gradient(145deg, #fde68a, #fcd34d); color:#92400e; }

.action-card-body{ flex:1; min-width:0; }
.action-card-title{ font-weight:800; font-size:1rem; margin-bottom:2px; }
.action-card-desc{ font-size:.85rem; color:var(--muted); line-height:1.35; }

.action-card-arrow{ flex-shrink:0; color:#9ca3af; }

/* ===== Encabezado de viaje (título + tags) ===== */
.trip-header{ text-align:center; margin-bottom:20px; }
.trip-title{ font-size:1.35rem; font-weight:800; }
.trip-tags{ display:flex; justify-content:center; gap:8px; flex-wrap:wrap; margin-bottom:18px; }
.trip-tags .tag{
  border-radius:999px; padding:6px 12px; font-weight:700; font-size:.85rem;
  background:#eef2ff; color:#3730a3;
}

.floors{ display:flex; flex-direction:column; gap:12px; }

/* ===== Banner de aviso: Bases y Condiciones ===== */
.byc-banner{
  display:block; max-width:680px; margin:16px auto 0;
  background:#fff8e1; border:1.5px solid #f9a825; border-radius:16px;
  padding:12px 16px; text-decoration:none; text-align:center;
  color:#e65100; font-size:.85rem; font-weight:700; line-height:1.5;
  box-shadow:0 2px 10px rgba(180,131,3,.08);
  transition: background-color .15s ease, transform .12s ease;
}
.byc-banner:hover, .byc-banner:active{ background:#fff3cd; transform:scale(.99); }

.byc-banner-icon{
  width:15px; height:15px; vertical-align:-2px; margin-right:4px;
  color:#e65100;
}

/* ===== Wizard de Bases y condiciones (3 pasos) ===== */

/* Header de progreso: título dinámico + "Paso X de 3" + barra */
.bases-progress{ margin-bottom: 18px; }

.bases-progress-top{
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 12px; margin-bottom: 10px;
}
.bases-progress-top .bases-form-title{ margin: 0; }

.bases-progress-count{
  flex-shrink: 0; font-size: .8rem; font-weight: 700; color: var(--muted);
}

.bases-progress-track{
  height: 6px; border-radius: 999px; background: #e5e7eb; overflow: hidden;
}
.bases-progress-fill{
  height: 100%; border-radius: inherit; background: var(--primary);
  transition: width .25s ease;
}

/* Cada paso es un <fieldset> sin estilos de navegador por defecto */
.bases-step{ border: none; margin: 0; padding: 0; min-width: 0; animation: cardIn .25s ease both; }

/* Fila de selects día/mes para el cumpleaños */
.bases-birthday-row{ display: flex; gap: 10px; }
.bases-birthday-row select{
  flex: 1; border: 1px solid #e5e7eb; border-radius: 10px; padding: 12px;
  font-size: 1rem; background: #fff; color: var(--text);
}
.bases-birthday-row select:invalid{ color: var(--muted); }

/* Botón "select" que abre el bottom-sheet de parentesco: mismo look que
   un <input>, para que el wizard se vea homogéneo. */
.bases-sheet-trigger{
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  width: 100%; border: 1px solid #e5e7eb; border-radius: 10px; padding: 12px;
  font-size: 1rem; background: #fff; color: var(--text); text-align: left;
  cursor: pointer;
}
.bases-sheet-trigger svg{ flex-shrink: 0; color: var(--muted); }
.bases-sheet-trigger#basesParentescoTrigger.field-error{
  border-color: #ef4444; box-shadow: 0 0 0 2px rgba(239,68,68,.15);
}
#basesParentescoLabel{ color: var(--text); }

/* ===== Bottom-sheet genérico (mismo patrón que floorSheet/seatActionSheet) =====
   Se declara acá porque view-bases.js/index.html lo necesitan y el resto
   de .action-sheet vive en croquis.css. Si croquis.css ya define estas
   clases, esta regla es idéntica en intención y no debería chocar. */
.action-sheet{
  position: fixed; inset: 0; z-index: 320;
  display: flex; align-items: flex-end; justify-content: center;
  background: rgba(17,24,39,.45);
  opacity: 0; pointer-events: none;
  transition: opacity .18s ease;
}
.action-sheet.show{ opacity: 1; pointer-events: auto; }

.action-sheet-content{
  width: 100%; max-width: 480px;
  background: var(--card-solid); border-radius: 20px 20px 0 0;
  padding: 20px 20px calc(20px + env(safe-area-inset-bottom, 0px));
  box-shadow: 0 -8px 28px rgba(17,24,39,.18);
  transform: translateY(100%);
  transition: transform .22s ease;
}
.action-sheet.show .action-sheet-content{ transform: translateY(0); }

.sheet-seat-pasajero{
  font-size: 1.05rem; font-weight: 800; color: var(--text);
  text-align: center; margin-bottom: 16px;
}

.floor-sheet-options{ display: flex; flex-direction: column; gap: 8px; margin-bottom: 4px; }

.floor-sheet-option{
  width: 100%; min-height: 48px; border-radius: 12px;
  border: 1.5px solid #e5e7eb; background: #f9fafb; color: var(--text);
  font-size: .96rem; font-weight: 600; cursor: pointer;
  transition: border-color .15s ease, background-color .15s ease;
}
.floor-sheet-option:hover{ background: #f3f4f6; }
.floor-sheet-option.selected{
  border-color: var(--primary); background: #eff6ff; color: var(--primary);
}
