/* ===== Radial Menu (v2 — Stacked Button List) ===== */

/* Fade overlay — applied to the sheet container when menu is active */
.radial-active .proagri-sheet-row {
  opacity: 0.15;
  transition: opacity 0.2s ease;
  pointer-events: none;
}

.radial-active .proagri-sheet-header {
  opacity: 0.15;
  transition: opacity 0.2s ease;
  pointer-events: none;
}

.radial-active .proagri-sheet-row.radial-row-active {
  opacity: 1;
  pointer-events: auto;
}

/* Trigger icon — the ⋯ button on the right side of each row */
.radial-trigger {
  width: 28px;
  height: 28px;
  padding: 4px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(128, 128, 128, 0.1);
  border: 1px solid transparent;
  border-radius: 6px;
  color: var(--text-muted);
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
  z-index: 2;
}

@media (hover: hover) {
  .radial-trigger:hover {
    background: rgba(245, 166, 35, 0.2);
    border-color: rgba(245, 166, 35, 0.4);
    color: var(--color-accent-light);
  }
}

/* Trigger active state — stays highlighted while menu is open */
.radial-trigger.radial-trigger-active {
  background: rgba(245, 166, 35, 0.25);
  border-color: rgba(245, 166, 35, 0.5);
  color: var(--color-accent-light);
}

/* Stacked menu container — positioned to the left of the trigger */
.radial-stack-menu {
  position: absolute;
  right: 40px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 10;
  display: flex;
  flex-direction: column;
  gap: 0;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.15s ease;

  /* Generous padding so mouse doesn't fall into gaps */
  padding: 6px;
  border-radius: 12px;
  background: var(--card-bg, rgba(30, 30, 30, 0.85));
  border: 1px solid var(--border-color, rgba(128, 128, 128, 0.2));
  backdrop-filter: blur(12px);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3), 0 2px 8px rgba(0, 0, 0, 0.2);
}

.radial-stack-menu.radial-stack-visible {
  pointer-events: auto;
  opacity: 1;
}

/* Individual action buttons */
.radial-stack-btn {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  width: 100%;
  min-width: 160px;
  padding: 10px 16px;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: var(--text-secondary, #aaa);
  font-size: 12px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.12s ease, color 0.12s ease;
  text-align: left;

  /* Stagger-in animation */
  opacity: 0;
  transform: translateX(8px);
  animation: radialStackIn 0.2s ease forwards;
}

.radial-stack-btn:hover {
  background: rgba(245, 166, 35, 0.15);
  color: var(--color-accent-light, #f5a623);
}

.radial-stack-btn:active {
  background: rgba(245, 166, 35, 0.25);
}

/* Highlighted action (e.g., "Next Step") */
.radial-stack-btn.radial-stack-btn-highlight {
  color: #3498db;
}

.radial-stack-btn.radial-stack-btn-highlight:hover {
  background: rgba(52, 152, 219, 0.15);
  color: #5dade2;
}

.radial-stack-btn.radial-stack-btn-highlight:active {
  background: rgba(52, 152, 219, 0.25);
}

/* Divider between buttons (subtle) */
.radial-stack-btn + .radial-stack-btn {
  border-top: 1px solid rgba(128, 128, 128, 0.1);
}

/* Stagger-in keyframe */
@keyframes radialStackIn {
  from {
    opacity: 0;
    transform: translateX(8px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* Mobile Phase 1 — touch-target minimum for the radial trigger. */
@media (max-width: 768px) {
  .radial-trigger {
    width: 36px;
    height: 36px;
    padding: 6px;
  }
}
