/* ==================================================
   CODEX BODY
   ================================================== */

#codex-body {
    display: flex;

    height: calc(100vh - var(--searchbar-height));

    overflow: hidden;
}


/* ==================================================
   SIDEBAR CONTAINER
   ================================================== */

#sidebar-container {
    width: var(--sidebar-width);
    flex-shrink: 0;

    height: 100%;

    background: var(--color-surface);
    border-right: 1px solid var(--color-border-light);

    overflow-y: auto;
}


.sidebar {
    width: 100%;
    height: 100%;

    padding: 30px 18px;
}


/* ==================================================
   SIDEBAR SECTIONS
   ================================================== */

.sidebar-section {
    display: flex;
    flex-direction: column;
    gap: 3px;
}


.sidebar-label {
    margin: 0 12px 12px;

    color: var(--color-gold-faint);

    font-family: var(--font-display);
    font-size: 10px;
    font-weight: 600;

    letter-spacing: 2.5px;
}


/* ==================================================
   SIDEBAR ITEMS
   ================================================== */

.sidebar-item {
    position: relative;

    display: flex;
    align-items: center;

    width: 100%;
    min-height: 42px;

    padding: 0 12px;

    border: none;
    border-radius: 3px;

    background: transparent;

    color: var(--color-text-muted);

    font-family: var(--font-body);
    font-size: 14px;

    text-align: left;

    cursor: pointer;

    transition:
        color var(--transition-fast),
        background-color var(--transition-fast);
}


.sidebar-item:hover {
    background: var(--color-surface-hover);
    color: var(--color-text);
}


.sidebar-item:active {
    background: var(--color-surface-hover);
}


/* ==================================================
   SIDEBAR ICONS
   ================================================== */

.sidebar-item-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    width: 25px;
    margin-right: 8px;

    color: var(--color-gold-faint);

    font-size: 15px;

    transition:
        color var(--transition-fast),
        transform var(--transition-fast);
}


.sidebar-item:hover .sidebar-item-icon {
    color: var(--color-gold-light);
    transform: translateX(1px);
}


/* ==================================================
   ACTIVE SIDEBAR ITEM
   ================================================== */

.sidebar-item.active {
    background: var(--color-surface-hover);
    color: var(--color-text);
}


.sidebar-item.active::before {
    content: "";

    position: absolute;

    left: 0;
    top: 8px;
    bottom: 8px;

    width: 2px;

    background: var(--color-gold);
}


.sidebar-item.active .sidebar-item-icon {
    color: var(--color-gold-light);
}


/* ==================================================
   DIVIDER
   ================================================== */

.sidebar-divider {
    width: calc(100% - 24px);

    height: 1px;

    margin: 24px 12px;

    background: var(--color-border);
}