/* ========================================
   navigation.css - Product UI left menu sidebar
   .pu- scoped namespace, additive only
   ======================================== */

/* ---- Sidebar shift for authenticated views ---- */
body.pu-has-sidebar .view.active:not(#view-login) {
    left: 240px;
    width: calc(100% - 240px);
}

/* ---- Left Menu Sidebar ---- */
.pu-left-menu {
    display: none;
    position: fixed;
    left: 0;
    top: 0;
    width: 240px;
    height: 100vh;
    background: var(--surface-dark);
    color: var(--on-dark);
    flex-direction: column;
    z-index: var(--z-sticky);
    overflow-y: auto;
    font-family: var(--font-body);
}

body.pu-has-sidebar .pu-left-menu {
    display: flex;
}

/* ---- Menu Header ---- */
.pu-menu-header {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-lg) var(--space-md);
    border-bottom: 1px solid rgba(255,255,255,0.08);
}

.pu-menu-logo {
    font-size: 22px;
    line-height: 1;
}

.pu-menu-brand {
    font-size: var(--text-label-md);
    font-weight: 600;
    color: var(--on-dark);
}

/* ---- Menu Navigation ---- */
.pu-menu-nav {
    flex: 1;
    padding: var(--space-sm);
}

/* ---- Menu Item ---- */
.pu-menu-item {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    padding: 10px var(--space-md);
    margin-bottom: 2px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: background var(--transition-fast);
    font-size: var(--text-body-md);
    color: rgba(255,255,255,0.65);
    user-select: none;
}

.pu-menu-item:hover:not(.pu-menu-item--disabled) {
    background: rgba(255,255,255,0.08);
    color: rgba(255,255,255,0.9);
}

.pu-menu-item--active {
    background: rgba(255,255,255,0.12);
    color: var(--on-dark);
    font-weight: 500;
}

.pu-menu-item--disabled {
    cursor: default;
    opacity: 0.4;
}

.pu-menu-item--disabled:hover {
    background: none;
}

/* ---- Menu Item Parts ---- */
.pu-menu-item-icon {
    font-size: 16px;
    width: 22px;
    height: 22px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    flex-shrink: 0;
    color: inherit;
}

.pu-menu-item-icon svg {
    width: 18px;
    height: 18px;
    display: block;
}

.pu-menu-item:hover:not(.pu-menu-item--disabled) .pu-menu-item-icon,
.pu-menu-item--active .pu-menu-item-icon {
    color: var(--on-dark, #ffffff);
    opacity: 0.9;
}

.pu-menu-item-label {
    flex: 1;
}

.pu-menu-item-badge {
    font-size: 10px;
    background: rgba(255,255,255,0.1);
    padding: 1px 6px;
    border-radius: var(--radius-pill);
    white-space: nowrap;
    color: rgba(255,255,255,0.4);
}

/* ---- Menu Footer ---- */
.pu-menu-footer {
    padding: var(--space-md);
    border-top: 1px solid rgba(255,255,255,0.08);
    text-align: center;
}

.pu-menu-version {
    font-size: var(--text-small);
    color: rgba(255,255,255,0.25);
}
