/* ============================================
   UNIFIED MAP STYLES - SceneLink
   Consistent Leaflet/OpenStreetMap across all pages
   ============================================ */

/* Map Container */
.sl-map-wrapper {
    position: relative;
    width: 100%;
    border-radius: 16px;
    overflow: hidden;
    background: #1a1a2e;
    border: 1px solid rgba(212, 175, 55, 0.15);
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.3);
}

.sl-map-container {
    width: 100%;
    height: 400px;
    z-index: 1;
}

.sl-map-container.sl-map-sm { height: 280px; }
.sl-map-container.sl-map-md { height: 400px; }
.sl-map-container.sl-map-lg { height: 500px; }

/* Dark map tiles override */
.sl-map-wrapper .leaflet-container {
    background: #1a1a2e;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

.sl-map-wrapper .leaflet-tile-pane {
    filter: brightness(0.7) contrast(1.1) saturate(0.8);
}

/* Custom Controls */
.sl-map-controls {
    position: absolute;
    top: 12px;
    right: 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    z-index: 1000;
}

.sl-map-ctrl-btn {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    border: 1px solid rgba(212, 175, 55, 0.2);
    background: rgba(20, 20, 40, 0.9);
    backdrop-filter: blur(10px);
    color: #D4AF37;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.25s ease;
}

.sl-map-ctrl-btn:hover {
    background: rgba(212, 175, 55, 0.15);
    border-color: rgba(212, 175, 55, 0.4);
    transform: scale(1.05);
}

.sl-map-ctrl-btn svg {
    width: 16px;
    height: 16px;
}

/* Map Legend */
.sl-map-legend {
    position: absolute;
    bottom: 12px;
    left: 12px;
    display: flex;
    gap: 12px;
    padding: 8px 14px;
    background: rgba(20, 20, 40, 0.9);
    backdrop-filter: blur(10px);
    border-radius: 10px;
    border: 1px solid rgba(212, 175, 55, 0.15);
    z-index: 1000;
}

.sl-legend-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.72rem;
    color: rgba(255, 255, 255, 0.7);
    cursor: pointer;
    transition: all 0.2s ease;
}

.sl-legend-item:hover {
    color: #fff;
}

.sl-legend-item.dimmed {
    opacity: 0.35;
}

.sl-legend-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
    border: 1.5px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 0 4px rgba(0, 0, 0, 0.3);
}

.sl-legend-dot.restaurants { background: #FF6B6B; }
.sl-legend-dot.bars { background: #D4AF37; }
.sl-legend-dot.events { background: #6C5CE7; }
.sl-legend-dot.nightlife { background: #00BFFF; }
.sl-legend-dot.live { background: #22c55e; box-shadow: 0 0 6px rgba(34, 197, 94, 0.6); }
.sl-legend-dot.upcoming { background: #6C5CE7; }
.sl-legend-dot.tonight { background: #D4AF37; }
.sl-legend-dot.nightclub { background: #E040FB; }
.sl-legend-dot.bar { background: #D4AF37; }
.sl-legend-dot.lounge { background: #00BCD4; }

/* Custom Marker Styles */
.sl-marker {
    width: 38px;
    height: 38px;
    border-radius: 50% 50% 50% 0;
    transform: rotate(-45deg);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.5), 0 0 0 3px rgba(255, 255, 255, 0.25);
    border: 2.5px solid rgba(255, 255, 255, 0.5);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    cursor: pointer;
}

.sl-marker:hover {
    transform: rotate(-45deg) scale(1.15);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.6), 0 0 0 4px rgba(255, 255, 255, 0.35);
}

.sl-marker.restaurant { background: #FF6B6B; }
.sl-marker.bar { background: #D4AF37; }
.sl-marker.event { background: #6C5CE7; }
.sl-marker.nightclub { background: #E040FB; }
.sl-marker.lounge { background: #00BCD4; }
.sl-marker.live { background: #22c55e; box-shadow: 0 3px 12px rgba(0, 0, 0, 0.5), 0 0 8px rgba(34, 197, 94, 0.5), 0 0 0 3px rgba(255, 255, 255, 0.25); }

.sl-marker-icon {
    transform: rotate(45deg);
    font-size: 17px;
    color: white;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
    line-height: 1;
}

/* Marker Popup */
.sl-map-wrapper .leaflet-popup-content-wrapper {
    background: rgba(20, 20, 40, 0.95);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(212, 175, 55, 0.2);
    border-radius: 12px;
    color: #fff;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    padding: 0;
    overflow: hidden;
}

.sl-map-wrapper .leaflet-popup-content {
    margin: 0;
    min-width: 200px;
}

.sl-map-wrapper .leaflet-popup-tip {
    background: rgba(20, 20, 40, 0.95);
    border: 1px solid rgba(212, 175, 55, 0.2);
}

.sl-popup {
    padding: 14px;
}

.sl-popup-title {
    font-size: 0.95rem;
    font-weight: 600;
    color: #D4AF37;
    margin-bottom: 4px;
}

.sl-popup-meta {
    font-size: 0.78rem;
    color: rgba(255, 255, 255, 0.6);
    margin-bottom: 8px;
}

.sl-popup-btn {
    display: inline-block;
    padding: 5px 14px;
    background: linear-gradient(135deg, #D4AF37, #F4D03F);
    color: #1a1a2e;
    border: none;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.sl-popup-btn:hover {
    transform: scale(1.03);
}

/* Loading state */
.sl-map-loading {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: rgba(20, 20, 40, 0.9);
    z-index: 1001;
    transition: opacity 0.4s ease;
}

.sl-map-loading.hidden {
    opacity: 0;
    pointer-events: none;
}

.sl-map-spinner {
    width: 36px;
    height: 36px;
    border: 3px solid rgba(212, 175, 55, 0.2);
    border-top-color: #D4AF37;
    border-radius: 50%;
    animation: slSpin 0.8s linear infinite;
}

.sl-map-loading p {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.82rem;
    margin-top: 10px;
}

@keyframes slSpin {
    to { transform: rotate(360deg); }
}

/* Zoom controls hidden - we use custom */
.sl-map-wrapper .leaflet-control-zoom { display: none; }

/* Responsive */
@media (max-width: 768px) {
    .sl-map-container { height: 280px; }
    .sl-map-container.sl-map-lg { height: 350px; }
    .sl-map-legend { 
        flex-wrap: wrap;
        gap: 8px;
        padding: 6px 10px;
    }
    .sl-legend-item { font-size: 0.68rem; }
}