/**
 * AFSNote - Context Menu Styles
 * Custom right-click / long-press menu
 */

.context-menu {
    position: fixed;
    z-index: 2000;
    min-width: 180px;
    background: var(--surface-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow), 0 8px 32px rgba(0, 0, 0, 0.2);
    padding: 6px 0;
    opacity: 0;
    transform: scale(0.95);
    transform-origin: top left;
    transition: opacity 150ms ease, transform 150ms ease;
    pointer-events: none;
    overflow: hidden;
}

.context-menu.show {
    opacity: 1;
    transform: scale(1);
    pointer-events: auto;
}

.context-menu-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 16px;
    color: var(--text);
    font-size: 14px;
    cursor: pointer;
    transition: background var(--transition-fast);
    user-select: none;
    -webkit-user-select: none;
}

.context-menu-item:hover {
    background: var(--divider);
}

.context-menu-item:active {
    background: var(--accent);
    color: white;
}

.context-menu-item:active svg {
    stroke: white;
}

.context-menu-item svg {
    width: 16px;
    height: 16px;
    stroke: var(--text-secondary);
    flex-shrink: 0;
}

.context-menu-item.disabled {
    opacity: 0.4;
    pointer-events: none;
}

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

.context-menu-item.danger svg {
    stroke: var(--danger);
}

.context-menu-item.danger:active {
    background: var(--danger);
    color: white;
}

.context-menu-item.danger:active svg {
    stroke: white;
}

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

/* Keyboard shortcut hint */
.context-menu-shortcut {
    margin-left: auto;
    font-size: 12px;
    color: var(--text-secondary);
    opacity: 0.7;
}

/* Mobile touch feedback */
@media (hover: none) {
    .context-menu-item:hover {
        background: transparent;
    }
    
    .context-menu-item:active {
        background: var(--accent);
        color: white;
    }
}

/* Backdrop for mobile to close menu */
.context-menu-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1999;
    display: none;
}

.context-menu-backdrop.show {
    display: block;
}
