/**
 * Freightliner Carbon Calculator UK Map Styles
 * 
 * Styles for custom UK outline map with GSAP animations
 */

/* UK Map Container */
.fcc-uk-map-container { width: 100%; height: 100%; font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif; padding: 0; margin: 0; }

.fcc-uk-map-header {
    text-align: center;
    margin-bottom: 20px;
}

.fcc-uk-map-header h3 {
    color: #0066cc;
    margin: 0 0 10px 0;
    font-size: 24px;
    font-weight: 600;
    font-family: 'helveticaneuebold', Arial, Helvetica, sans-serif;
}

.fcc-uk-map-description {
    color: #666;
    margin: 0;
    font-size: 16px;
    line-height: 1.5;
    font-family: 'helveticaneuemedium', Arial, Helvetica, sans-serif;
}

.fcc-uk-map { position: relative; width: 100%; height: auto; background: transparent; border-radius: 0; overflow: visible; }

/* Caption in top-right over the map */
.fcc-uk-map-container .fcc-uk-map-caption {
    position: absolute;
    top: 10px;
    right: 14px;
    background: rgba(17, 24, 39, 0.85);
    color: #fff;
    padding: 6px 10px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    pointer-events: none;
}

.fcc-uk-map-wrapper { position: relative; width: 100%; height: auto; }

.fcc-uk-map-svg { width: 100%; height: auto; display: block; overflow: visible; }

/* Map Legend */
.fcc-uk-map-legend { padding: 16px 0 0; background: transparent; }

.fcc-uk-legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: #333;
}

.fcc-uk-legend-icon {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    border: 2px solid white;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.fcc-uk-origin {
    background: #28a745;
}

.fcc-uk-destination {
    background: #dc3545;
}

.fcc-uk-terminal {
    background: #0066cc;
}

.fcc-uk-rail {
    background: #0066cc;
    width: 20px;
    height: 4px;
    border-radius: 2px;
}

.fcc-uk-road {
    background: #6c757d;
    width: 20px;
    height: 4px;
    border-radius: 2px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .fcc-uk-map-container {
        margin: 10px;
    }
    
    .fcc-uk-map-header h3 {
        font-size: 20px;
    }
    
    .fcc-uk-map-description {
        font-size: 14px;
    }
    
    .fcc-uk-map-legend {
        flex-direction: column;
        align-items: center;
        gap: 10px;
    }
}

/* Enhanced Animation Styles */
.fcc-journey-start-marker,
.fcc-journey-end-marker {
    pointer-events: none;
}

.fcc-pulse-bg {
    animation: fcc-pulse 2s infinite;
}

@keyframes fcc-pulse {
    0% {
        transform: scale(1);
        opacity: 0.3;
    }
    50% {
        transform: scale(1.2);
        opacity: 0.1;
    }
    100% {
        transform: scale(1);
        opacity: 0.3;
    }
}

.fcc-animated-train {
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}

.fcc-route-path {
    filter: drop-shadow(0 0 6px rgba(254, 141, 0, 0.4));
}

.fcc-terminal-marker {
    cursor: pointer;
    transition: transform 0.2s ease;
}

.fcc-terminal-marker:hover {
    transform: scale(1.1);
}

.fcc-terminal-label {
    font-family: 'helveticaneuebold', Arial, Helvetica, sans-serif;
    font-size: 12px;
    font-weight: 600;
    text-shadow: 1px 1px 2px rgba(255, 255, 255, 0.8);
    pointer-events: none;
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
    .fcc-uk-map-svg *,
    .fcc-pulse-bg,
    .fcc-animated-train {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .fcc-terminal-marker:hover {
        transform: none;
    }
}

@media (prefers-contrast: high) {
    .fcc-uk-map {
        border: 2px solid #000;
    }

    .fcc-uk-legend-icon {
        border-width: 3px;
    }

    .fcc-terminal-label {
        text-shadow: 2px 2px 4px rgba(255, 255, 255, 1);
    }
}

/* Override pin-dot circle colors to FL orange */
circle[id*="pin-dot"] {
    fill: #fe8d00 !important;
} 