/**
 * Kiruna Bus Map - CSS Styles
 * All styling for the interactive map, markers, popups, and animations
 */

/* Container */
.kiruna-bus-map-container {
    width: 100%;
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.kiruna-bus-map-inner {
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
}

/* Default höjd */
.kiruna-bus-map-container {
    height: 800px;
}

/* Tablet */
@media (max-width: 768px) {
    .kiruna-bus-map-container {
        height: 700px !important;
    }
}

/* Mobil */
@media (max-width: 480px) {
    .kiruna-bus-map-container {
        height: 600px !important;
    }
}


/* Loading spinner */
.kiruna-bus-loading {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.9);
    z-index: 1000;
    backdrop-filter: blur(4px);
}

.kiruna-bus-spinner {
    width: 48px;
    height: 48px;
    border: 4px solid #e5e7eb;
    border-top-color: #8B5CF6;
    border-radius: 50%;
    animation: kiruna-spin 0.8s linear infinite;
    margin-bottom: 16px;
}

@keyframes kiruna-spin {
    to { transform: rotate(360deg); }
}

.kiruna-bus-loading p {
    color: #6b7280;
    font-size: 14px;
    font-weight: 500;
    margin: 0;
}

/* Bus markers - highest z-index */
.bus-marker {
    z-index: 100 !important;
    pointer-events: none;
    filter: drop-shadow(0 4px 12px rgba(105, 36, 180, 0.4));
}

/* Base landmark marker styling */
.landmark-marker {
    cursor: pointer;
    z-index: 5;
}

.landmark-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
}


/* Icons */
.bus-stop-icon {
    width: 32px;
    height: 32px;
    filter: drop-shadow(0 3px 6px rgba(105, 36, 180, 0.4));
}

.landmark-icon {
    width: 28px;
    height: 28px;
    filter: drop-shadow(0 2px 4px rgba(105, 36, 180, 0.3));
}

.arena-icon {
    filter: drop-shadow(0 3px 6px rgba(105, 36, 180, 0.4));
}

/* Labels */
.landmark-label {
    background: rgba(255, 255, 255, 0.95);
    padding: 3px 6px;
    border-radius: 3px;
    font-size: 9px;
    font-weight: 600;
    color: #333;
    white-space: nowrap;
    margin-top: 3px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.bus-stop-label {
    font-size: 10px;
    font-weight: 700;
    background: rgba(255, 255, 255, 0.95);
    padding: 4px 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

/* Hover effects */
.landmark-marker:hover .landmark-icon,
.landmark-marker:hover .arena-icon,
.landmark-marker:hover .bus-stop-icon {
    transform: scale(1.2);
}

.landmark-marker:hover .landmark-label {
    font-size: 10px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}

/* Mapbox Popup Styling */
.mapboxgl-popup {
    z-index: 1000 !important;
}

.mapboxgl-popup-content {
    padding: 16px !important;
    border-radius: 12px !important;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15), 0 4px 10px rgba(0, 0, 0, 0.1) !important;
    border: 1px solid #E2E8F0 !important;
    background: #FFFFFF !important;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', sans-serif !important;
}

.mapboxgl-popup-close-button {
    width: 28px !important;
    height: 28px !important;
    font-size: 20px !important;
    color: #718096 !important;
    padding: 0 !important;
    border-radius: 6px !important;
    transition: all 0.2s ease !important;
    background: transparent !important;
    right: 8px !important;
    top: 8px !important;
    line-height: 28px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

.mapboxgl-popup-close-button:hover {
    background: #F7FAFC !important;
    color: #2D3748 !important;
    transform: scale(1.1) !important;
}

.mapboxgl-popup-tip {
    border-top-color: #FFFFFF !important;
    border-bottom-color: #FFFFFF !important;
}

/* Smooth fade-in animation */
.mapboxgl-popup {
    animation: popupFadeIn 0.3s ease-out;
}

@keyframes popupFadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .landmark-label {
        font-size: 8px;
        padding: 2px 4px;
    }
    
    .bus-stop-label {
        font-size: 9px;
        padding: 3px 6px;
    }
    
    .arena-icon,
    .bus-stop-icon,
    .landmark-icon {
        transform: scale(0.9);
    }
}

@media (max-width: 480px) {
    .landmark-label {
        display: none;
    }
    
    .bus-stop-label {
        font-size: 8px;
        padding: 2px 5px;
    }
}
