/* contextmenu.css — Right-click / long-press popover menu */

.ctx-menu {
  position: fixed;
  z-index: 10000;
  min-width: 220px;
  max-width: 280px;
  background: var(--bg-card, #1f1f24);
  border: 1px solid var(--border, rgba(255,255,255,.1));
  border-radius: 12px;
  padding: 6px 0;
  box-shadow: 0 12px 40px rgba(0, 0, 0, .5), 0 2px 8px rgba(0, 0, 0, .3);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  user-select: none;
  -webkit-user-select: none;
  overflow: hidden;
}

@keyframes ctxFadeIn {
  from { opacity: 0; transform: scale(.96); }
  to   { opacity: 1; transform: scale(1); }
}

@media (prefers-reduced-motion: no-preference) {
  .ctx-menu { animation: ctxFadeIn .12s ease-out; }
}

.ctx-menu-title {
  padding: 8px 14px 4px;
  font-size: 11px;
  color: var(--text-muted, #888);
  text-transform: uppercase;
  letter-spacing: .04em;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  border-bottom: 1px solid var(--border, rgba(255,255,255,.08));
  margin-bottom: 4px;
}

.ctx-menu-item {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 9px 14px;
  border: none;
  background: transparent;
  color: var(--text, #e6e6e6);
  font-size: 13px;
  text-align: left;
  cursor: pointer;
  transition: background .12s;
  font-family: inherit;
}

.ctx-menu-item:hover:not(:disabled),
.ctx-menu-item:focus:not(:disabled) {
  background: rgba(255, 255, 255, .07);
  outline: none;
}

.ctx-menu-item:active:not(:disabled) {
  background: rgba(255, 255, 255, .12);
}

.ctx-menu-icon {
  width: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  color: var(--text-muted, #aaa);
  flex-shrink: 0;
}

.ctx-menu-label {
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ctx-menu-danger {
  color: #ef4444;
}
.ctx-menu-danger .ctx-menu-icon { color: #ef4444; }

.ctx-menu-disabled,
.ctx-menu-item:disabled {
  opacity: .45;
  cursor: not-allowed;
}

.ctx-menu-divider {
  height: 1px;
  background: var(--border, rgba(255, 255, 255, .08));
  margin: 4px 0;
}

/* Mobile: larger touch targets */
@media (max-width: 640px) {
  .ctx-menu {
    min-width: 240px;
    max-width: calc(100vw - 24px);
  }
  .ctx-menu-item {
    padding: 12px 16px;
    font-size: 14px;
  }
}
