/*
CHANGE LOG
File: /var/www/html/siteplanner.nsgia.com/static/css/sidebar.css
Type: CSS Stylesheet
Purpose: Sidebar layout + collapsible nav groups for siteplanner
Pattern: Adapted from eaglesflock.nsgia.com nsg_layout.css + sidebar_collapsible.css
Version History:
  2026-02-20 v1.0 - Initial creation from Eagles Flock sidebar pattern
*/

/* ===== LAYOUT VARIABLES ===== */
:root {
    --sp-navbar-height: 48px;
    --sp-sidebar-width: 220px;
    --sp-sidebar-bg: #2c3e50;
    --sp-sidebar-hover: #34495e;
    --sp-sidebar-active: #3498db;
    --sp-navbar-bg: #1a1a2e;
}

/* ===== NAVBAR - thin brand bar ===== */
.sp-navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--sp-navbar-height);
    background: var(--sp-navbar-bg);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 16px;
    z-index: 1001;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.sp-navbar-brand {
    color: #ecf0f1;
    font-size: 15px;
    font-weight: 600;
    text-decoration: none;
}
.sp-navbar-brand:hover { color: #fff; }

.sp-navbar-links {
    display: flex;
    gap: 14px;
}
.sp-navbar-links a {
    color: rgba(255,255,255,0.8);
    font-size: 13px;
    text-decoration: none;
    padding: 6px 10px;
    border-radius: 4px;
    transition: background 0.2s;
}
.sp-navbar-links a:hover {
    background: rgba(255,255,255,0.1);
    color: #fff;
}

/* ===== SIDEBAR - fixed left ===== */
.sp-sidebar {
    position: fixed;
    top: var(--sp-navbar-height);
    left: 0;
    width: var(--sp-sidebar-width);
    height: calc(100vh - var(--sp-navbar-height));
    background: var(--sp-sidebar-bg);
    color: #fff;
    overflow-y: auto;
    z-index: 1000;
    box-shadow: 2px 0 8px rgba(0,0,0,0.15);
}

.sp-sidebar-header {
    padding: 14px 14px 10px;
    border-bottom: 1px solid rgba(255,255,255,0.12);
    background: rgba(0,0,0,0.1);
}
.sp-sidebar-header h3 {
    font-size: 14px;
    font-weight: 600;
    margin: 0 0 2px;
}
.sp-sidebar-header p {
    font-size: 12px;
    opacity: 0.8;
    margin: 0;
}

/* ===== MAIN CONTENT SHIFT ===== */
.sp-main {
    margin-left: var(--sp-sidebar-width);
    margin-top: var(--sp-navbar-height);
    min-height: calc(100vh - var(--sp-navbar-height));
    padding: 24px;
    max-width: calc(1100px + var(--sp-sidebar-width));
}

/* ===== NAV LINKS ===== */
.sidebar-nav {
    padding: 6px 0;
}

.sidebar-divider {
    height: 1px;
    background: rgba(255,255,255,0.12);
    margin: 6px 12px;
}

.sidebar-label {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 6px 14px 4px;
    opacity: 0.5;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    color: rgba(255,255,255,0.9);
    text-decoration: none;
    font-size: 13px;
    border-left: 3px solid transparent;
    transition: all 0.15s ease;
    cursor: pointer;
}
.nav-link:hover {
    background: rgba(255,255,255,0.08);
    border-left-color: rgba(255,255,255,0.4);
    color: #fff;
}
.nav-link.active {
    background: rgba(255,255,255,0.12);
    border-left-color: #fff;
    font-weight: 600;
    color: #fff;
}
.nav-link.disabled {
    opacity: 0.35;
    cursor: default;
    pointer-events: none;
}

/* ===== STEP DOTS ===== */
.step-dot {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: rgba(255,255,255,0.2);
    color: #fff;
    font-size: 11px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.step-dot.dim {
    opacity: 0.4;
}
.nav-link.active .step-dot {
    background: var(--sp-sidebar-active);
}

/* ===== COLLAPSIBLE GROUPS ===== */
.nav-group {
    margin-top: 2px;
}

.nav-group-toggle {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    padding: 8px 14px;
    background: rgba(0,0,0,0.12);
    border: none;
    border-left: 3px solid transparent;
    color: rgba(255,255,255,0.9);
    font-size: 13px;
    font-weight: 500;
    text-align: left;
    cursor: pointer;
    transition: all 0.15s ease;
}
.nav-group-toggle:hover {
    background: rgba(0,0,0,0.2);
}
.nav-group-toggle.active {
    background: rgba(0,0,0,0.2);
    border-left-color: rgba(255,255,255,0.4);
}

.toggle-icon {
    font-size: 14px;
    font-weight: bold;
    transition: transform 0.2s ease;
}
.nav-group-toggle[aria-expanded="true"] .toggle-icon {
    transform: rotate(45deg);
}

.nav-submenu {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    background: rgba(0,0,0,0.08);
}
.nav-submenu.open {
    max-height: 300px;
}
.nav-submenu .nav-link {
    padding-left: 24px;
    font-size: 12px;
    border-left-width: 2px;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 900px) {
    .sp-sidebar {
        position: relative;
        top: 0;
        width: 100%;
        height: auto;
        box-shadow: none;
        border-bottom: 1px solid rgba(255,255,255,0.1);
    }
    .sp-main {
        margin-left: 0;
    }
    .sidebar-nav {
        display: flex;
        flex-wrap: wrap;
        gap: 2px;
        padding: 6px;
    }
    .sidebar-divider,
    .sidebar-label {
        display: none;
    }
    .nav-link {
        padding: 6px 10px;
        border-left: none;
        border-bottom: 2px solid transparent;
    }
    .nav-link.active {
        border-left: none;
        border-bottom-color: #fff;
    }
    .nav-group {
        width: 100%;
    }
}
