/*
  side-nav.css — STATIC marketing port of the app's realm side nav.
  Ported from supernova-desktop-application/css/realms/side-nav.css.

  Only change from the app: `top` is 57px instead of 55px, to sit flush under
  the marketing report topbar (14px padding x2 + 28px avatar + 1px border)
  rather than the app's own header.

  This is what the existing `left: 90px` content offsets in summary.css and
  match-history.css were always designed around — the demo pages previously
  had that gutter with nothing in it.
*/

.sidebar {
    --sb-w: 68px;
    /* collapsed width */
    width: var(--sb-w);
    background-color: var(--color-gray-200);
    box-sizing: border-box;
    overflow: hidden;
    height: 100vh;
    position: fixed;
    top: 57px;
    left: 0;
    z-index: 10;
    will-change: width;
    transition: width .5s cubic-bezier(.2, .6, .2, 1);
    border-right: 1px solid rgba(255, 255, 255, 0.06);
}

.sidebar.expanded {
    width: 224px;
    box-shadow: 18px 0 34px rgba(0, 0, 1, 0.3);
}

.nav-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    color: #A8AAAF;
    cursor: pointer;
    transition: background 0.4s;
    font-family: var(--font-work-sans);
    padding: 4px 24px;
    min-height: 42px;
    white-space: nowrap;
    position: relative;
}

.nav-item i.icon {
    background-size: contain;
    flex: 0 0 20px;
    height: 24px;
    width: 24px;
}

.nav-item span {
    display: none;
    font-size: 15px;
    min-width: 0;
    overflow: hidden;
    opacity: 0;
    transform: translateX(4px);
    transition: opacity .16s ease .08s, transform .16s ease .08s;
}

.sidebar.expanded .nav-item span {
    display: inline;
    left: 60px;
    position: absolute;
    opacity: 1;
    transform: none;
}

/* COLLAPSED state icon centering */
.sidebar:not(.expanded) .nav-item {
    justify-content: center;
}

.sidebar:not(.expanded) .nav-item span {
    display: none;
}

.nav-item.active {
    background-color: #2e2f35;
    color: #fff;
    box-shadow: inset 4px 0 0 #00d4ff;
}

.nav-item.active .icon {
    filter: grayscale(1) brightness(0) invert(1);
    /* -> white */
    opacity: 1;
}

.nav-item:hover {
    background-color: #24252C;
    color: white;
}

/* Not-yet-ported destinations (Heroes, News & Guides) */
.nav-item.is-disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.nav-item.is-disabled:hover {
    background-color: transparent;
    color: #A8AAAF;
}

.icon {
    display: inline-block;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
}

@media screen and (max-width: 768px) {

    /* Bottom nav container */
    .sidebar {
        width: 100vw;
        height: 60px;
        position: fixed;
        bottom: 0;
        top: auto;
        left: 0;
        right: 0;
        display: flex;
        align-items: center;
        justify-content: space-evenly;
        border-top: 1px solid var(--Charcoal);
        border-right: 0;
        background-color: var(--color-gray-200);
        z-index: 100;
        transition: none;
        box-shadow: 0 -8px 24px rgba(0, 0, 0, 0.35);
    }

    .sidebar:hover,
    .sidebar:focus-within {
        width: 100vw;
        height: 60px;
    }

    .nav-list {
        display: flex;
        flex-direction: row;
        align-items: center;
        justify-content: space-evenly;
        gap: 0;
        padding: 0px 20px 0px;
        margin: 0;
        width: 100%;
        font-size: 10px;
    }

    .sidebar .nav-item {
        flex: 1 1 0;
        min-width: 0;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 6px;
        padding: 10px 20px;
        border-left: 0;
    }

    /* Hide labels on mobile bottom bar (wins over expanded rules) */
    .sidebar .nav-item span,
    .sidebar.expanded .nav-item span {
        display: none !important;
        max-width: 0 !important;
        opacity: 0 !important;
        visibility: hidden !important;
    }

    /* Active: top stripe without layout shift */
    .nav-item.active {
        background-color: #2e2f35;
        color: #fff;
        box-shadow: inset 0 4px 0 #00d4ff;
    }
}

/* ══════════════════════════════════════════════════════════════════════════
   MARKETING-DEMO DEVIATION — stacking order

   The rail sits at z-index 10 in the app, which ties with the analytics page's
   .mode-tabs-row (analytics.css). On a tie the later element in the DOM wins,
   so the mode tabs painted over the rail as soon as it expanded on hover.
   40 clears every page-level control while staying under the sticky report
   topbar (report-shell.css, z-index 50) so the rail's expand shadow can't
   bleed over it.
   ══════════════════════════════════════════════════════════════════════════ */

.sidebar { z-index: 40; }

@media screen and (max-width: 768px) {
    /* Bottom bar keeps the app's higher value — it overlays page content. */
    .sidebar { z-index: 100; }
}
