/* /src/menu.css — FULL PATCHED VERSION */
/* Radial menu — DnD-safe and accessible */

/* Visual feedback when a menu item is dragged over a menu widget body */
.menu-widget-body.menu-drop-active {
  outline: 2px dashed #0b57d0;
  background: #eff6ff !important;
}

.radial-menu {
  --btn-size: 64px;
  --size: var(--btn-size);
  --gap: 10px;
  --clearance: 26px;
  --bg: #fff;
  --icon: #0b57d0;
  --shadow: 0 6px 18px rgba(0,0,0,0.16);
  --icon-size: 18px;

  --step: calc(var(--size) + var(--gap));
  --start: calc((var(--btn-size)/2) + var(--clearance) + (var(--size)/2));

  position: fixed;
  z-index: 10002;
  pointer-events: none;
}

.radial-open.radial-menu {
  pointer-events: auto;
}

.radial-stack {
  position: absolute;
  left: 0;
  top: 0;
  transform: translate(-50%, -50%);
}

.radial-item {
  position: absolute;
  left: 0; top: 0;
  width: var(--size);
  height: var(--size);
  border-radius: 16px;
  background: var(--bg);
  box-shadow: var(--shadow);
  color: var(--icon);
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, -50%) scale(.9);
  transition: transform .18s ease, opacity .18s ease;
}

.ri-cell {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  height: 100%;
  width: 100%;
  line-height: 1;
  pointer-events: none;
}

.ri-cell i {
  font-size: var(--icon-size);
}

.ri-label {
  font: 500 10px system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color: #344054;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: calc(100% - 8px);
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.radial-open .radial-item {
  opacity: 1;
  pointer-events: auto;
  --y: calc(var(--start) + var(--i) * var(--step));
  transform: translate(-50%, calc(-50% - var(--y))) scale(1);
}

@media (prefers-reduced-motion: reduce) {
  .radial-item {
    transition: none;
  }
}