/* ============================================================
 * YouthSoccerGenie — Sidebar & Navigation Styles
 * Build: YSG_V04_SIDEBAR
 * Source: coaches-portal-v5.1.html (approved mockup)
 *
 * Purpose: Fixed left sidebar with navy background, gold active
 * indicators, and mobile collapse support.
 * ============================================================ */

/* ===== SIDEBAR CONTAINER ===== */
.sidebar {
    width: 240px;
    background: var(--navy, #0B1A2E);
    color: var(--cream, #F4F0E8);
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    z-index: 200;
    transition: transform 0.3s;
    transform: translateX(-100%);
}

.sidebar::before {
    display: none;
}

.sidebar.open {
    transform: translateX(0);
}

/* ===== LOGO / BRANDING ===== */
.sidebar-logo {
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    position: relative;
    z-index: 1;
}

.sidebar-logo img {
    height: 56px;
    object-fit: contain;
}

.sidebar-logo span {
    font-family: 'Playfair Display', serif;
    font-size: 16px;
    font-weight: 700;
    color: var(--gold, #D4A84B);
}

/* ===== NAV CONTAINER ===== */
.sidebar-nav {
    flex: 1;
    padding: 12px 0;
    overflow-y: auto;
    position: relative;
    z-index: 1;
}

/* ===== NAV ITEMS ===== */
.nav-item,
.sidebar .nav-item,
.sidebar-nav .nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    color: #B0BEC5;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    border-left: 3px solid transparent;
    text-decoration: none;
}

.nav-item:hover,
.sidebar .nav-item:hover,
.sidebar-nav .nav-item:hover {
    background: var(--navy-hover, #1A2D4A);
    color: var(--cream, #F4F0E8);
    text-decoration: none;
}

.nav-item.active,
.sidebar .nav-item.active,
.sidebar-nav .nav-item.active {
    color: var(--gold, #D4A84B);
    border-left-color: var(--gold, #D4A84B);
    background: rgba(212, 168, 75, 0.08);
}

.nav-item .icon {
    font-size: 18px;
    width: 24px;
    text-align: center;
}

/* ===== NAV SECTION HEADERS ===== */
.nav-section {
    padding: 16px 20px 8px;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: rgba(139, 155, 180, 0.6);
    position: relative;
    z-index: 1;
}

/* ===== SIDEBAR FOOTER ===== */
.sidebar-footer {
    padding: 16px 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    position: relative;
    z-index: 1;
}

.sidebar-user {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    color: #B0BEC5;
}

.sidebar-user .avatar {
    width: 32px;
    height: 32px;
    background: var(--gold, #D4A84B);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--navy, #0B1A2E);
    font-weight: 700;
    font-size: 13px;
}

/* ===== HAMBURGER TOGGLE ===== */
.hamburger {
    display: none;
    background: none;
    border: none;
    font-size: 24px;
    color: var(--navy, #0B1A2E);
    cursor: pointer;
    padding: 8px;
}

/* ===== MAIN CONTENT OFFSET ===== */
.main-content,
.content,
main {
    transition: margin-left 0.3s;
}

/* ===== OVERRIDE: Blazor NavMenu default styles ===== */
.sidebar .nav-link,
.sidebar a.nav-link {
    color: #B0BEC5;
    text-decoration: none;
    padding: 12px 20px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.sidebar .nav-link:hover,
.sidebar a.nav-link:hover {
    color: var(--cream, #F4F0E8);
    background: var(--navy-hover, #1A2D4A);
    text-decoration: none;
}

.sidebar .nav-link.active,
.sidebar a.nav-link.active {
    color: var(--gold, #D4A84B);
    border-left: 3px solid var(--gold, #D4A84B);
    background: rgba(212, 168, 75, 0.08);
}

/* ===== DESKTOP: Sidebar always visible ===== */
@media (min-width: 769px) {
    .sidebar {
        transform: translateX(0);
    }

    .main-content,
    .content,
    main {
        margin-left: 240px;
    }

    .hamburger {
        display: none;
    }
}

/* ===== MOBILE: Sidebar behind hamburger ===== */
@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
    }

    .sidebar.open {
        transform: translateX(0);
    }

    .hamburger {
        display: block;
    }

    .main-content,
    .content,
    main {
        margin-left: 0;
    }
}

/* ===== OVERLAY (mobile sidebar open) ===== */
.sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 199;
}

.sidebar-overlay.active {
    display: block;
}
