/* Línea de tiempo de Hazte un Hit (assets/js/hit-linea-tiempo.js): el control que decide qué periodo ve el mapa. */

body.hm .hm-linea { margin: 0 0 14px; }
body.hm .hm-linea:empty { display: none; }

.hm-lt-barra {
    display: flex; align-items: center; gap: 10px; padding: 10px 12px;
    border-radius: 18px; background: rgba(20, 12, 40, 0.78); border: 1px solid #4a3a7a;
    -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
}
/* El título del cuadro («Línea de tiempo»). */
.hm-lt-titulo {
    flex: 0 0 auto; display: inline-flex; align-items: center; min-height: 48px; padding: 0 16px; border-radius: 14px;
    border: 1px solid var(--hm-oro, #c9a24b); background: rgba(217, 180, 90, 0.12); color: #f3e3b0; font-weight: 700; font-size: 0.9rem;
}

/* La pista: una columna por año; se desliza hacia los lados cuando hay muchos años (desde 1960 o antes). */
.hm-lt-pista {
    position: relative; flex: 1 1 auto; min-width: 0; overflow-x: auto; overflow-y: hidden;
    scrollbar-width: thin; scrollbar-color: #5b4690 transparent; overscroll-behavior-x: contain;
}
.hm-lt-pista:focus-visible { outline: 2px solid var(--hm-oro, #c9a24b); outline-offset: 2px; border-radius: 8px; }
.hm-lt-cols { position: relative; display: flex; align-items: flex-end; width: max-content; min-width: 100%; height: 66px; padding: 0 8px 2px; box-sizing: border-box; }
.hm-lt-cols::before { content: ""; position: absolute; left: 0; right: 0; bottom: 21px; height: 2px; background: rgba(255, 255, 255, 0.14); border-radius: 2px; }
.hm-lt-an {
    position: relative; flex: 1 0 22px; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 2px;
    height: 100%; padding: 0; border: 0; background: transparent; color: #a99fc7; font: inherit; font-size: 0.62rem; cursor: pointer;
}
.hm-lt-an s { text-decoration: none; color: #f3c64a; font-size: 0.72rem; line-height: 1; min-height: 11px; white-space: nowrap; }
.hm-lt-an i { display: block; width: 58%; max-width: 16px; min-height: 2px; border-radius: 4px 4px 2px 2px; background: rgba(201, 162, 255, 0.4); }
.hm-lt-an b { min-height: 13px; font-weight: 600; white-space: nowrap; }
.hm-lt-an.pasado i { background: rgba(217, 180, 90, 0.5); }
.hm-lt-an.on i { background: #d9b45a; }
.hm-lt-an.on s { margin-bottom: 9px; }
.hm-lt-an.on b { color: #f3e3b0; font-weight: 800; }
.hm-lt-an.on::after { content: ""; position: absolute; bottom: 14px; width: 12px; height: 12px; border-radius: 50%; background: #d9b45a; border: 3px solid #1a1230; box-shadow: 0 0 0 2px #d9b45a; pointer-events: none; }
@media (hover: hover) and (pointer: fine) { .hm-lt-an:hover b { color: #f3e3b0; } .hm-lt-an:hover i { background: rgba(217, 180, 90, 0.7); } }
.hm-lt-an:focus-visible { outline: 2px solid var(--hm-oro, #c9a24b); outline-offset: -2px; border-radius: 6px; }

.hm-lt-leyenda { display: flex; flex-wrap: wrap; gap: 4px 16px; margin: 8px 4px 0; font-size: 0.78rem; color: #bdb2dc; }
.hm-lt-leyenda s { text-decoration: none; color: #f3c64a; }
.hm-lt-leyenda i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; background: rgba(201, 162, 255, 0.55); vertical-align: -1px; }
.hm-lt-ayuda { margin: 4px 4px 0; font-size: 0.78rem; color: var(--texto-tenue, #a8a8a8); }


@media (max-width: 560px) {
    .hm-lt-barra { flex-wrap: wrap; }
    .hm-lt-titulo { flex: 1 1 100%; justify-content: center; }
    .hm-lt-pista { flex: 1 0 100%; order: 3; }
    .hm-lt-an { flex-basis: 26px; }
}

/* El calendario: la formación de una agrupación se marca con ✦ (igual que en la línea de tiempo y en el mapa). */
body.hm .punto-hit-agrupacion { width: auto; height: auto; border-radius: 0; background: none; display: inline-block; line-height: 1; font-size: 0.8rem; color: #f3c64a; }
body.hm .punto-hit-agrupacion::before { content: "✦"; }


/* Mapa */
body.hm .hmc-vacio { margin: 8px 0; padding: 18px; text-align: center; color: var(--texto-tenue, #a8a8a8); border: 1px dashed rgba(255, 255, 255, 0.18); border-radius: 14px; }

/* El filtro de fecha: botón desplegable con un panel de Año, Mes y Día. */
.hm-lt-desp { margin: 12px 0 0; }
.hm-lt-desp-fila { display: flex; align-items: center; gap: 8px; }
.hm-lt-desp-boton {
    display: inline-flex; align-items: center; gap: 10px; min-height: 44px; padding: 0 16px; cursor: pointer; max-width: 100%;
    color: #e9dcb0; background: rgba(20, 12, 40, 0.78); border: 1px solid #4a3a7a; border-radius: 999px; font: inherit; font-size: 0.92rem;
    transition: border-color 0.2s, background 0.2s;
}
.hm-lt-desp-boton.con-filtro, .hm-lt-desp.abierto .hm-lt-desp-boton { border-color: var(--hm-oro, #c9a24b); }
.hm-lt-desp-boton.con-filtro { background: rgba(217, 180, 90, 0.14); color: #f3e3b0; font-weight: 600; }
.hm-lt-desp-texto { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hm-lt-ico { width: 18px; height: 18px; flex: none; }
.hm-lt-flecha { width: 14px; height: 14px; flex: none; transition: transform 0.2s; }
.hm-lt-desp.abierto .hm-lt-flecha { transform: rotate(180deg); }
.hm-lt-x {
    display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; padding: 0; border-radius: 50%; cursor: pointer;
    color: #cfc3ee; background: transparent; border: 1px solid #4a3a7a;
}
.hm-lt-x[hidden] { display: none; }
.hm-lt-x svg { width: 16px; height: 16px; }
.hm-lt-desp-boton:focus-visible, .hm-lt-x:focus-visible, .hm-lt-quitar:focus-visible, .hm-lt-campo select:focus-visible { outline: 2px solid var(--hm-oro, #c9a24b); outline-offset: 2px; }
.hm-lt-panel {
    margin: 10px 0 0; padding: 14px 16px 12px; max-width: 520px; border-radius: 20px;
    background: rgba(20, 12, 40, 0.9); border: 1px solid #4a3a7a; -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
}
.hm-lt-panel[hidden] { display: none; }
.hm-lt-campos { display: grid; grid-template-columns: 1.1fr 1.4fr 1fr; gap: 14px; }
.hm-lt-campo { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.hm-lt-campo label { font-size: 0.66rem; font-weight: 800; letter-spacing: 0.18em; text-transform: uppercase; color: var(--hm-oro, #c9a24b); }
.hm-lt-campo select {
    width: 100%; min-height: 40px; padding: 0 22px 0 0; border: 0; border-bottom: 1px solid #4a3a7a; border-radius: 0; background-color: transparent;
    color: var(--texto, #f2f2f2); font: inherit; font-size: 0.95rem; cursor: pointer; appearance: none; -webkit-appearance: none;
    background-image: linear-gradient(45deg, transparent 50%, #c9a24b 50%), linear-gradient(135deg, #c9a24b 50%, transparent 50%);
    background-position: calc(100% - 9px) 50%, calc(100% - 4px) 50%; background-size: 5px 5px, 5px 5px; background-repeat: no-repeat;
}
.hm-lt-campo select option { background: #150d2b; color: #f2f2f2; }
.hm-lt-campo select:disabled { opacity: 0.4; cursor: default; }
.hm-lt-campo select:not(:disabled):hover { border-bottom-color: var(--hm-oro, #c9a24b); }
.hm-lt-quitar {
    margin: 10px 0 0; padding: 6px 0; border: 0; background: none; color: #cfc3ee; font: inherit; font-size: 0.85rem; text-decoration: underline; text-underline-offset: 3px; cursor: pointer;
}
.hm-lt-quitar[hidden] { display: none; }
@media (max-width: 560px) { .hm-lt-campos { grid-template-columns: 1fr 1fr; } .hm-lt-campo:first-child { grid-column: 1 / -1; } .hm-lt-panel { max-width: none; } }
