/* ═══════════════════════════════════════════════════════════
   <side-nav> – custom element wrapper
   ═══════════════════════════════════════════════════════════ */
side-nav {
    display: contents;   /* lets inner .side-nav control layout */
}

/* ═══════════════════════════════════════════════════════════
   .side-nav – the actual navigation rail
   ═══════════════════════════════════════════════════════════ */
.side-nav {
    /* Hidden by default (mobile‑first) */
    display: none;

    /* Fixed positioning – full height, stuck to left edge */
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    height: 100vh;

    /* Appearance & layout */
    flex-direction: column;
    align-items: center;
    padding: 28px 0 24px;
    background: var(--sidebg);
    border-right: 1px solid var(--brd);
    width: 70px;
    flex-shrink: 0;
    gap: 2px;
    z-index: 30;
    transition: background .3s, border-color .3s;
}

/* ---- Logo ---- */
.side-logo {
    font-size: 20px;
    font-weight: 900;
    color: var(--p);
    margin-bottom: 20px;
    letter-spacing: -1px;
    cursor: pointer;
}
.side-logo a {
    color: inherit;
    text-decoration: none;
}

/* ---- Navigation buttons ---- */
.side-btn {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background .15s, transform .1s;
    background: none;
    border: none;
    position: relative;
    gap: 3px;
    color: inherit;
    text-decoration: none;
}
.side-btn:hover {
    background: var(--pdim);
    transform: scale(1.04);
}
.side-btn svg {
    width: 22px;
    height: 22px;
    fill: none;
    stroke: var(--muted);
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
    transition: stroke .15s;
}
.side-btn span {
    font-size: 8px;
    color: var(--muted2);
    font-weight: 600;
}
.side-btn.active svg {
    stroke: var(--p);
}
.side-btn.active span {
    color: var(--p);
}
.side-btn .side-badge {
    position: absolute;
    top: 7px;
    right: 7px;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--p);
    border: 1.5px solid var(--sidebg);
}

/* ---- Spacer ---- */
.side-gap {
    flex: 1;
}

/* ---- Avatar ---- */
.side-av {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid transparent;
    background: linear-gradient(135deg, #1a1035, #3b1a6b);
}
.side-btn.active .side-av {
    border-color: var(--p);
}

/* ---- "Add post" floating button ---- */
.side-nav .add-post-btn {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--p);
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 10px var(--pglow);
    transform: translateY(-2px);
    flex-shrink: 0;
    transition: transform .15s, box-shadow .15s;
}
.side-nav .add-post-btn:active {
    transform: translateY(-2px) scale(.92);
}
.side-nav .add-post-btn svg {
    width: 22px;
    height: 22px;
    stroke: #fff;
    fill: none;
    stroke-width: 2.5;
    stroke-linecap: round;
}

/* ═══════════════════════════════════════════════════════════
   RESPONSIVE – show side nav on tablets & up
   ═══════════════════════════════════════════════════════════ */
@media (min-width: 768px) {
    .side-nav {
        display: flex;          /* become visible */
    }
    body {
        padding-left: 70px;     /* offset main content so it doesn't hide under the fixed nav */
    }
}

@media (min-width: 1024px) {
    .side-nav {
        width: 82px;            /* slightly wider on large screens */
    }
}
