/* ================================================================
 timeline.css — Modal "Ver Detalles": línea de tiempo + predicción
 Reutiliza los tokens de styles.css (--bg, --t1..t4, --blue, --green,
 --f, --neu-out...) para que se sienta parte del mismo sitio, no un
 componente pegado encima.
 ================================================================ */

/* El modal reusa .modal-overlay/.modal-glass de styles.css; esto solo
 ajusta el ancho para que el gráfico tenga espacio para respirar. */
.tl-modal-glass { max-width: 640px; }
@media (min-width: 768px) {
 .tl-modal-glass { max-width: 640px; }
}

/* ── Pestañas (solo aparecen si el trámite tiene más de un sub-proceso,
 ej. "Credenciales" / "Resuelto" en la misma card) ── */
.tl-tabs {
 display: flex; gap: 8px; margin: 14px 0 4px; flex-wrap: wrap;
}
.tl-tab {
 padding: 7px 16px; border-radius: 20px; border: 1px solid rgba(255,255,255,0.55);
 background: var(--bg); color: var(--t3); font-family: var(--f);
 font-size: 0.78rem; font-weight: 700; cursor: pointer;
 box-shadow: var(--neu-out-sm); transition:color .15s;
}
.tl-tab.active { color: var(--blue); box-shadow: var(--neu-in), 0 0 0 2px rgba(32,96,200,0.18); }

/* ── Estados de carga / vacío ── */
.tl-estado {
 padding: 34px 12px; text-align: center; color: var(--t3);
 font-size: 0.86rem; line-height: 1.55;
}
.tl-estado strong { color: var(--t1); }
.tl-estado-icono { font-size: 2rem; margin-bottom: 10px; }
.tl-estado-cargando { color: var(--t4); font-size: 0.8rem; padding: 46px 12px; }

/* ── Meta (n. de reportes) ── */
.tl-meta {
 font-size: 0.76rem; color: var(--t3); margin: 12px 2px 10px; line-height: 1.5;
}
.tl-meta strong { color: var(--t1); }

/* ── Área del gráfico ── */
.tl-chart-wrap {
 background: var(--bg); border: 1px solid rgba(255,255,255,0.55);
 border-radius: var(--r); box-shadow: var(--neu-in); padding: 0;
 overflow: hidden;
}
.tl-chart-wrap .tl-track {
 position: relative; height: 168px; overflow: hidden;
 touch-action: none; /* el pan/zoom lo maneja nuestro JS, no el navegador */
 cursor: grab; background: rgba(0,0,0,0.02);
}
.tl-chart-wrap .tl-track:active { cursor: grabbing; }

.tl-band {
 position: absolute; top: 18px; bottom: 34px;
 border-radius: 8px; border: 1px solid rgba(48,184,85,0.55);
 display: flex; align-items: center; justify-content: center;
 padding: 0 4px; overflow: hidden; transition: background .15s;
}
.tl-band-label {
 font-family: var(--f); font-size: 0.62rem; font-weight: 800; color: #0d5b26;
 white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
 text-shadow: 0 1px 0 rgba(255,255,255,0.35);
}

.tl-marker {
 position: absolute; bottom: 30px; width: 9px; height: 9px;
 transform: translateX(-50%);
 background: var(--blue); border-radius: 50%;
 box-shadow: 0 0 0 3px rgba(32,96,200,0.18);
}

.tl-today-line {
 position: absolute; top: 4px; bottom: 26px; width: 2px;
 background: repeating-linear-gradient(180deg, var(--red) 0 4px, transparent 4px 8px);
 transform: translateX(-50%);
}
.tl-today-line span {
 position: absolute; top: -2px; left: 50%; transform: translateX(-50%);
 font-family: var(--f); font-size: 0.56rem; font-weight: 800; color: var(--red);
 background: var(--bg-card); padding: 1px 5px; border-radius: 6px; white-space: nowrap;
}

.tl-axis {
 position: relative; height: 26px; border-top: 1px solid rgba(0,0,0,0.07);
}
.tl-tick {
 position: absolute; bottom: 6px; transform: translateX(-50%);
 font-family: var(--f); font-size: 0.62rem; color: var(--t4); white-space: nowrap;
}

/* ── Leyenda ── */
.tl-legend {
 display: flex; flex-wrap: wrap; gap: 14px; margin: 12px 2px 0;
 font-size: 0.68rem; color: var(--t3); font-family: var(--f);
}
.tl-legend span { display: inline-flex; align-items: center; gap: 5px; }
.tl-dot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; flex-shrink: 0; }
.tl-dot-band { background: rgba(48,184,85,0.55); border: 1px solid rgba(48,184,85,0.8); }
.tl-dot-marker { background: var(--blue); }
.tl-dot-hoy { background: var(--red); }

/* ── Controles de zoom ── */
.tl-chart-wrap .tl-controls { display: flex; gap: 8px; margin: 14px 2px 2px; justify-content: flex-end; }
.tl-zoom-btn {
 min-width: 38px; height: 34px; padding: 0 12px;
 background: var(--bg-card); border: 1px solid rgba(255,255,255,0.55);
 border-radius: 12px; box-shadow: var(--neu-out-sm);
 color: var(--t2); font-family: var(--f); font-size: 0.82rem; font-weight: 700;
 cursor: pointer; transition:transform .15s;
}
.tl-zoom-btn:hover { transform: translateY(-1px); }
.tl-zoom-btn:active { box-shadow: var(--neu-in); transform: translateY(0); }
