/* hayitv.com — estilos del mapa de estaciones (portada + páginas de estación).
   Custom SVG markers: a semáforo-coloured capsule with the first-free date and
   a name caption that appears only when zoomed in (.hay-map-labeled, toggled
   by hayitv-map.js) — at overview zoom 27 names would be unreadable. The
   current station (.hay-mk--here) is always named and highlighted. */

#stationMap {
    height: 300px;
}

#indexMap {
    height: 460px;
}

#stationMap,
#indexMap {
    margin: .8rem 0 1.4rem;
    border: 1px solid var(--linea);
    border-radius: 6px;
}

/* No position here — MapLibre's .maplibregl-marker sets position:absolute to
   anchor the marker to its coordinates; overriding it makes markers drift on
   pan/zoom. That absolute box also positions the .hay-mk__name caption. */
.hay-mk {
    display: block;
    text-decoration: none;
    cursor: pointer;
}

.hay-mk--here {
    cursor: default;
    z-index: 5;
}

.hay-mk__badge {
    display: block;
}

.hay-mk__svg {
    display: block;
    filter: drop-shadow(0 1px 3px rgba(0, 0, 0, .35));
}

/* White glow so the current station separates from basemap labels. */
.hay-mk--here .hay-mk__svg {
    filter: drop-shadow(0 0 1.5px var(--papel)) drop-shadow(0 2px 6px rgba(0, 0, 0, .4));
}

.hay-mk:hover .hay-mk__svg {
    filter: drop-shadow(0 2px 5px rgba(0, 0, 0, .45));
}

.hay-mk__name {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    margin-top: 3px;
    padding: 0 4px;
    border-radius: 4px;
    background: var(--papel);
    color: var(--gris);
    font-size: 9px;
    font-weight: 600;
    line-height: 1.6;
    white-space: nowrap;
    box-shadow: 0 1px 3px rgba(0, 0, 0, .18);
    opacity: .92;
    pointer-events: none;
    display: none;
}

/* Names reveal once zoomed past the threshold; the current station is always
   named. */
.hay-map-labeled .hay-mk__name,
.hay-mk--here .hay-mk__name {
    display: block;
}

.hay-mk--here .hay-mk__name {
    color: var(--tinta);
    font-size: 11px;
    font-weight: 700;
    opacity: 1;
    z-index: 6;
}

.map-fallback {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    text-align: center;
    color: var(--gris);
    background: var(--fondo);
}
