/* Context Menu Component */
.context-menu {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  z-index: var(--layer-modal);
}

.context-menu__trigger {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: transparent;
  border: 1px solid var(--surface-3);
  border-radius: 50%;
  color: var(--text-2);
  cursor: pointer;
  transition: all 0.2s ease;
}

.context-menu__trigger:hover {
  background: var(--surface-2);
  border-color: var(--surface-4);
  color: var(--text-1);
}

.context-menu__trigger:focus {
  outline: none;
  border-color: var(--brand-primary);
  box-shadow: 0 0 0 3px rgba(var(--brand-primary-rgb), 0.1);
}

.context-menu__trigger svg {
  width: 20px;
  height: 20px;
}

.context-menu__dropdown {
  position: absolute;
  top: 100%;
  right: 0;
  min-width: 160px;
  background: var(--surface-1);
  border: 1px solid var(--surface-3);
  border-radius: var(--radius-2);
  box-shadow: var(--shadow-3);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: all 0.2s ease;
  z-index: 1000;
  margin-top: var(--size-1);
}

.context-menu__dropdown--open {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.context-menu__item {
  display: flex;
  align-items: center;
  gap: var(--size-2);
  width: 100%;
  padding: var(--size-2) var(--size-3);
  background: transparent;
  border: none;
  color: var(--text-1);
  font-size: var(--font-size-1);
  text-decoration: none;
  cursor: pointer;
  transition: all 0.2s ease;
  border-radius: 0;
}

.context-menu__item:first-child {
  border-top-left-radius: var(--radius-2);
  border-top-right-radius: var(--radius-2);
}

.context-menu__item:last-child {
  border-bottom-left-radius: var(--radius-2);
  border-bottom-right-radius: var(--radius-2);
}

.context-menu__item:hover {
  background: var(--surface-2);
  color: var(--text-1);
  text-decoration: none;
}

.context-menu__item:focus {
  outline: none;
  background: var(--surface-2);
}

.context-menu__item--danger {
  color: var(--red-6);
}

.context-menu__item--danger:hover {
  background: var(--red-1);
  color: var(--red-7);
}

.context-menu__item svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.context-menu__item span {
  white-space: nowrap;
}

/* Admin header adjustments */
.admin-header {
  display: block;
  margin-bottom: var(--size-4);
}

.admin-header__actions {
  display: flex;
  align-items: center;
  width: min(95%, var(--size-page));
  margin-inline: auto;
}

/* Mobile adjustments */
@media (max-width: 768px) {
  .context-menu__dropdown {
    right: 0;
    left: auto;
    min-width: 140px;
  }
}