/*
 * route-line.css
 *
 * The two road lines and the pin that go on a Leaflet map when a page compares
 * one station with a cheaper alternative: a solid line for the drive to the
 * station being looked at, a dotted one for the drive to the better deal.
 *
 * Shared by station.php and map.php. It lived inline in station.php until the
 * map needed the same picture; the class names kept their `station-route-`
 * prefix so neither page's JS had to be rewritten around a rename.
 *
 * The panel that explains the recommendation in words is not here — that is
 * page furniture, and the two pages present it very differently.
 */

.station-route-recommendation-marker {
    width: 220px !important;
    height: 70px !important;
    border: 0 !important;
    background: transparent !important;
    pointer-events: none;
}

.station-route-recommendation-pin {
    position: absolute;
    bottom: 9px;
    left: 9px;
    width: 19px;
    height: 19px;
    border: 3px solid #fff;
    border-radius: 50% 50% 50% 0;
    background: var(--color-primary);
    box-shadow: 0 2px 7px rgba(73, 35, 13, 0.35);
    transform: rotate(-45deg);
}

.station-route-recommendation-pin::after {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: #fff;
    content: '';
    transform: translate(-50%, -50%);
}

.station-route-recommendation-pin::before {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 36px;
    height: 36px;
    border: 2px solid rgba(243, 134, 81, 0.72);
    border-radius: 50%;
    content: '';
    transform: translate(-50%, -50%) rotate(45deg);
    animation: station-route-recommendation-pulse 1.8s ease-out infinite;
}

.station-route-recommendation-label {
    position: absolute;
    bottom: 0;
    left: 33px;
    max-width: 181px;
    padding: 0.45rem 0.6rem;
    border: 1px solid rgba(243, 134, 81, 0.48);
    border-radius: 9px;
    background: #fffdfb;
    color: #3a1c0e;
    box-shadow: 0 4px 12px rgba(73, 35, 13, 0.18);
    font-size: 0.76rem;
    font-weight: 700;
    line-height: 1.25;
    white-space: normal;
}

.station-route-recommendation-line {
    animation: station-route-recommendation-line-pulse 1.6s ease-in-out infinite;
}

@keyframes station-route-recommendation-pulse {
    0% { opacity: 0.8; transform: translate(-50%, -50%) rotate(45deg) scale(0.7); }
    70%, 100% { opacity: 0; transform: translate(-50%, -50%) rotate(45deg) scale(1.7); }
}

@keyframes station-route-recommendation-line-pulse {
    0%, 100% { opacity: 0.7; stroke-width: 4px; }
    50% { opacity: 1; stroke-width: 5px; }
}

@media (prefers-reduced-motion: reduce) {
    .station-route-recommendation-pin::before,
    .station-route-recommendation-line {
        animation: none;
    }
}
