/* Egyedi jobbklikk-menü */

.context-menu {
  position: fixed;
  z-index: 3700;
  min-width: 196px;
  max-width: min(280px, calc(100vw - 20px));
  padding: 6px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface-elevated);
  box-shadow:
    0 4px 6px rgba(0, 0, 0, 0.12),
    0 16px 40px rgba(0, 0, 0, 0.35);
  animation: context-menu-in 0.16s var(--ease) both;
}

@keyframes context-menu-in {
  from {
    opacity: 0;
    transform: scale(0.96) translateY(-4px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.context-menu__item {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 8px 10px;
  border: none;
  border-radius: 6px;
  background: transparent;
  color: var(--text-primary);
  font-family: inherit;
  font-size: 13px;
  text-align: left;
  cursor: pointer;
  transition:
    background 0.12s var(--ease),
    color 0.12s var(--ease);
}

.context-menu__item:hover:not(:disabled),
.context-menu__item:focus-visible {
  outline: none;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-primary);
}

.context-menu__item:disabled {
  opacity: 0.38;
  cursor: not-allowed;
}

.context-menu__item--danger {
  color: #f87171;
}

.context-menu__item--danger:hover:not(:disabled),
.context-menu__item--danger:focus-visible {
  background: var(--red-dim);
  color: #fca5a5;
}

.context-menu__item--checked::before {
  content: "✓";
  display: inline-flex;
  width: 14px;
  font-size: 11px;
  font-weight: 700;
  color: var(--accent);
  flex-shrink: 0;
}

.context-menu__sep {
  height: 1px;
  margin: 5px 6px;
  background: var(--border);
}

html[data-theme="light"] .context-menu {
  background: #ffffff;
  box-shadow:
    0 2px 8px rgba(30, 58, 138, 0.08),
    0 12px 32px rgba(30, 58, 138, 0.14);
}

html[data-theme="light"] .context-menu__item:hover:not(:disabled),
html[data-theme="light"] .context-menu__item:focus-visible {
  background: #eff6ff;
  color: #1e3a5f;
}

html[data-theme="light"] .context-menu__item--danger:hover:not(:disabled),
html[data-theme="light"] .context-menu__item--danger:focus-visible {
  background: #fef2f2;
  color: #b91c1c;
}

@media (prefers-reduced-motion: reduce) {
  .context-menu {
    animation: none;
  }
}
