/* Componentes comunes a las dos propuestas. Cada tema define sus variables (--as-*, --btn-radius, --dock).
   Sin sombras difusas, sin desenfoques, sin animaciones continuas. */

/* Botón principal «Comprar boleto» (verde #25D366, texto oscuro #062B14 para contraste AA) */
.btn-buy {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 48px;
  padding: 12px 24px;
  border: 2px solid transparent;
  border-radius: var(--btn-radius, 12px);
  background: #25d366;
  color: #062b14;
  font: inherit;
  font-weight: 700;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
}
.btn-buy:hover { background: #3fe07c; }
.btn-buy svg, .btn-assist svg { width: 22px; height: 22px; flex: none; fill: currentColor; }
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }

/* Acceso al asistente */
.btn-assist {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 10px 16px;
  border: 2px solid var(--as-line-strong, #4a4a4a);
  border-radius: var(--btn-radius, 12px);
  background: transparent;
  color: var(--as-dock-fg, #f5f5f5);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

/* Aviso "Mensaje copiado" */
.toast {
  position: fixed;
  z-index: 90;
  left: 50%;
  bottom: calc(var(--dock, 76px) + 16px);
  transform: translateX(-50%);
  max-width: calc(100vw - 40px);
  padding: 12px 20px;
  border-radius: var(--btn-radius, 12px);
  background: #f5f5f5;
  color: #0a0a0a;
  font-weight: 700;
  text-align: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}
.toast.show { opacity: 1; }

/* Cambio de ruta en el título */
[data-route-label] { display: inline-block; }
[data-route-label], .city { transition: opacity 0.16s ease, transform 0.16s ease; }
.route-swap [data-route-label], .route-swap .city { opacity: 0; transform: translateY(6px); }

/* Videos: botón de reproducir grande sobre el póster */
.vid { position: relative; contain: layout paint style; } /* acota el repintado al empezar a reproducir */
.vid-play {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
}
.vid-play-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 72px;
  height: 72px;
  border: 3px solid #fff;
  border-radius: 50%;
  background: var(--vid-btn, #7a1428);
}
.vid-play-icon svg { width: 32px; height: 32px; margin-left: 4px; fill: #fff; }
.vid.is-started .vid-play { display: none; }
.vid-error {
  position: absolute;
  inset: auto 8px 8px 8px;
  margin: 0;
  padding: 10px 12px;
  border-radius: 8px;
  background: #fff;
  color: #1b1416;
  font-size: 0.9375rem;
  font-weight: 700;
}

/* Asistente de compra de boletos */
.as-overlay { position: fixed; inset: 0; z-index: 40; background: rgba(0, 0, 0, 0.55); }
.as-panel {
  position: fixed;
  z-index: 50;
  left: 12px;
  right: 12px;
  bottom: calc(var(--dock, 76px) + 12px);
  display: flex;
  flex-direction: column;
  max-height: min(600px, calc(100vh - var(--dock, 76px) - 28px));
  overflow: hidden;
  border: 1px solid var(--as-line, #2a2a2a);
  border-radius: var(--as-radius, 12px);
  background: var(--as-bg, #141414);
  color: var(--as-fg, #f5f5f5);
}
.as-panel :focus-visible { outline-color: var(--as-focus, #fff); }
.as-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 6px 8px 6px 16px;
  border-bottom: 1px solid var(--as-line, #2a2a2a);
  background: var(--as-head, #1c1c1c);
  color: var(--as-head-fg, #f5f5f5);
}
.as-head h2 { margin: 0; font-size: 1.125rem; letter-spacing: 0; line-height: 1.2; }
.as-head :focus-visible { outline-color: var(--as-head-focus, #fff); }
.as-close {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  cursor: pointer;
}
.as-close svg { width: 24px; height: 24px; fill: currentColor; }
.as-log { display: flex; flex: 1; flex-direction: column; gap: 10px; overflow-y: auto; padding: 16px; }
.as-msg { max-width: 92%; margin: 0; padding: 10px 14px; border-radius: var(--as-radius, 12px); line-height: 1.5; }
.as-bot { align-self: flex-start; background: var(--as-msg, #1c1c1c); }
.as-me { align-self: flex-end; background: var(--as-me-bg, #7a1428); color: #fff; }
.as-quote { border: 1px dashed var(--as-line-strong, #4a4a4a); }
.as-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 12px 16px 16px;
  border-top: 1px solid var(--as-line, #2a2a2a);
}
.chip {
  display: inline-flex;
  align-items: center;
  min-height: 48px;
  padding: 10px 18px;
  border: 2px solid var(--as-chip, #4a4a4a);
  border-radius: 999px;
  background: transparent;
  color: var(--as-fg, #f5f5f5);
  font: inherit;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
}
.chip:hover { background: var(--as-msg, #1c1c1c); }
.as-field { display: flex; flex: 1 1 100%; flex-direction: column; gap: 6px; }
.as-field label { font-weight: 700; }
.as-field input {
  min-height: 48px;
  padding: 8px 12px;
  border: 2px solid var(--as-line-strong, #4a4a4a);
  border-radius: 10px;
  background: var(--as-input, #0a0a0a);
  color: var(--as-fg, #f5f5f5);
  font: inherit;
}

@media (min-width: 520px) {
  .as-panel { left: auto; right: 20px; width: 400px; }
}
@media (prefers-reduced-motion: reduce) {
  [data-route-label], .city, .toast { transition: none; }
}

/* Barra inferior responsive: el texto de «Comprar boleto» nunca se parte en dos líneas y el
   asistente se reduce a un ícono en pantallas angostas (conserva su nombre accesible). */
.dock .btn-buy { white-space: nowrap; min-width: 0; padding-inline: 18px; }
.dock .btn-assist { white-space: nowrap; }
@media (max-width: 599px) {
  body .dock { gap: 8px; padding-inline: 16px; }
  .dock .btn-assist { position: relative; width: 52px; padding: 10px; }
  .dock .btn-assist span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; }
}
@media (max-width: 359px) {
  .dock .btn-buy { gap: 8px; padding-inline: 12px; white-space: normal; line-height: 1.1; }
}

/* Enlaces legales del pie */
.legal-links { display: flex; flex-wrap: wrap; gap: 4px 16px; }
.legal-links a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 4px; font-weight: 600; }
