﻿/* wwwroot/css/darkmap.css */

/* Map Container */
.offline-map-container {
    position: relative;
    width: 100%;
    height: 100%;
    /*min-height: 400px;*/
    background-color: #0d0d1a;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}

.map-element {
    width: 100%;
    height: 100%;
    background-color: #1a1a2e;
}


.leaflet-top, .leaflet-bottom { 
    z-index: 100; 
}

/* Dark theme for Leaflet controls */
.leaflet-control-zoom {
    border: none !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4) !important;
}

    .leaflet-control-zoom a {
        background-color: #1a1a2e !important;
        color: #00d4ff !important;
        border: 1px solid #2d2d44 !important;
        width: 36px !important;
        height: 36px !important;
        line-height: 36px !important;
        font-size: 18px !important;
        transition: all 0.2s ease !important;
    }

        .leaflet-control-zoom a:hover {
            background-color: #2d2d44 !important;
            color: #00ffff !important;
        }

.leaflet-control-zoom-in {
    border-radius: 8px 8px 0 0 !important;
}

.leaflet-control-zoom-out {
    border-radius: 0 0 8px 8px !important;
}

/* Attribution */
.leaflet-control-attribution {
    background-color: rgba(26, 26, 46, 0.9) !important;
    color: #6c6c8a !important;
    font-size: 10px !important;
    padding: 4px 8px !important;
    border-radius: 4px 0 0 0 !important;
}

    .leaflet-control-attribution a {
        color: #00d4ff !important;
    }

/* Current Location Marker */
.current-location-marker {
    position: relative;
}

    .current-location-marker .pulse-ring {
        position: absolute;
        width: 40px;
        height: 40px;
        left: 50%;
        top: 50%;
        transform: translate(-50%, -50%);
        border: 3px solid #00d4ff;
        border-radius: 50%;
        animation: pulse 2s ease-out infinite;
    }

    .current-location-marker .location-dot {
        position: absolute;
        width: 16px;
        height: 16px;
        left: 50%;
        top: 50%;
        transform: translate(-50%, -50%);
        background: linear-gradient(135deg, #00d4ff, #0099cc);
        border: 3px solid #ffffff;
        border-radius: 50%;
        box-shadow: 0 2px 8px rgba(0, 212, 255, 0.6);
    }

@keyframes pulse {
    0% {
        transform: translate(-50%, -50%) scale(0.5);
        opacity: 1;
    }

    100% {
        transform: translate(-50%, -50%) scale(2);
        opacity: 0;
    }
}

/* Custom Markers */
.custom-marker {
    background: transparent !important;
    border: none !important;
}

/* Dark Popup */
.leaflet-popup-content-wrapper {
    background-color: #1a1a2e !important;
    color: #e0e0e0 !important;
    border-radius: 12px !important;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5) !important;
    border: 1px solid #2d2d44 !important;
}

.leaflet-popup-tip {
    background-color: #1a1a2e !important;
    border: 1px solid #2d2d44 !important;
}

.leaflet-popup-close-button {
    color: #6c6c8a !important;
    font-size: 20px !important;
    padding: 8px !important;
}

    .leaflet-popup-close-button:hover {
        color: #00d4ff !important;
    }

.dark-popup h4 {
    margin: 0 0 8px 0;
    color: #00d4ff;
    font-size: 14px;
    font-weight: 600;
}

.dark-popup p {
    margin: 0 0 8px 0;
    color: #b0b0c0;
    font-size: 12px;
    line-height: 1.4;
}

.dark-popup .coords {
    display: flex;
    gap: 12px;
    font-size: 10px;
    color: #6c6c8a;
    font-family: 'Consolas', monospace;
    padding-top: 8px;
    border-top: 1px solid #2d2d44;
}

/* Dark Tooltip */
.dark-tooltip {
    background-color: #1a1a2e !important;
    color: #e0e0e0 !important;
    border: 1px solid #2d2d44 !important;
    border-radius: 6px !important;
    padding: 6px 10px !important;
    font-size: 12px !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4) !important;
}

    .dark-tooltip::before {
        border-top-color: #1a1a2e !important;
    }

/* Loading Overlay */
.map-loading-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(13, 13, 26, 0.9);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.map-spinner {
    width: 48px;
    height: 48px;
    border: 4px solid #2d2d44;
    border-top: 4px solid #00d4ff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

.map-loading-text {
    margin-top: 16px;
    color: #6c6c8a;
    font-size: 14px;
}

/* Map Controls Panel */
.map-controls-panel {
    position: absolute;
    top: 12px;
    right: 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    z-index: 100;
}

.map-control-btn {
    width: 40px;
    height: 40px;
    background-color: #1a1a2e;
    border: 1px solid #2d2d44;
    border-radius: 8px;
    color: #00d4ff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

    .map-control-btn:hover {
        background-color: #2d2d44;
        transform: translateY(-2px);
        box-shadow: 0 6px 16px rgba(0, 0, 0, 0.4);
    }

    .map-control-btn:active {
        transform: translateY(0);
    }

    .map-control-btn svg {
        width: 20px;
        height: 20px;
        fill: currentColor;
    }

/* Info Panel */
.map-info-panel {
    position: absolute;
    bottom: 12px;
    left: 12px;
    background-color: rgba(26, 26, 46, 0.95);
    border: 1px solid #2d2d44;
    border-radius: 10px;
    padding: 12px 16px;
    z-index: 1000;
    min-width: 200px;
    backdrop-filter: blur(10px);
}

    .map-info-panel h5 {
        margin: 0 0 8px 0;
        color: #00d4ff;
        font-size: 12px;
        text-transform: uppercase;
        letter-spacing: 1px;
    }

.map-info-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 4px 0;
    font-size: 12px;
}

.map-info-label {
    color: #6c6c8a;
}

.map-info-value {
    color: #e0e0e0;
    font-family: 'Consolas', monospace;
}

/* Error State */
.map-error {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    color: #ff6b6b;
    z-index: 1000;
}

.map-error-icon {
    font-size: 48px;
    margin-bottom: 16px;
}

.map-error-text {
    font-size: 14px;
    color: #b0b0c0;
}
