/* App del Paso · estilos propios. La base (colores, letra, botones) viene de zojim-ui.css. */

/* Color de la app: gris acero a blanco nieve (la cordillera). Sobrio, para que el verde, rojo y ámbar del estado
   sean lo único con color fuerte. El índigo, el lima y el cian ya los usan otras apps. */
[data-app="elpaso"] {
  --z-app-1: #cbd5e1;
  --z-app-2: #f1f5f9;
  --z-app-tinta: #0f172a;
  --pa-acento: #cbd5e1;           /* gris nieve para textos sobre negro */
  --pa-abierto: #4ade80;
  --pa-abierto-fondo: rgba(74, 222, 128, .12);
  --pa-cerrado: #f87171;
  --pa-cerrado-fondo: rgba(248, 113, 113, .13);
  --pa-restringido: #fbbf24;
  --pa-restringido-fondo: rgba(251, 191, 36, .12);
  --pa-nada: #a8a29e;
}
/* Por si zojim-ui.css no carga (sin internet la primera vez) */
html { font-size: 112.5%; }
body { margin: 0; background: #09090a; color: #f5f3ee; font-family: "Geist", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; line-height: 1.6; }

.contenedor { width: 100%; max-width: 860px; margin: 0 auto; padding: 0 16px; box-sizing: border-box; }
@media (min-width: 720px) { .contenedor { padding: 0 32px; } }

/* Cabecera */
.cabecera { position: sticky; top: 0; z-index: 20; background: rgba(9, 9, 10, .92); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-bottom: 1px solid var(--z-borde, rgba(255,255,255,.12)); padding-top: env(safe-area-inset-top); }
.cabecera-fila { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 72px; }
.marca { display: inline-flex; align-items: center; gap: 12px; min-height: 48px; color: var(--z-texto, #f5f3ee) !important; text-decoration: none; font-weight: 700; font-size: 1.3rem; letter-spacing: -0.02em; }
.marca img { width: 44px; height: 44px; border-radius: 22%; box-shadow: 0 10px 26px -12px #94a3b8; }
.cabecera .z-btn { min-height: 48px; padding: 8px 18px; font-size: 1rem; }

main { padding-top: 16px; padding-bottom: 40px; }

.aviso-red { margin-bottom: 16px; padding: 16px 18px; border-radius: 16px; border: 2px solid rgba(245, 203, 110, .7); background: rgba(245, 203, 110, .1); font-weight: 600; }

/* ── El estado, bien grande ───────────────────────────────────────────── */
.estado { position: relative; margin: 4px 0 16px; padding: 24px 20px 22px; border-radius: 28px; border: 3px solid var(--color, var(--pa-nada)); background: var(--fondo, rgba(255,255,255,.04)); text-align: center; }
.estado[data-estado="abierto"] { --color: var(--pa-abierto); --fondo: var(--pa-abierto-fondo); }
.estado[data-estado="cerrado"] { --color: var(--pa-cerrado); --fondo: var(--pa-cerrado-fondo); }
.estado[data-estado="restringido"] { --color: var(--pa-restringido); --fondo: var(--pa-restringido-fondo); }
.estado-paso { margin: 0; font-size: 1.15rem; font-weight: 700; color: var(--z-texto, #f5f3ee); }
.estado-detalle { margin: 0 0 10px; font-size: var(--z-t-chico, .875rem); color: var(--z-texto-2, #d4d0c8); }
.estado-pregunta { margin: 4px 0 0; font-size: 1.05rem; color: var(--z-texto-2, #d4d0c8); }
.estado-valor { display: flex; align-items: center; justify-content: center; gap: 14px; margin: 6px 0 8px; font-size: clamp(2.6rem, 13vw, 4.6rem); line-height: 1; font-weight: 800; letter-spacing: -0.03em; color: var(--color, var(--pa-nada)); }
.estado[data-estado="restringido"] .estado-valor { font-size: clamp(1.9rem, 9vw, 3.4rem); }
.estado-valor svg { width: .9em; height: .9em; flex: none; }
.estado-motivo { margin: 8px auto 0; max-width: 34rem; font-size: 1.2rem; font-weight: 600; line-height: 1.4; color: var(--z-texto, #f5f3ee); }
.estado-hora { margin: 12px 0 0; font-size: 1rem; color: var(--z-texto-2, #d4d0c8); }
.estado-hora b { color: var(--z-texto, #f5f3ee); }
.estado-viejo { display: inline-block; margin-top: 10px; padding: 6px 12px; border-radius: 999px; background: rgba(245, 203, 110, .14); color: #f5cb6e; font-weight: 700; font-size: 1rem; }
.estado-fuente { margin: 10px 0 0; font-size: var(--z-t-chico, .875rem); color: var(--z-texto-3, #aaa69e); }
.estado-fuente a { color: var(--z-texto-2, #d4d0c8) !important; display: inline-flex; align-items: center; min-height: 2.6rem; }

/* Aviso legal visible, justo debajo del estado */
.aviso-oficial { display: flex; gap: 12px; align-items: flex-start; margin: 0 0 20px; padding: 14px 16px; border-radius: 16px; border: 2px dashed rgba(245, 203, 110, .55); background: rgba(245, 203, 110, .06); font-size: 1rem; line-height: 1.5; }
.aviso-oficial svg { flex: none; width: 26px; height: 26px; margin-top: 2px; stroke: #f5cb6e; }
.aviso-oficial p { margin: 0; }
.aviso-oficial a { color: var(--z-texto, #f5f3ee) !important; font-weight: 700; }

/* Botón principal (avisos) */
.accion { margin: 0 0 24px; }
.accion .z-btn { width: 100%; }
.accion-nota { margin: 8px 0 0; text-align: center; font-size: 1rem; color: var(--z-texto-2, #d4d0c8); }

/* Tarjetas de datos */
.seccion-tit { margin: 28px 0 10px; font-size: 1.35rem; font-weight: 700; letter-spacing: -0.01em; }
.tarjetas { display: grid; gap: 12px; grid-template-columns: 1fr; }
@media (min-width: 720px) { .tarjetas.dos { grid-template-columns: 1fr 1fr; } }
.tarjeta { padding: 18px 18px; border-radius: 22px; border: 1px solid var(--z-borde, rgba(255,255,255,.12)); background: linear-gradient(180deg, rgba(255,255,255,.055), rgba(255,255,255,.02)); }
.tarjeta h3 { margin: 0 0 6px; font-size: 1.12rem; font-weight: 700; display: flex; align-items: center; gap: 10px; }
.tarjeta h3 svg { width: 24px; height: 24px; flex: none; stroke: var(--pa-acento); }
.tarjeta p { margin: 4px 0 0; }
.tarjeta .grande { font-size: 1.35rem; font-weight: 700; }
.tarjeta .suave { color: var(--z-texto-2, #d4d0c8); }
.tarjeta .chico { font-size: var(--z-t-chico, .875rem); color: var(--z-texto-3, #aaa69e); }
.sin-datos { color: var(--z-texto-2, #d4d0c8); font-style: italic; }
.cadenas { display: inline-block; margin-top: 6px; padding: 6px 14px; border-radius: 999px; font-weight: 700; }
.cadenas.si { background: var(--pa-restringido-fondo); color: var(--pa-restringido); border: 2px solid var(--pa-restringido); }
.cadenas.no { background: rgba(255,255,255,.05); color: var(--z-texto-2, #d4d0c8); border: 2px solid var(--z-borde-fuerte, rgba(255,255,255,.28)); }

/* Clima */
.clima { display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(9.5rem, 1fr)); }
.lugar { padding: 14px 14px; border-radius: 20px; border: 1px solid var(--z-borde, rgba(255,255,255,.12)); background: rgba(255,255,255,.035); }
.lugar-nombre { margin: 0; font-weight: 700; font-size: 1.02rem; }
.lugar-alt { margin: 0; font-size: var(--z-t-chico, .875rem); color: var(--z-texto-3, #aaa69e); }
.lugar-temp { margin: 6px 0 0; font-size: 1.9rem; font-weight: 800; line-height: 1.1; }
.lugar-cielo { margin: 2px 0 0; font-weight: 600; }
.lugar-extra { margin: 4px 0 0; font-size: 1rem; color: var(--z-texto-2, #d4d0c8); line-height: 1.4; }
.lugar-extra .ojo { color: #f5cb6e; font-weight: 700; }

/* Otros pasos */
.otro { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.chip { display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px; border-radius: 999px; font-weight: 800; font-size: 1.05rem; border: 2px solid currentColor; }
.chip[data-estado="abierto"] { color: var(--pa-abierto); background: var(--pa-abierto-fondo); }
.chip[data-estado="cerrado"] { color: var(--pa-cerrado); background: var(--pa-cerrado-fondo); }
.chip[data-estado="restringido"] { color: var(--pa-restringido); background: var(--pa-restringido-fondo); }
.chip[data-estado="desconocido"] { color: var(--pa-nada); }

/* Historial (Pro) */
.historial { list-style: none; margin: 0; padding: 0; }
.historial li { display: flex; gap: 12px; align-items: baseline; justify-content: space-between; padding: 12px 0; border-bottom: 1px solid var(--z-borde, rgba(255,255,255,.12)); flex-wrap: wrap; }
.historial li:last-child { border-bottom: 0; }
.historial .cuando { color: var(--z-texto-2, #d4d0c8); }
.historial .motivo { flex-basis: 100%; margin: 0; font-size: 1rem; color: var(--z-texto-2, #d4d0c8); }

/* Pro y avisos */
.panel { margin-top: 12px; }
.panel h2 { margin: 0 0 8px; font-size: 1.6rem; letter-spacing: -0.02em; }
.panel h2 em { font-family: var(--z-serif, Georgia, serif); font-style: italic; font-weight: 400; color: var(--pa-acento); }
.tildes { list-style: none; padding: 0; margin: 12px 0 18px; }
.tildes li { position: relative; padding: 6px 0 6px 36px; }
.tildes li::before { content: ""; position: absolute; left: 0; top: 9px; width: 24px; height: 24px; border-radius: 50%; background: var(--pa-acento) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6 12.5l4 4 8-9' fill='none' stroke='%230f172a' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/16px no-repeat; }
.precio { margin: 4px 0 2px; font-size: 2.2rem; font-weight: 800; letter-spacing: -0.02em; }
.precio small { font-size: 1rem; font-weight: 500; color: var(--z-texto-2, #d4d0c8); }
.sellos { display: flex; flex-wrap: wrap; gap: 8px 16px; margin: 14px 0 0; padding: 0; list-style: none; font-size: 1rem; color: var(--z-texto-2, #d4d0c8); }
.sellos li::before { content: "✓ "; color: var(--pa-acento); font-weight: 800; }
.botones { display: grid; gap: 12px; margin-top: 16px; }
.casillas { display: grid; gap: 10px; margin: 12px 0; }
.mensaje { margin: 14px 0 0; }
.mensaje:empty { display: none; }

/* Pie de la app */
.pie-app { margin-top: 36px; }
.pie-app .z-aviso-legal p { margin: 0 0 8px; }
.pie-app .botones-pie { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 10px; }

/* Círculo flotante para instalar la app (arriba del "A+" de legal.js) */
#instalar-flotante { position: fixed; right: 16px; bottom: calc(84px + env(safe-area-inset-bottom, 0px)); z-index: 30; display: flex; align-items: center; gap: 10px; }
#instalar-flotante[hidden] { display: none; }
#instalar-flotante .if-txt { padding: 8px 14px; border-radius: 999px; background: #141414; border: 1px solid rgba(203, 213, 225, .7); color: #f5f3ee; font-weight: 700; font-size: 1rem; cursor: pointer; white-space: nowrap; box-shadow: 0 10px 30px -10px rgba(0,0,0,.9); font-family: inherit; min-height: 44px; }
#instalar-flotante .if-btn { position: relative; width: 64px; height: 64px; border-radius: 50%; border: 2px solid #cbd5e1; padding: 0; background: #09090a; cursor: pointer; box-shadow: 0 14px 34px -10px rgba(148, 163, 184, .7), 0 0 0 4px rgba(9,9,10,.6); }
#instalar-flotante .if-btn img { width: 100%; height: 100%; border-radius: 50%; display: block; }
#instalar-flotante .if-so { position: absolute; right: -4px; bottom: -4px; width: 28px; height: 28px; border-radius: 50%; background: #f5f3ee; border: 2px solid #09090a; display: grid; place-items: center; }
#instalar-flotante .if-so svg { width: 16px; height: 16px; fill: #09090a; }
#instalar-flotante .if-x { position: absolute; top: -22px; right: -18px; width: 48px; height: 48px; border: 0; background: transparent; padding: 0; cursor: pointer; display: grid; place-items: center; }
#instalar-flotante .if-x span { width: 26px; height: 26px; border-radius: 50%; background: #2a2a2c; border: 1px solid rgba(255,255,255,.35); color: #fff; font: 700 16px/24px system-ui, sans-serif; text-align: center; }
@media (max-width: 380px) { #instalar-flotante .if-txt { display: none; } }

/* Hoja de instrucciones (iPhone / instalar) */
dialog.hoja { width: min(560px, calc(100% - 32px)); max-height: calc(100% - 48px); border: 1px solid var(--z-borde-fuerte, rgba(255,255,255,.28)); border-radius: 24px; padding: 22px 20px; background: #151516; color: var(--z-texto, #f5f3ee); }
dialog.hoja::backdrop { background: rgba(0,0,0,.7); }
dialog.hoja h2 { margin: 0 0 10px; font-size: 1.5rem; }
dialog.hoja ol { padding-left: 1.3rem; margin: 0 0 16px; }
dialog.hoja li { margin: 8px 0; }

.oculto { display: none !important; }
@media (prefers-reduced-motion: no-preference) { .estado { transition: background .3s, border-color .3s; } }
.tramos { margin-top: 10px; } .tramos summary { display: inline-flex; align-items: center; min-height: 48px; cursor: pointer; color: var(--pa-acento); font-weight: 700; text-decoration: underline; } .lugar-gend { border-color: rgba(203,213,225,.45); }

/* Los enlaces con forma de botón: zojim-ui pinta todos los enlaces de dorado; acá manda el botón. */
body.z a.z-btn { color: var(--z-texto, #f5f3ee); text-decoration: none; }
body.z a.z-btn-app { color: var(--z-app-tinta); }
body.z a.z-btn-texto { color: var(--pa-acento); text-decoration: underline; }

/* Enlaces dentro del texto: zona de toque más alta (48 px) sin cambiar el renglón. */
.estado-fuente a, .aviso-oficial a, .tarjeta p a, .z-aviso-legal p a, .lugar a { padding: 13px 2px; margin: -13px 0; }
#clima-fuente a { padding: 13px 2px; }
