/* =========================================
   Top Navigation Bar (Glassmorphism & Clean)
   ========================================= */
:root {
    --primary-accent: #818CF8;
    --text-muted: #888888;
}

.top-nav-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 24px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    height: 72px;
    box-sizing: border-box;
    flex-shrink: 0;
    z-index: 2000;
}

.top-nav-left {
    display: flex;
    align-items: center;
    gap: 24px;
}

.top-logo-img {
    height: 28px;
    width: auto;
    object-fit: contain;
    transition: transform 0.2s;
}

.top-logo-img:active {
    transform: scale(0.95);
}

.hamburger-btn {
    background: none;
    border: none;
    padding: 8px;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    transition: all 0.2s;
    outline: none;
}

.hamburger-btn:hover span {
    background: var(--primary-accent) !important;
}

.top-nav-center {
    flex: 1;
    display: flex;
    justify-content: center;
    padding: 0 40px;
}

.search-wrapper.top-search {
    position: relative;
    background: #F3F4F6;
    border-radius: 24px;
    display: flex;
    align-items: center;
    padding: 0 16px;
    height: 48px;
    width: 100%;
    max-width: 480px;
    border: 1px solid transparent;
    transition: all 0.2s;
}

.search-wrapper.top-search:focus-within {
    background: #FFFFFF;
    border-color: var(--primary-accent);
    box-shadow: 0 0 0 4px rgba(129, 140, 248, 0.1);
}

.search-wrapper.top-search svg {
    width: 20px;
    height: 20px;
    color: #6B7280;
    margin-right: 12px;
}

.search-wrapper.top-search input {
    background: none;
    border: none;
    color: #111827;
    font-size: 15px;
    width: 100%;
    outline: none;
    font-weight: 500;
}

.search-wrapper.top-search input::placeholder {
    color: #9CA3AF;
}

.top-nav-right {
    display: flex;
    align-items: center;
    gap: 16px;
}

.nav-icon-btn {
    background: transparent;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #4B5563;
    transition: all 0.2s;
}

.nav-icon-btn:hover {
    background: #F3F4F6;
    color: #111;
}

.google-login-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    background: #FFFFFF;
    border: 1px solid #E5E7EB;
    border-radius: 24px;
    padding: 8px 16px;
    font-size: 14px;
    font-weight: 600;
    color: #374151;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.02);
}

.google-login-btn:hover {
    background: #F9FAFB;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

/* Drawer Mega Menu specifics */
.menu-group-label {
    margin-top: 16px;
}

.menu-group-label:first-child {
    margin-top: 0;
}

.mob-drw-link:hover {
    background: rgba(0, 0, 0, 0.03);
    border-radius: 8px;
}

/* Responsive adjustments */
@media (max-width: 1024px) {
    .top-nav-bar {
        padding: 12px 16px;
        height: 64px;
    }
    
    .top-nav-center {
        display: none; /* Hide search on mobile header to save space, maybe add an icon instead */
    }
    
    .google-login-btn span {
        display: none;
    }
    
    .google-login-btn {
        padding: 8px;
        border-radius: 50%;
    }
    
    .top-nav-right {
        gap: 8px;
    }
}



/* Map Overlay Sidebar Adjustments */
/* Map Settings UI */
#map-controls {
    position: absolute;
    top: 24px;
    right: 24px;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 12px;
}

.zoom-label {
    font-size: 13px;
    font-weight: 700;
    color: #1e293b;
    display: flex;
    align-items: center;
    gap: 6px;
}

/* Premium Map Settings Popup (Minimalist Style) */
#map-legend-card {
    display: none;
    position: absolute;
    top: 50%;
    left: 100px; /* Offset from sidebar */
    transform: translateY(-50%) scale(0.95);
    background: #FFFFFF; 
    padding: 30px;
    border-radius: 8px; /* Requested corner radius */
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.15);
    width: 320px;
    border: 1px solid #eee;
    z-index: 2000;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    opacity: 0;
    font-family: 'Plus Jakarta Sans', sans-serif;
}

#map-legend-card.active {
    display: block;
    transform: translateY(-50%) scale(1);
    opacity: 1;
}

.map-setting-row {
    padding: 12px 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid #f1f5f9;
}

.map-setting-row:last-child {
    border-bottom: none;
}

.setting-tag {
    background: #E0E7FF;
    color: #6366F1;
    padding: 5px 14px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    display: inline-block;
    margin-bottom: 20px;
}

.map-setting-label {
    font-size: 14px;
    font-weight: 700;
    color: #1e293b;
}

.map-setting-desc {
    font-size: 11px;
    color: #64748b;
    margin-top: 2px;
}

#map-settings-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.4);
    backdrop-filter: blur(4px);
    z-index: 1999;
}

#map-settings-overlay.active {
    display: block;
}

#zoom-indicator-float {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1000;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(8px);
    padding: 8px 20px;
    border-radius: 40px;
    border: 1px solid rgba(0,0,0,0.05);
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    display: none; /* Only show in Live Map */
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 700;
    color: #1e293b;
}

@media (max-width: 1024px) {
    #zoom-indicator-float {
        bottom: 80px;
    }
}

.settings-toggle-btn {
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    color: #1E293B;
    font-weight: 700;
    font-size: 13px;
    outline: none;
}

.settings-card {
    display: none;
    background: white;
    padding: 24px;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    width: 240px;
    border: 1px solid rgba(0, 0, 0, 0.05);
    transform-origin: top right;
    animation: settingsFadeIn 0.25s cubic-bezier(0, 0, 0.2, 1);
}

.settings-card.active {
    display: block;
}

@keyframes settingsFadeIn {
    from { opacity: 0; transform: scale(0.95); }
    to { opacity: 1; transform: scale(1); }
}

.filter-group-title {
    margin: 0 0 12px 0;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #94A3B8;
    font-weight: 700;
}

.filter-item {
    display: flex;
    align-items: center;
    margin-bottom: 12px;
    font-size: 14px;
    font-weight: 600;
    color: #334155;
    cursor: pointer;
    transition: opacity 0.2s;
}

.filter-item:hover { opacity: 0.8; }

.filter-item input {
    width: 18px;
    height: 18px;
    margin-right: 12px;
    cursor: pointer;
    accent-color: var(--primary-accent);
}

.divider {
    height: 1px;
    background: #F1F5F9;
    margin: 16px 0;
    border: none;
}

/* Sidebar Group Label - Height Preserving UI */
.sidebar-group-label {
    position: relative;
    display: block;
    padding: 0 8px 4px; /* 좌우 여백 8px로 아이콘과 정렬 */
    font-size: 11px;
    font-weight: 800;
    color: rgba(255, 255, 255, 0.2);
    letter-spacing: 1.5px;
    text-transform: uppercase;
    white-space: nowrap;
    height: 28px;
    line-height: 24px;
    box-sizing: border-box;
    transition: padding 0.2s ease;
    margin-top: 24px;
    text-align: left; /* 항상 왼쪽 정렬 */
}

/* Expanded State */
.admin-sidebar:not(.collapsed) .sidebar-group-label .short-text { display: none; }
.admin-sidebar:not(.collapsed) .sidebar-group-label .full-text { display: block; }

/* Collapsed State (축소 시 동일한 높이 유지) */
.admin-sidebar.collapsed .sidebar-group-label {
    padding: 0 8px;              /* 좌측 고정 여백 */
    text-align: left;            /* 중앙 정렬 제거, 좌측 고정 */
    height: 28px;
    line-height: 24px;
    overflow: hidden;
    margin-top: 24px !important; /* 고정 공간 24px */
}
.admin-sidebar.collapsed .sidebar-group-label .full-text { display: none; }
.admin-sidebar.collapsed .sidebar-group-label .short-text { 
    display: block; 
    font-size: 11px;      /* MUST match full-text font-size */
    letter-spacing: 1.5px; /* MUST match full-text letter-spacing */
}
