/* GIS 지도 관리 시안 v4 - 가로 탭 버튼 + 좌측 슬라이드 콘텐츠 패널 */

.map5-container {
    background-color: #0f172a;
    font-family: 'Inter', 'Noto Sans KR', sans-serif;
    color: rgb(226 232 240);
    min-height: 100vh;
    letter-spacing: -0.025em;
    overflow: hidden;
}

.map5-wrapper {
    display: flex;
    flex-direction: column;
    height: 100vh;
}

.map5-main {
    flex: 1;
    display: flex;
    flex-direction: row;
    overflow: hidden;
}

.map5-content {
    flex: 1;
    display: flex;
    flex-direction: row;
    position: relative;
    overflow: hidden;
}

/* ══════════════════════════════════════
   가로 탭 바 (좌측 상단, 버튼 3개 가로 나열)
   ══════════════════════════════════════ */
.map5-tab-bar {
    position: absolute;
    left: 0;
    top: 0;
    margin: 1rem 0 0 1rem;
    background: transparent;
    border: none;
    z-index: 42;
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 0.375rem;
}

.map5-tab-item {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 0.375rem;
    padding: 0.5rem 0.875rem;
    cursor: pointer;
    transition: all 150ms;
    position: relative;
    background: rgba(15, 23, 42, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 0.5rem;
    backdrop-filter: blur(24px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}

.map5-tab-item:hover {
    background: rgba(30, 41, 59, 1);
    border-color: rgba(255, 255, 255, 0.2);
}

.map5-tab-active {
    background: rgba(30, 41, 59, 0.98);
    border-color: rgba(59, 130, 246, 0.5);
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.2);
}

.map5-tab-icon {
    font-size: 1.125rem;
    color: rgb(148 163 184);
    transition: color 150ms;
}

.map5-tab-active .map5-tab-icon {
    color: #60a5fa;
}

.map5-tab-text {
    writing-mode: horizontal-tb;
    text-orientation: mixed;
    font-size: 0.8125rem;
    font-weight: 600;
    letter-spacing: normal;
    color: rgb(148 163 184);
    line-height: 1;
    transition: color 150ms;
    white-space: nowrap;
}

.map5-tab-active .map5-tab-text {
    color: #60a5fa;
}

/* ══════════════════════════════════════
   슬라이드 콘텐츠 패널 (탭 바 아래, 왼쪽에서 슬라이드)
   ══════════════════════════════════════ */
.map5-slide-panel {
    position: absolute;
    left: 1rem;
    top: calc(1rem + 40px + 0.5rem);
    width: 280px;
    height: calc(100vh - 7rem - 40px - 2rem);
    background: rgba(30, 41, 59, 0.92);
    backdrop-filter: blur(24px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 0.75rem;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.5), 0 10px 10px -5px rgba(0, 0, 0, 0.3);
    z-index: 41;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transform: translateX(0);
    opacity: 1;
    transition: transform 0.25s ease, opacity 0.2s ease;
}

.map5-panel-hidden {
    transform: translateX(calc(-100% - 2rem));
    opacity: 0;
    pointer-events: none;
}

.map5-slide-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1rem 0.75rem 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.map5-slide-title {
    font-size: 0.9375rem;
    font-weight: 700;
    color: white;
    margin: 0;
}

.map5-slide-close {
    background: none;
    border: none;
    color: rgb(148 163 184);
    cursor: pointer;
    padding: 0.25rem;
    border-radius: 0.25rem;
    transition: all 150ms;
    display: flex;
    align-items: center;
    justify-content: center;
}

.map5-slide-close:hover {
    color: white;
    background: rgba(255, 255, 255, 0.08);
}

.map5-slide-close .material-symbols-outlined {
    font-size: 1.125rem;
}

.map5-slide-body {
    flex: 1;
    overflow-y: auto;
    padding: 0.75rem 1rem;
}

.map5-slide-body::-webkit-scrollbar {
    width: 4px;
}

.map5-slide-body::-webkit-scrollbar-track {
    background: transparent;
}

.map5-slide-body::-webkit-scrollbar-thumb {
    background: #475569;
    border-radius: 10px;
}

/* ══════════════════════════════════════
   뷰 전환 토글 (드롭다운/트리)
   ══════════════════════════════════════ */
.map5-view-toggle {
    display: flex;
    gap: 0.25rem;
    margin-bottom: 0.75rem;
    padding: 0.25rem;
    background: rgba(15, 23, 42, 0.5);
    border-radius: 0.5rem;
    border: 1px solid rgb(51 65 85);
}

.map5-view-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.375rem;
    border: none;
    border-radius: 0.375rem;
    background: transparent;
    color: rgb(148 163 184);
    cursor: pointer;
    transition: all 150ms;
}

.map5-view-btn .material-symbols-outlined {
    font-size: 1.125rem;
}

.map5-view-btn:hover {
    color: rgb(226 232 240);
    background: rgba(51, 65, 85, 0.5);
}

.map5-view-btn-active {
    background: rgba(59, 130, 246, 0.15);
    color: #60a5fa;
    box-shadow: 0 0 0 1px rgba(59, 130, 246, 0.3);
}

.map5-view-btn-active:hover {
    background: rgba(59, 130, 246, 0.2);
    color: #60a5fa;
}

/* ══════════════════════════════════════
   셀렉트 (드롭다운 모드)
   ══════════════════════════════════════ */
.map5-select-grid {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.map5-select {
    width: 100%;
    padding: 0.5rem 0.75rem;
    background-color: rgb(15 23 42);
    border: 1px solid rgb(51 65 85);
    border-radius: 0.5rem;
    color: rgb(226 232 240);
    font-size: 0.75rem;
    cursor: pointer;
    outline: none;
    transition: all 150ms;
    height: 36px;
}

.map5-select:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 0 1px #3b82f6;
}

.map5-select:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

/* ══════════════════════════════════════
   트리 뷰
   ══════════════════════════════════════ */
.map5-tree {
    max-height: 100%;
    overflow-y: auto;
    padding: 0.25rem 0;
}

.map5-tree::-webkit-scrollbar {
    width: 4px;
}

.map5-tree::-webkit-scrollbar-track {
    background: transparent;
}

.map5-tree::-webkit-scrollbar-thumb {
    background: #475569;
    border-radius: 10px;
}

.map5-tree-node {
    display: flex;
    flex-direction: column;
}

.map5-tree-row {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.3rem 0.5rem;
    border-radius: 0.375rem;
    cursor: pointer;
    transition: background-color 120ms;
    user-select: none;
}

.map5-tree-row:hover {
    background: rgba(255, 255, 255, 0.05);
}

.map5-tree-selected {
    background: rgba(59, 130, 246, 0.15) !important;
    outline: 1px solid rgba(59, 130, 246, 0.3);
}

.map5-tree-depth0 {
    padding-left: 0.25rem;
    font-weight: 600;
    font-size: 0.8125rem;
}

.map5-tree-depth1 {
    padding-left: 1.5rem;
    font-weight: 500;
    font-size: 0.775rem;
    color: rgb(203 213 225);
}

.map5-tree-depth2 {
    padding-left: 3rem;
    font-weight: 400;
    font-size: 0.75rem;
    color: rgb(148 163 184);
}

.map5-tree-toggle {
    font-size: 1.125rem;
    color: rgb(148 163 184);
    cursor: pointer;
    flex-shrink: 0;
    transition: color 120ms;
}

.map5-tree-toggle:hover {
    color: #60a5fa;
}

.map5-tree-folder {
    font-size: 1rem;
    color: #f59e0b;
    flex-shrink: 0;
}

.map5-tree-leaf {
    font-size: 0.875rem;
    color: #60a5fa;
    flex-shrink: 0;
    margin-left: 0.125rem;
}

.map5-tree-label {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ══════════════════════════════════════
   레이어 그리드
   ══════════════════════════════════════ */
.map5-layer-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.5rem;
}

.map5-layer-chip {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 0.5rem;
    min-height: 64px;
    border-radius: 0.5rem;
    border: 1px solid rgb(51 65 85);
    background-color: rgba(30, 41, 59, 0.5);
    transition: all 150ms;
    cursor: pointer;
}

.map5-layer-chip:hover {
    border-color: #3b82f6;
}

.map5-layer-chip-active {
    border-color: #3b82f6;
    background-color: rgba(59, 130, 246, 0.1);
    box-shadow: 0 0 0 1px rgba(59, 130, 246, 0.3);
}

.map5-layer-checkbox {
    position: absolute;
    top: 0.25rem;
    right: 0.25rem;
    width: 0.75rem;
    height: 0.75rem;
    border-radius: 0.25rem;
    color: #3b82f6;
    cursor: pointer;
}

.map5-layer-checkbox:focus {
    outline: 2px solid #3b82f6;
    outline-offset: 1px;
}

.map5-layer-icon {
    font-size: 1.125rem;
    margin-bottom: 0.25rem;
}

.map5-layer-label {
    font-size: 0.625rem;
    font-weight: 500;
    text-align: center;
    line-height: 1.25;
}

/* ══════════════════════════════════════
   범례
   ══════════════════════════════════════ */
.map5-legend {
    background-color: rgba(15, 23, 42, 0.5);
    border-radius: 0.5rem;
    padding: 0.75rem;
    border: 1px solid rgb(30, 41, 59);
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.map5-legend-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.map5-legend-category {
    font-size: 0.625rem;
    font-weight: 700;
    color: rgb(100 116 139);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-bottom: 1px solid rgb(30, 41, 59);
    padding-bottom: 0.25rem;
}

.map5-legend-items {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.5rem;
}

.map5-legend-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.map5-legend-dot {
    width: 0.625rem;
    height: 0.625rem;
    border-radius: 9999px;
}

.map5-legend-text {
    font-size: 0.6875rem;
    color: rgb(148 163 184);
}

.map5-legend-pipes {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.map5-legend-pipe {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.map5-legend-line {
    width: 2rem;
    border-radius: 9999px;
}

.map5-legend-line-thick {
    height: 3px;
    background-color: #2563eb;
}

.map5-legend-line-dashed {
    height: 2px;
    background-color: #6366f1;
    border-bottom: 2px dashed rgba(99, 102, 241, 0.3);
}

.map5-legend-line-thin {
    height: 1.5px;
    background-color: #0891b2;
}

/* ══════════════════════════════════════
   지도 컨테이너
   ══════════════════════════════════════ */
.map5-map-container {
    flex: 1;
    position: relative;
    overflow: hidden;
    background-color: rgb(2, 6, 23);
}

.map5-status-filter {
    position: absolute;
    top: 1rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 20;
    display: flex;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: rgba(15, 23, 42, 0.85);
    backdrop-filter: blur(12px);
    border-radius: 2rem;
    border: 1px solid rgba(148, 163, 184, 0.15);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.map5-status-chip {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.35rem 0.85rem;
    border-radius: 1.25rem;
    font-size: 0.8rem;
    font-weight: 500;
    color: rgba(148, 163, 184, 0.7);
    background: rgba(51, 65, 85, 0.3);
    border: 1px solid rgba(148, 163, 184, 0.1);
    cursor: pointer;
    transition: all 0.2s ease;
    user-select: none;
    white-space: nowrap;
}

.map5-status-chip:hover {
    background: rgba(51, 65, 85, 0.5);
    color: rgba(226, 232, 240, 0.9);
}

.map5-status-chip-active {
    background: rgba(51, 65, 85, 0.6);
    color: #e2e8f0;
    border-color: rgba(148, 163, 184, 0.25);
}

.map5-status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}

.map5-map-background {
    width: 100%;
    height: 100%;
    background-image: url('../images/jin-an.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    filter: contrast(1.1) brightness(0.6) saturate(0.8);
}

.map5-map-overlay {
    position: absolute;
    inset: 0;
}

/* ══════════════════════════════════════
   마커
   ══════════════════════════════════════ */
.map5-marker {
    position: absolute;
}

.map5-marker-pulse {
    position: absolute;
    inset: -0.75rem;
    background-color: rgba(59, 130, 246, 0.2);
    border-radius: 9999px;
    animation: map5-pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

@keyframes map5-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: .5; }
}

.map5-marker-pin {
    position: relative;
    cursor: pointer;
    background-color: #3b82f6;
    width: 1.5rem;
    height: 1.5rem;
    border-radius: 9999px;
    border: 2px solid white;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.5), 0 10px 10px -5px rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
}

.map5-marker-icon {
    font-size: 0.875rem;
    color: white;
}

.map5-marker-small {
    position: absolute;
}

.map5-marker-dot {
    width: 0.75rem;
    height: 0.75rem;
    border-radius: 9999px;
    border: 2px solid white;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.5);
    cursor: pointer;
    transition: transform 150ms;
}

.map5-marker-dot:hover {
    transform: scale(1.25);
}

/* ══════════════════════════════════════
   팝업
   ══════════════════════════════════════ */
.map5-popup {
    position: absolute;
    bottom: 2.5rem;
    left: 50%;
    transform: translateX(-50%);
    width: 320px;
    background-color: rgb(15, 23, 42);
    border-radius: 0.5rem;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.5), 0 10px 10px -5px rgba(0, 0, 0, 0.3);
    border: 1px solid rgb(51 65 85);
    overflow: hidden;
    z-index: 50;
}

.map5-popup-header {
    background-color: #3b82f6;
    padding: 0.625rem 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.map5-popup-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: white;
    font-size: 0.75rem;
    font-weight: 700;
}

.map5-popup-title .material-symbols-outlined {
    font-size: 1rem;
}

.map5-popup-close {
    color: rgba(255, 255, 255, 0.8);
    background: none;
    border: none;
    cursor: pointer;
    transition: color 150ms;
}

.map5-popup-close:hover {
    color: white;
}

.map5-popup-close .material-symbols-outlined {
    font-size: 0.875rem;
}

.map5-popup-body {
    padding: 0;
}

.map5-popup-table {
    width: 100%;
    border-collapse: collapse;
}

.map5-popup-table tr {
    border-bottom: 1px solid rgb(51 65 85);
}

.map5-popup-table td:first-child {
    background-color: rgb(30, 41, 59);
    color: rgb(148, 163, 184);
    font-weight: 600;
    font-size: 0.6875rem;
    width: 90px;
    padding: 0.375rem 0.5rem;
}

.map5-popup-table td:last-child {
    background-color: rgb(15, 23, 42);
    color: rgb(241, 245, 249);
    font-size: 0.75rem;
    padding: 0.375rem 0.625rem;
}

.map5-popup-highlight {
    font-weight: 700;
    color: #3b82f6 !important;
}

.map5-popup-footer {
    padding: 0.5rem;
    background-color: rgba(30, 41, 59, 0.5);
    border-top: 1px solid rgb(51 65 85);
}

.map5-popup-button {
    width: 100%;
    padding: 0.5rem 0;
    background-color: rgb(30, 41, 59);
    border: 1px solid rgb(51 65 85);
    border-radius: 0.25rem;
    font-size: 0.6875rem;
    font-weight: 700;
    color: rgb(203, 213, 225);
    cursor: pointer;
    transition: background-color 150ms;
}

.map5-popup-button:hover {
    background-color: rgb(51, 65, 85);
}

.map5-popup-arrow {
    position: absolute;
    bottom: -0.5rem;
    left: 50%;
    transform: translateX(-50%) rotate(45deg);
    width: 1rem;
    height: 1rem;
    background-color: rgba(30, 41, 59, 0.5);
    border-right: 1px solid rgb(51 65 85);
    border-bottom: 1px solid rgb(51 65 85);
}

.map5-pipe-svg {
    position: absolute;
    inset: 0;
    pointer-events: none;
    width: 100%;
    height: 100%;
    opacity: 0.6;
}

/* ══════════════════════════════════════
   컨트롤 버튼
   ══════════════════════════════════════ */
.map5-controls {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    z-index: 40;
}

.map5-zoom-controls {
    display: flex;
    flex-direction: column;
    background-color: rgb(15, 23, 42);
    border-radius: 0.5rem;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.5), 0 10px 10px -5px rgba(0, 0, 0, 0.3);
    border: 1px solid rgb(51 65 85);
    overflow: hidden;
}

.map5-zoom-button {
    width: 2.75rem;
    height: 2.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgb(203, 213, 225);
    background: none;
    border: none;
    cursor: pointer;
    transition: background-color 150ms;
}

.map5-zoom-button:hover {
    background-color: rgb(30, 41, 59);
}

.map5-zoom-button:first-child {
    border-bottom: 1px solid rgb(30, 41, 59);
}

.map5-control-button {
    width: 2.75rem;
    height: 2.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: rgb(15, 23, 42);
    border-radius: 0.5rem;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.5), 0 10px 10px -5px rgba(0, 0, 0, 0.3);
    border: 1px solid rgb(51 65 85);
    color: rgb(203, 213, 225);
    cursor: pointer;
    transition: background-color 150ms;
}

.map5-control-button:hover {
    background-color: rgb(30, 41, 59);
}

.map5-control-button-active {
    color: #3b82f6;
}

/* ══════════════════════════════════════
   정보 바
   ══════════════════════════════════════ */
.map5-info-bar {
    position: absolute;
    bottom: 1.5rem;
    right: 1.5rem;
    z-index: 40;
    background-color: rgba(15, 23, 42, 0.8);
    backdrop-filter: blur(12px);
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    border: 1px solid rgb(51 65 85);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.5);
    pointer-events: none;
    display: flex;
    align-items: center;
    gap: 1.25rem;
}

.map5-info-item {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    font-size: 0.6875rem;
    font-weight: 500;
    color: rgb(226, 232, 240);
}

.map5-info-icon {
    font-size: 0.875rem;
}

.map5-info-divider {
    height: 0.75rem;
    width: 1px;
    background-color: rgb(51, 65, 85);
}

/* ══════════════════════════════════════
   모바일 Map5 - 데이터 레이어 오버레이 팝업
   ══════════════════════════════════════ */
.map5-overlay-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    backdrop-filter: blur(2px);
}

.map5-overlay {
    position: fixed;
    bottom: 3rem;
    left: 0;
    width: 100%;
    max-width: 100%;
    max-height: calc(100vh - 3rem - 4rem);
    background: rgba(30, 41, 59, 0.98);
    backdrop-filter: blur(24px);
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    border-top-left-radius: 1.25rem;
    border-top-right-radius: 1.25rem;
    box-shadow: 0 -10px 25px rgba(0, 0, 0, 0.5);
    z-index: 1001;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    padding-bottom: 0.25rem;
}

.map5-overlay-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.5rem 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    flex-shrink: 0;
}

.map5-overlay-title {
    font-size: 0.9375rem;
    font-weight: 700;
    color: rgb(226, 232, 240);
}

.map5-overlay-count {
    font-size: 0.75rem;
    font-weight: 600;
    color: rgb(148, 163, 184);
    background: rgba(59, 130, 246, 0.2);
    padding: 0.25rem 0.5rem;
    border-radius: 0.375rem;
}

.map5-chip-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.375rem;
    padding: 0.375rem 1rem;
    overflow-y: auto;
    flex: 1;
    min-height: 0;
}

.map5-chip {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.4rem 0.625rem;
    border-radius: 0.375rem;
    border: 1px solid rgb(51, 65, 85);
    background: rgba(15, 23, 42, 0.5);
    cursor: pointer;
    transition: all 150ms;
}

.map5-chip:hover {
    border-color: #3b82f6;
    background: rgba(59, 130, 246, 0.08);
}

.map5-chip-active {
    border-color: #3b82f6;
    background: rgba(59, 130, 246, 0.15);
    box-shadow: 0 0 0 1px rgba(59, 130, 246, 0.3);
}

.map5-chip-icon {
    font-size: 1.125rem;
    flex-shrink: 0;
}

.map5-chip-label {
    font-size: 0.75rem;
    font-weight: 500;
    color: rgb(226, 232, 240);
}

.map5-control-active {
    background: rgba(59, 130, 246, 0.2) !important;
    color: #60a5fa !important;
}

.map5-layer-marker {
    width: 1.5rem;
    height: 1.5rem;
    border-radius: 50%;
    border: 2px solid white;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.map5-layer-marker .material-symbols-outlined {
    font-size: 0.75rem;
    color: white;
}

/* ══════════════════════════════════════
   Map5 모바일 VWorld 연동 추가 스타일
   (기존 스타일 유지, 신규 추가만)
   ══════════════════════════════════════ */

/* 로딩 오버레이 */
.map5-loading-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 1000;
    background: rgba(15, 23, 42, 0.9);
    padding: 16px 24px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    gap: 12px;
    color: white;
    font-size: 14px;
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.map5-spin {
    animation: map5-spin-anim 1s linear infinite;
}

@keyframes map5-spin-anim {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* 마커 수 표시 */
.map5-marker-count {
    position: absolute;
    bottom: 0.5rem;
    left: 0.5rem;
    background: rgba(15, 23, 42, 0.9);
    padding: 8px 12px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 6px;
    color: #94a3b8;
    font-size: 13px;
    z-index: 100;
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.map5-marker-count .material-symbols-outlined {
    font-size: 16px;
    color: #3b82f6;
}

.map5-my-badge {
    background: #3b82f6;
    color: white;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
}

/* 바텀시트 (구역 선택) */
.map5-block-sheet {
    position: fixed;
    bottom: 3rem; /* 하단 탭 바(m-tab-bar) 위에 표시 */
    left: 0;
    right: 0;
    background: rgba(15, 23, 42, 0.98);
    border-top-left-radius: 1rem;
    border-top-right-radius: 1rem;
    z-index: 1001;
    max-height: calc(100vh - 3rem - 4rem);
    overflow-y: auto;
    animation: map5-slideUp 0.3s ease;
    backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-bottom: none;
    padding-bottom: 0.5rem;
}

@keyframes map5-slideUp {
    from { transform: translateY(100%); }
    to { transform: translateY(0); }
}

.map5-sheet-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.625rem 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    font-weight: 600;
    color: white;
    font-size: 0.875rem;
}

.map5-sheet-body {
    padding: 0.625rem 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.625rem;
}

.map5-block-select {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.map5-block-select label {
    font-size: 0.75rem;
    color: #94a3b8;
    font-weight: 500;
}

.map5-block-select select {
    padding: 0.75rem;
    background: #1e293b;
    border: 1px solid #334155;
    border-radius: 0.5rem;
    color: white;
    font-size: 1rem;
    width: 100%;
}

.map5-block-select select:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.map5-sheet-footer {
    display: flex;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.map5-btn-primary,
.map5-btn-secondary {
    flex: 1;
    padding: 0.5rem;
    border: none;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s;
}

.map5-btn-primary {
    background: #3b82f6;
    color: white;
}

.map5-btn-primary:hover {
    background: #2563eb;
}

.map5-btn-secondary {
    background: rgba(100, 116, 139, 0.3);
    color: #94a3b8;
}

.map5-btn-secondary:hover {
    background: rgba(100, 116, 139, 0.5);
    color: white;
}

/* 마커 팝업 스타일 */
.map5-meter-popup {
    min-width: 150px;
    font-family: 'Inter', 'Noto Sans KR', sans-serif;
}

/* ══════════════════════════════════════
   모바일 Map5 - Leaflet Control API 스타일
   (z-index 스태킹 컨텍스트 문제 해결용)
   ══════════════════════════════════════ */

/* 상단 필터 칩 컨트롤 (Leaflet Control) */
.map5-filter-control {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    padding: 8px;
    max-width: calc(100vw - 70px);
    pointer-events: auto;
}

.map5-filter-control .m-map-filter-chip {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 6px 10px;
    background: rgba(30, 41, 59, 0.95);
    border: 1.5px solid rgba(100, 116, 139, 0.4);
    border-radius: 20px;
    font-size: 12px;
    color: #64748b;
    cursor: pointer;
    transition: all 0.15s;
    backdrop-filter: blur(8px);
    user-select: none;
    -webkit-tap-highlight-color: transparent;
    opacity: 0.7;
}

.map5-filter-control .m-map-filter-chip.active {
    background: rgba(59, 130, 246, 0.25);
    border-color: #3b82f6;
    color: #60a5fa;
    opacity: 1;
    box-shadow: 0 0 8px rgba(59, 130, 246, 0.3);
}

.map5-filter-control .m-filter-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}

/* 우측 버튼 컨트롤 그룹 (Leaflet Control) */
.map5-buttons-control {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-right: 10px;
    margin-top: 10px;
    pointer-events: auto;
}

.map5-ctrl-btn {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(15, 23, 42, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 10px;
    color: #cbd5e1;
    cursor: pointer;
    transition: all 0.15s;
    backdrop-filter: blur(8px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    -webkit-tap-highlight-color: transparent;
}

.map5-ctrl-btn:hover,
.map5-ctrl-btn:active {
    background: rgba(30, 41, 59, 0.95);
    border-color: rgba(255, 255, 255, 0.25);
}

.map5-ctrl-btn.active {
    background: rgba(59, 130, 246, 0.25);
    border-color: rgba(59, 130, 246, 0.5);
    color: #60a5fa;
}

.map5-ctrl-btn.loading {
    pointer-events: none;
    opacity: 0.7;
}

.map5-ctrl-btn .material-symbols-outlined {
    font-size: 22px;
}

.map5-ctrl-btn .spinning {
    animation: map5-spin-anim 1s linear infinite;
}

/* 마커 카운트 컨트롤 (Leaflet Control) */
.map5-marker-count-control {
    background: rgba(15, 23, 42, 0.9);
    padding: 8px 12px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 6px;
    color: #94a3b8;
    font-size: 13px;
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    margin-left: 10px;
    margin-bottom: 10px;
    pointer-events: none;
}

/* Leaflet 컨트롤 포지션 조정 */
.leaflet-top.leaflet-left {
    top: 0;
    left: 0;
}

.leaflet-bottom.leaflet-right {
    bottom: 0;
    right: 0;
}

.leaflet-bottom.leaflet-left {
    bottom: 3rem; /* 하단 탭 바 위에 표시 */
    left: 0;
}

/* ══════════════════════════════════════
   모바일 Map5 - 레이어 오버레이 확장
   ══════════════════════════════════════ */

/* map5-overlay-large 클래스는 모바일 전체화면 레이아웃 변경으로 제거되었습니다 */

/* 레이어 섹션 구분 */
.map5-layer-section {
    margin-bottom: 12px;
}

.map5-layer-section:last-child {
    margin-bottom: 0;
}

.map5-layer-section-title {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    font-weight: 600;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
    padding-bottom: 4px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

/* 칩 로딩 상태 */
.map5-chip-loading {
    opacity: 0.7;
    pointer-events: none;
}

/* 범례 섹션 구분 */
.map5-legend-section {
    margin-bottom: 10px;
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.map5-legend-section:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.map5-legend-title {
    font-size: 10px;
    font-weight: 600;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 6px;
}

/* 범례 관로 라인 스타일 */
.m-map-legend-line {
    width: 20px;
    height: 3px;
    border-radius: 2px;
    flex-shrink: 0;
}

/* 시설물 팝업 */
.map5-facility-popup {
    min-width: 120px;
    font-family: 'Inter', 'Noto Sans KR', sans-serif;
    font-size: 13px;
    line-height: 1.4;
}

.map5-facility-popup strong {
    display: block;
    margin-bottom: 4px;
}

.map5-facility-popup small {
    color: #64748b;
}

/* ══════════════════════════════════════
   시설물/관로 팝업 상세 스타일
   ══════════════════════════════════════ */
.map5-facility-popup-detail,
.map5-pipeline-popup-detail {
    min-width: 220px;
    max-width: 320px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

.popup-header {
    font-weight: bold;
    font-size: 14px;
    color: #1e293b;
    padding: 10px 12px;
    border-bottom: 2px solid #3b82f6;
    background: linear-gradient(135deg, #f8fafc, #e2e8f0);
    margin: -8px -8px 8px -8px;
}

.popup-table {
    width: 100%;
    font-size: 12px;
    border-collapse: collapse;
}

.popup-table td {
    padding: 6px 8px;
    border-bottom: 1px solid #e2e8f0;
    vertical-align: top;
}

.popup-table tr:last-child td {
    border-bottom: none;
}

.popup-table td:first-child {
    color: #64748b;
    width: 35%;
    font-weight: 500;
}

.popup-table td:last-child {
    color: #1e293b;
}

/* 관로 클릭 영역 시각적 피드백 */
.leaflet-interactive {
    cursor: pointer !important;
}

.leaflet-interactive:hover {
    stroke-width: 6 !important;
    opacity: 1 !important;
}

/* ══════════════════════════════════════
   계량기 마커 (조사상태별 아이콘)
   z-index 650 (meterPane)으로 항상 최상위
   ══════════════════════════════════════ */
.meter-marker-wrapper {
    background: transparent !important;
    border: none !important;
}

.meter-marker {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.35);
    border: 2px solid white;
    transition: transform 0.15s ease;
}

.meter-marker:hover {
    transform: scale(1.15);
}

.meter-marker .material-symbols-outlined {
    font-size: 16px;
    color: white;
    font-weight: 500;
}

/* 조사상태별 색상 */
.meter-미조사 {
    background: #64748b; /* slate */
}

.meter-호폐 {
    background: #f59e0b; /* amber */
}

.meter-조사완료 {
    background: #10b981; /* emerald */
}

.meter-위치불명 {
    background: #3b82f6; /* blue */
}

/* ══════════════════════════════════════
   계량기 클러스터 마커 스타일
   ══════════════════════════════════════ */
.meter-cluster-wrapper {
    background: transparent !important;
    border: none !important;
}

.meter-cluster {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
    border: 3px solid white;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.4);
    color: white;
    font-size: 13px;
    font-weight: 700;
}

/* ══════════════════════════════════════
   마커 카운트 컨트롤 (Leaflet bottomleft)
   ══════════════════════════════════════ */
.map5-marker-count-control {
    background: rgba(15, 23, 42, 0.9);
    padding: 6px 10px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 6px;
    color: #94a3b8;
    font-size: 13px;
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.map5-marker-count-control .material-symbols-outlined {
    font-size: 16px;
    color: #3b82f6;
}

.map5-zoom-level {
    color: #60a5fa;
    font-weight: 600;
}

.map5-count-divider {
    color: rgba(148, 163, 184, 0.4);
    margin: 0 6px;
}

.map5-count-value {
    display: flex;
    align-items: center;
    gap: 4px;
}

/* 지도 타입 전환 버튼 (모바일) */
.map5-map-type-control {
    display: flex;
    flex-direction: column;
    gap: 4px;
    pointer-events: auto;
}

.m-map-type-btn {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(15, 23, 42, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 10px;
    color: #cbd5e1;
    cursor: pointer;
    transition: all 0.15s;
    backdrop-filter: blur(8px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    -webkit-tap-highlight-color: transparent;
}

.m-map-type-btn:hover,
.m-map-type-btn:active {
    background: rgba(30, 41, 59, 0.95);
    border-color: rgba(255, 255, 255, 0.25);
}

.m-map-type-btn.active {
    background: rgba(59, 130, 246, 0.25);
    border-color: rgba(59, 130, 246, 0.5);
    color: #60a5fa;
}

.m-map-type-btn .material-symbols-outlined {
    font-size: 22px;
}

.m-map-zoom-controls .m-map-zoom-btn.active {
    background: rgba(59, 130, 246, 0.25);
    color: #60a5fa;
}

