ul {
  list-style: none;
  margin: -15px 1px;
  padding-inline-start: 0;
  position: absolute;
  background: linear-gradient(145deg, #ffffff, #dce3ed);
  border: 2px solid #0d47a1;
  border-radius: 16px;
  box-shadow:
    0 24px 0 #0d47a1,
    0 24px 32px rgba(0, 0, 0, 0.4);
  transform: rotateX(8deg);
  transform-style: preserve-3d;
  perspective: 600px;
  z-index: 10;
  animation: popupMenu 0.3s ease-out;
}

ul[role="menu"]::after {
  content: attr(aria-label);
  position: absolute;
  left: 50%;
  top: var(--menu-after-top, 97%);
  transform: translate(-50%, 10px) skewX(-20deg);
  color: white;
  font-size: 24px;
  font-weight: bold;
  pointer-events: none;
  user-select: none;
  white-space: nowrap;
  text-shadow:
    0 2px 0 #0d47a1,
    0 4px 8px rgba(0, 0, 0, 0.5);
  z-index: -1;
  opacity: 1;
  transition: opacity 0.15s ease, transform 0.15s ease;
  will-change: opacity, transform;
}


@keyframes popupMenu {
  0% {
    opacity: 0;
    transform: rotateX(60deg) scale(0.9);
  }
  100% {
    opacity: 1;
    transform: rotateX(8deg) scale(1);
  }
}


li {
  padding: 10px 18px;
  cursor: pointer;
  text-align: center;
  text-wrap: nowrap;
  position: relative;
  display: flex;
  align-items: center;
  gap: 4px;
  transition: background 0.2s ease-in-out;

  &:hover {
    border-radius: 12px;
    background: #dbe4ff;
  }

  &:focus {
    outline: none;
    border-radius: 12px;
    background: #b6d4fe;
  }

  &:focus-visible {
    outline: 3px solid #007bff;
    outline-offset: 4px;
    border-radius: 12px;
    background: #e7f1ff;
  }
}

.submenu {
  position: absolute;
  left: 105%;
  top: 12px;
  display: block;
}

.disabled {
  color: #6c757d;
  cursor: not-allowed;
  pointer-events: none;
  background: none;
  opacity: 0.6;
}
