/**
 * ═══════════════════════════════════════════════════════════════
 * Akira Settings — Sidebar Styles
 * ═══════════════════════════════════════════════════════════════
 */

/* ── Sidebar Container ────────────────────────────────────────── */
.aks-sidebar {
    width: 240px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    background: var(--bg-sidebar);
    border-right: 1px solid var(--border);
    overflow: hidden;
}

.aks-sidebar-header {
    padding: 24px 20px 12px;
    flex-shrink: 0;
}

.aks-sidebar-header h2 {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.02em;
}

/* ── Navigation Items ─────────────────────────────────────────── */
.aks-sidebar-nav {
    flex: 1;
    overflow-y: auto;
    padding: 4px 10px;
    overscroll-behavior: contain;
}

.aks-sidebar-nav::-webkit-scrollbar {
    width: 3px;
}

.aks-sidebar-nav::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 10px;
}

.aks-nav-item {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    margin-bottom: 2px;
    border: none;
    border-radius: 10px;
    background: transparent;
    color: var(--text-secondary);
    font-family: var(--font);
    font-size: 0.84rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.18s ease;
    text-align: left;
    outline: none;
    position: relative;
}

.aks-nav-item:hover {
    background: var(--bg-surface-hover);
    color: var(--text-primary);
}

.aks-nav-item:focus-visible {
    box-shadow: 0 0 0 2px var(--accent);
}

.aks-nav-item.active {
    background: var(--accent-soft);
    color: var(--accent);
    font-weight: 600;
}

.aks-nav-item.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 20px;
    border-radius: 0 3px 3px 0;
    background: var(--accent);
}

.aks-nav-icon {
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    flex-shrink: 0;
    line-height: 1;
}

.aks-nav-label {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ── Sidebar Footer ───────────────────────────────────────────── */
.aks-sidebar-footer {
    padding: 14px 20px;
    border-top: 1px solid var(--border);
    flex-shrink: 0;
}

.aks-sidebar-footer-text {
    font-size: 0.68rem;
    color: var(--text-muted);
    text-align: center;
    line-height: 1.4;
}

.aks-sidebar-footer-text span {
    color: var(--accent);
    font-weight: 600;
}

/* ── Mobile: Sidebar becomes horizontal tab bar ───────────────── */
@media (max-width: 700px) {
    .aks-sidebar {
        width: 100%;
        flex-direction: row;
        border-right: none;
        border-bottom: 1px solid var(--border);
        background: var(--bg-surface);
        overflow-x: auto;
        overflow-y: hidden;
    }

    .aks-sidebar-header {
        display: none;
    }

    .aks-sidebar-nav {
        display: flex;
        flex-direction: row;
        padding: 6px 8px;
        gap: 2px;
        overflow-x: auto;
        overflow-y: hidden;
        flex: 1;
    }

    .aks-sidebar-nav::-webkit-scrollbar {
        height: 0;
    }

    .aks-nav-item {
        flex-direction: column;
        gap: 3px;
        padding: 8px 14px;
        margin-bottom: 0;
        font-size: 0.68rem;
        white-space: nowrap;
        min-width: fit-content;
    }

    .aks-nav-item.active::before {
        display: none;
    }

    .aks-nav-item.active {
        border-bottom: 2px solid var(--accent);
        border-radius: 8px 8px 0 0;
    }

    .aks-nav-icon {
        font-size: 1.1rem;
    }

    .aks-sidebar-footer {
        display: none;
    }
}