/* ============================================================
   Shared Sidebar — layout, navigation, tournament list, projects
   Streamer item styles live in ratz-brand.css
   ============================================================ */

/* ---------- body offset ---------- */
body.has-sidebar {
    padding-left: 56px;
    transition: padding-left 0.25s cubic-bezier(0.4,0,0.2,1);
}
body.has-sidebar.sidebar-expanded { padding-left: 260px; }

@media (max-width: 900px) {
    body.has-sidebar,
    body.has-sidebar.sidebar-expanded { padding-left: 0 !important; }
}

/* ---------- sidebar shell ---------- */
.nav-sidebar {
    position: fixed; left: 0; top: 0; bottom: 0; width: 56px;
    background: var(--bg-primary, #050505); border-right: 1px solid var(--border, #222);
    z-index: 200; overflow-y: auto; overflow-x: hidden;
    display: flex; flex-direction: column;
    transition: width 0.25s cubic-bezier(0.4,0,0.2,1);
}
.nav-sidebar::-webkit-scrollbar { width: 4px; }
.nav-sidebar::-webkit-scrollbar-track { background: transparent; }
.nav-sidebar::-webkit-scrollbar-thumb { background: #333; border-radius: 4px; }
.nav-sidebar.expanded { width: 260px; }

/* mobile overlay mode */
@media (max-width: 900px) {
    .nav-sidebar {
        width: 280px; transform: translateX(-100%);
        transition: transform 0.3s cubic-bezier(0.4,0,0.2,1);
    }
    .nav-sidebar.open { transform: translateX(0); }
    .nav-sidebar.expanded { width: 280px; }
}

.nav-sidebar-backdrop {
    position: fixed; inset: 0; background: rgba(0,0,0,0.5); z-index: 199;
    opacity: 0; visibility: hidden; transition: all 0.3s; pointer-events: none;
}
.nav-sidebar-backdrop.open { opacity: 1; visibility: visible; pointer-events: auto; }

/* ---------- sections ---------- */
.sb-section { padding: 8px 0; }
.nav-sidebar.expanded .sb-section { padding: 12px 0; }
.sb-section + .sb-section { border-top: 1px solid var(--border, #222); }

.sb-section-title {
    font-size: 10px; font-weight: 700; color: var(--text-muted, #666);
    text-transform: uppercase; letter-spacing: 1.5px;
    margin-bottom: 12px; display: none; align-items: center; gap: 8px;
}
.nav-sidebar.expanded .sb-section-title { display: flex; padding: 0 12px; }

.sb-section-title .count {
    background: #FF3B3B; color: white;
    font-size: 9px; padding: 2px 6px; border-radius: 10px;
    font-weight: 700; min-width: 18px; text-align: center;
}

/* ---------- nav links ---------- */
.sb-links { display: flex; flex-direction: column; gap: 2px; }

.sb-link {
    display: flex; align-items: center; gap: 10px; padding: 8px 0;
    border-radius: 4px; color: var(--text-secondary, #B3B3B3);
    text-decoration: none; font-size: 12px; font-weight: 500;
    transition: all 0.2s; justify-content: center;
    white-space: nowrap; overflow: hidden;
}
.nav-sidebar.expanded .sb-link { padding: 6px 12px; justify-content: flex-start; }
.sb-link:hover { background: rgba(255,255,255,0.06); color: var(--text, #fff); }
.sb-link.active { color: #FF3B3B; }
.sb-link .link-icon { font-size: 16px; width: 20px; text-align: center; flex-shrink: 0; display: flex; align-items: center; justify-content: center; }
.sb-link-text { display: none; }
.nav-sidebar.expanded .sb-link-text { display: inline; }

/* ---------- tournament items ---------- */
.sb-t-item {
    display: flex; align-items: center; gap: 10px; padding: 8px 0;
    border-radius: 8px; cursor: pointer; transition: all 0.2s;
    margin-bottom: 2px; justify-content: center;
}
.nav-sidebar.expanded .sb-t-item { padding: 8px 12px; justify-content: flex-start; }
.sb-t-item:hover { background: rgba(255,255,255,0.06); }

.sb-dot { width: 12px; height: 12px; border-radius: 50%; flex-shrink: 0; }
.nav-sidebar.expanded .sb-dot { width: 8px; height: 8px; }
.sb-dot.live { background: var(--red, #FF1744); box-shadow: 0 0 8px var(--red, #FF1744); animation: sb-pulse 2s infinite; }
.sb-dot.checkin { background: var(--orange, #FFAB00); box-shadow: 0 0 6px var(--orange, #FFAB00); }
.sb-dot.open { background: var(--green, #00E676); }
.sb-dot.completed { background: var(--text-muted, #666); }

@keyframes sb-pulse { 0%,100% { opacity:1; } 50% { opacity:0.5; } }

.sb-t-info { flex: 1; min-width: 0; display: none; }
.nav-sidebar.expanded .sb-t-info { display: block; }
.sb-t-name { font-size: 13px; font-weight: 600; color: var(--text, #fff); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sb-t-meta { font-size: 10px; color: var(--text-muted, #666); margin-top: 1px; }

.sb-t-status {
    font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px;
    flex-shrink: 0; padding: 2px 6px; border-radius: 4px; display: none;
}
.nav-sidebar.expanded .sb-t-status { display: inline-block; }
.sb-t-status.live { color: var(--red, #FF1744); background: rgba(255,23,68,0.12); }
.sb-t-status.checkin { color: var(--orange, #FFAB00); background: rgba(255,171,0,0.12); }
.sb-t-status.open { color: var(--green, #00E676); background: rgba(0,230,118,0.12); }
.sb-t-status.completed { color: var(--text-muted, #666); background: rgba(255,255,255,0.05); }

/* ---------- empty / loading ---------- */
.sb-empty {
    color: var(--text-muted, #666); font-size: 12px; padding: 8px 4px;
    font-style: italic; text-align: center; white-space: nowrap; overflow: hidden;
}
.nav-sidebar.expanded .sb-empty { padding: 8px 12px; text-align: left; }

/* ---------- projects footer ---------- */
.sb-projects { flex-shrink: 0; padding: 8px 0 12px; border-top: 1px solid var(--border, #222); }

.sb-projects .sb-section-title {
    text-transform: none; letter-spacing: 0.3px; font-size: 9px; color: #444;
}

.sb-link-desc {
    font-size: 9px; color: rgba(255,255,255,0.35); line-height: 1.2; display: none;
}
.nav-sidebar.expanded .sb-link-desc { display: block; }

.sb-link .link-text-wrap { display: flex; flex-direction: column; gap: 1px; }
