/* SIDEBAR.css */

/* ─── SIDEBAR ──────────────────────────────────────────── */

#sidebar {
    height: 100vh;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    background: var(--c2);         /* c2 = mais escuro que o editor, como Discord */
    border-right: 1px solid var(--border-dim);
    position: relative;
    z-index: 1;
}

/* ─── TABS ──────────────────────────────────────────────── */

#sidebar-tabs {
    display: flex;
    align-items: center;
    gap: 2px;
    padding: 12px 8px 8px;
    flex-shrink: 0;
    border-bottom: 1px solid var(--border-dim);
}

.sidebar-tab {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;

    padding: 6px 8px;
    border: none;
    border-radius: 4px;

    background: transparent;
    color: var(--text-muted);
    font-size: 11px;
    font-family: var(--font-ui);
    font-weight: var(--fw-semi);
    letter-spacing: 0.02em;
    text-transform: uppercase;

    cursor: pointer;
    transition:
        color       var(--t-fast) var(--ease-out),
        background  var(--t-fast) var(--ease-out);
}

.sidebar-tab svg {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
}

.sidebar-tab span {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sidebar-tab:hover {
    color: var(--text-dim);
    background: var(--accent-muted);
}

.sidebar-tab.active {
    color: var(--accent);
    background: var(--accent-muted);
}

/* ─── CONTENT ───────────────────────────────────────────── */

#sidebar-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    scrollbar-width: thin;
    padding: 4px 6px 12px;
}

#sidebar-items {
    display: flex;
    flex-direction: column;
    gap: 1px;
    animation: fadeInUp var(--t-slow) var(--ease-out) both;
}

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(6px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ─── CATEGORY — cabeçalho de grupo ────────────────────── */

.sd-category {
    padding: 20px 8px 5px;
    font-size: 10px;
    font-family: var(--font-ui);
    font-weight: var(--fw-bold);        /* 700 — mais destaque que os itens */
    letter-spacing: 0.10em;
    text-transform: uppercase;
    color: var(--text-faint);
    user-select: none;
}

.sd-category:first-child {
    padding-top: 12px;
}

/* ─── CHANNEL — item clicável ───────────────────────────── */

.sd-channel {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 6px;

    padding: 4px 8px;
    border: none;
    border-radius: 4px;

    background: transparent;
    color: var(--text-muted);          /* mais apagado quando inativo */
    font-size: 14px;
    font-family: var(--font-ui);
    font-weight: var(--fw-medium);     /* 500 — peso único para todos os canais */

    cursor: pointer;
    transition:
        background  var(--t-fast) var(--ease-out),
        color       var(--t-fast) var(--ease-out);
}

.sd-channel-icon {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    color: var(--text-faint);
    transition: color var(--t-fast) var(--ease-out);
    flex-shrink: 0;
}

.sd-channel span {
    flex: 1;
    text-align: left;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.3;
}

.sd-channel-badge {
    font-size: 10px;
    font-weight: var(--fw-bold);
    background: var(--danger);
    color: #fff;
    border-radius: 8px;
    padding: 1px 5px;
    line-height: 1.5;
    flex-shrink: 0;
}

.sd-channel:hover {
    background: var(--s2);
    color: var(--text);
}

.sd-channel:hover .sd-channel-icon {
    color: var(--text-dim);
}

.sd-channel.sd-channel-active {
    background: var(--accent-glow);
    color: var(--text-bright);         /* mais brilhante */
    font-weight: var(--fw-semi);       /* 600 quando ativo — diferencia */
}

.sd-channel.sd-channel-active .sd-channel-icon {
    color: var(--accent);
}

/* ─── SEPARADOR FINO ────────────────────────────────────── */

.sd-divider {
    height: 1px;
    background: var(--border-dim);
    margin: 6px 8px;
}