.context-menu {
    position: absolute;
    top: 0;
    left: 0;
    width: 300px;
    height: 100%;
    background: var(--lumina-bg-elevated);
    border-right: 1px solid var(--lumina-border);
    z-index: 20;
    transform: translateX(-100%);
    transition: transform 0.3s ease;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 2px;
    overflow-y: auto;
}

.context-menu.context-menu--portaled {
    position: fixed;
    top: 0;
    left: 0;
    height: 100dvh;
    z-index: 10001;
    box-shadow: var(--lumina-shadow-lg);
}

.context-menu-spacer {
    flex: 1 1 auto;
    min-height: 12px;
}

.context-menu-footer {
    flex-shrink: 0;
    margin-top: auto;
    padding-top: 8px;
    border-top: 1px solid var(--lumina-border);
}

.context-donations {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 14px 8px;
    padding-bottom: max(14px, env(safe-area-inset-bottom));
    font-size: 14px;
    font-weight: 500;
    color: #c9a227;
    text-decoration: none;
    border-radius: 8px;
    transition: background 0.2s, color 0.2s;
    box-sizing: border-box;
}

.context-donations svg {
    flex-shrink: 0;
    color: #c9a227;
}

.context-donations:hover {
    background: rgba(201, 162, 39, 0.12);
    color: #dbb84a;
}

.context-donations:hover svg {
    color: #dbb84a;
}

.context-menu.open {
    transform: translateX(0);
}

.context-profile {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 4px 16px;
    cursor: default;
}

.context-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--lumina-gradient-avatar);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 18px;
    flex-shrink: 0;
}

.context-fullname {
    font-size: 15px;
    font-weight: 600;
}

.context-username {
    font-size: 13px;
    color: var(--lumina-text-muted);
}

.context-divider {
    height: 1px;
    background: var(--lumina-border);
    margin: 6px 0;
}

.context-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 8px;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.2s;
    font-size: 14px;
    color: var(--lumina-text);
    pointer-events: auto;
}

.context-item svg {
    color: var(--lumina-text-muted);
    flex-shrink: 0;
}

.context-item .lumina-icon--themed {
    opacity: 0.88;
}

.context-item img[src*="kristall"] {
    filter: none !important;
    opacity: 1;
}

.context-item:hover {
    background: var(--lumina-bg-hover);
}

.context-item:active {
    background: var(--lumina-bg-active);
}

.context-item-danger span {
    color: var(--lumina-danger);
}

.context-item-static {
    pointer-events: none;
    cursor: default;
}

.context-item-static:hover {
    background: transparent;
}

.context-item-theme {
    cursor: default;
}

.context-item-theme:hover {
    background: transparent;
}

.context-item-expandable .expand-arrow {
    margin-left: auto;
    transition: transform 0.3s ease;
}

.context-item-expandable.open .expand-arrow {
    transform: rotate(180deg);
}

.context-submenu {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.context-submenu.open {
    max-height: 120px;
}

.context-subitem {
    padding-left: 40px;
    pointer-events: auto;
}

.context-item .toggle-switch {
    margin-left: auto;
    pointer-events: auto;
}

.context-overlay {
    position: fixed;
    inset: 0;
    left: 300px;
    width: auto;
    height: 100%;
    background: transparent;
    z-index: 10000;
    pointer-events: none;
    transition: background 0.28s ease;
}

.context-overlay.show {
    background: var(--lumina-overlay-menu);
    pointer-events: auto;
}

@media (max-width: 768px) {
    .context-overlay {
        left: 0;
        width: 100%;
    }
}

.context-profile {
    cursor: pointer;
    border-radius: 8px;
    transition: background 0.2s;
}

.context-profile:hover {
    background: var(--lumina-bg-hover);
}
