.menu-wrap {
  display: inline-block;
  position: relative;

  &.variant-right {
    float: right;
  }
}

td .menu-wrap {
  position: absolute;
  right: 0.5rem;
  top: 50%;
  transform: translateY(-50%);
}

tr:has(.menu:not(.hidden)) {
  position: relative;
  z-index: 50;
}

.actions-cell:has(.menu:not(.hidden)) {
  position: relative;
  z-index: 50;
}

.menu-trigger {
  align-items: center;
  background: transparent;
  border-radius: 9999px;
  border: none;
  cursor: pointer;
  display: inline-flex;
  height: 28px;
  justify-content: center;
  padding: 0;
  position: relative;
  transition: background 0.2s ease-in-out;
  width: 28px;

  svg {
    fill: var(--dark-text);
    height: 1.2rem;
    width: 1.2rem;
  }
}

.menu-trigger:hover {
  background: #f9fafb
}

.menu-trigger:active {
  transform: translateY(0.5px)
}

.menu-trigger:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(99, 102, 241, .25)
}

.menu {
  background: #fff;
  border-radius: .5rem;
  border: 1px solid #e5e7eb;
  box-shadow: 0 4px 12px rgba(0, 0, 0, .08);
  margin-top: .5rem;
  min-width: 10rem;
  position: absolute;
  right: -.5rem;
  top: 100%;
}

.menu.hidden {
  display: none;
}

.menu-item {
  align-items: center;
  background: none;
  border: 0;
  cursor: pointer;
  display: flex;
  font-size: .875rem;
  font-weight: 500;
  gap: .5rem;
  padding: .5rem .75rem;
  text-align: left;
  width: 100%;
  transition: background 0.2s ease-in-out, text-decoration 0.2s ease-in-out;
}

.menu-item:hover {
  background: #f5f5f5;
}

.menu-arrow {
  position: absolute;
  right: 1rem;
  top: -6px;
  width: 0;
  height: 0;
  border-left: 6px solid transparent;
  border-right: 6px solid transparent;
  border-bottom: 6px solid #fff;
  filter: drop-shadow(0 -1px 0 #e5e7eb);
}
