/* =====================================================================
   data-sidebar.css
   Shared "Explore Data / Tools" sidebar for the Data section.
   Markup lives in templates/core/data_sidebar.html.
   Replaces the copies that used to sit in data-landing-page.css,
   cat-page.css and indicator-page.css.
   ===================================================================== */

:root {
    --sidebar-width: 260px;
    --text-main: #1a1a1a;
    --text-muted: #666;
    --border-color: #e5e7eb;
    --bg-hover: #f3f4f6;
    --accent: #2563eb;
}

.sidebar-group {
    margin-bottom: 32px;
}

.sidebar-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    font-weight: 700;
    margin-bottom: 12px;
    font-family: 'Inter', sans-serif;
}

.nav-list {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: 8px;
    text-decoration: none;
    color: var(--text-main);
    font-size: 0.95rem;
    font-weight: 500;
    transition: all 0.2s ease;
    font-family: 'Inter', sans-serif;
}

.nav-item i {
    font-size: 1.1rem;
    color: var(--text-muted);
}

.nav-item:hover {
    background-color: var(--bg-hover);
    color: var(--accent);
}

.nav-item:hover i {
    color: var(--accent);
}

/* Current section (replaces the old inline styles) */
.nav-item.active {
    background-color: #eff6ff;
    color: var(--accent);
    font-weight: 600;
}

.nav-item.active i {
    color: var(--accent);
}


/* ============= MOBILE ============= */

@media (max-width: 768px) {

    /* Sidebar becomes one swipeable row of pills above the content */
    .data-sidebar {
        display: flex;
        gap: 8px;
        margin: 12px 0 16px;
        overflow-x: auto;
        scrollbar-width: none;
    }

    .data-sidebar::-webkit-scrollbar {
        display: none;
    }

    /* Flatten the groups so every link sits in the same row */
    .data-sidebar .sidebar-group,
    .data-sidebar .nav-list {
        display: contents;
    }

    .data-sidebar .sidebar-label {
        display: none;
    }

    .data-sidebar .nav-item {
        flex: 0 0 auto;
        gap: 6px;
        padding: 7px 12px;
        border: 1px solid var(--border-color);
        border-radius: 999px;
        background-color: #fff;
        font-size: 0.85rem;
        white-space: nowrap;
    }

    .data-sidebar .nav-item i {
        font-size: 0.95rem;
    }

    .data-sidebar .nav-item.active {
        border-color: #bfdbfe;
        background-color: #eff6ff;
    }
}
