/* Interactive Leaflet Map Layout */
.map-layout {
    display: flex;
    gap: 20px;
    height: calc(100vh - 150px);
    min-height: 550px;
}

.map-sidebar {
    width: 320px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    flex-shrink: 0;
}

.map-sidebar-header {
    padding: 16px;
    border-bottom: 1px solid var(--border-color);
}

.map-sidebar-header h3 {
    font-size: 14px;
    font-weight: 700;
    color: var(--primary);
    display: flex;
    align-items: center;
    gap: 8px;
}

.map-sidebar-header p {
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 4px;
}

.map-region-filter {
    padding: 12px 16px;
    border-bottom: 1px solid var(--border-color);
    background: rgba(15, 23, 42, 0.4);
}

.map-location-list {
    padding: 12px;
    overflow-y: auto;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.map-project-card {
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 12px;
    cursor: pointer;
    transition: var(--transition-fast);
}

.map-project-card:hover {
    border-color: var(--primary);
    background: rgba(56, 189, 248, 0.08);
}

.map-project-card.active {
    border-color: var(--primary);
    box-shadow: 0 0 10px var(--primary-glow);
}

.map-project-card .card-title {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-main);
    margin-bottom: 4px;
}

.map-project-card .card-loc {
    font-size: 11px;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 4px;
}

.map-container-wrapper {
    flex-grow: 1;
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 1px solid var(--border-color);
    position: relative;
}

#leaflet-map {
    width: 100%;
    height: 100%;
    z-index: 1;
}

.map-overlay-info {
    position: absolute;
    bottom: 20px;
    left: 20px;
    z-index: 10;
    background: rgba(9, 13, 22, 0.85);
    backdrop-filter: blur(8px);
    padding: 10px 16px;
    border-radius: 30px;
    border: 1px solid var(--border-highlight);
    font-size: 12px;
    color: var(--primary);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
    pointer-events: none;
}

/* Custom Marker Styling */
.custom-map-marker {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    color: #fff;
    font-size: 14px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
    border: 2px solid #fff;
}

.custom-map-marker.category-공사 { background: var(--primary); }
.custom-map-marker.category-용역 { background: var(--purple); }
.custom-map-marker.category-물품 { background: var(--emerald); }

/* Leaflet Popup customization */
.leaflet-popup-content-wrapper {
    background: #0f172a !important;
    color: #f8fafc !important;
    border: 1px solid var(--border-highlight);
    border-radius: var(--radius-md) !important;
    padding: 4px;
}

.leaflet-popup-tip {
    background: #0f172a !important;
}

.map-popup-card {
    padding: 6px;
}

.map-popup-card h4 {
    font-size: 13px;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 4px;
}

.map-popup-card p {
    font-size: 11px;
    color: var(--text-muted);
    margin: 2px 0;
}
