/* MapLibre marker styling — needs to be in a CSS file Tailwind preserves verbatim,
   because markers are created via JS interop and Tailwind would purge JIT classes. */

/* OBS: undgå position: relative — det overskriver MapLibre's egen
   position: absolute fra .maplibregl-marker og bryder marker-positionering.
   Den pulserende ::before bruger .maplibregl-marker som positioneringskontekst. */
.trygspor-marker {
    --marker-color: #0F4C81;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.trygspor-marker-inner {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background-color: var(--marker-color);
    border: 3px solid white;
    box-shadow: 0 2px 6px rgba(15, 23, 42, 0.25), 0 0 0 1px rgba(15, 23, 42, 0.06);
    transition: transform 0.15s ease;
}

.trygspor-marker:hover .trygspor-marker-inner {
    transform: scale(1.18);
}

.trygspor-marker-alarm::before {
    content: "";
    position: absolute;
    inset: -4px;
    border-radius: 50%;
    background-color: var(--marker-color);
    opacity: 0.4;
    animation: trygspor-pulse 1.4s cubic-bezier(0, 0, 0.2, 1) infinite;
}

@keyframes trygspor-pulse {
    0% { transform: scale(0.7); opacity: 0.6; }
    100% { transform: scale(2.2); opacity: 0; }
}

/* Mistet signal: positionen er SIDST KENDTE, ikke live — markøren fremstår mat
   og med stiplet kant, så den visuelt signalerer "usikker/gammel data". */
.trygspor-marker-stale .trygspor-marker-inner {
    opacity: 0.55;
    border-style: dashed;
    border-color: rgba(255, 255, 255, 0.9);
}

.trygspor-popup .maplibregl-popup-content {
    padding: 8px 12px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(15, 23, 42, 0.06), 0 12px 28px rgba(15, 23, 42, 0.12);
    font-family: "Inter", system-ui, sans-serif;
}

.trygspor-popup .maplibregl-popup-tip {
    border-top-color: white;
}

.trygspor-popup-label {
    font-size: 12px;
    font-weight: 600;
    color: #0F172A;
    white-space: nowrap;
}

.maplibregl-ctrl-attrib {
    font-size: 10px !important;
    background-color: rgba(255, 255, 255, 0.7) !important;
    backdrop-filter: blur(4px);
}
