.actions-flyout-menu {
  position: relative;
  display: inline-block;
}

/* Hidden by default (now safe because JS no longer uses popover/body portal) */
.actions-menu-content {
  display: none;
  position: absolute;
  background-color: white;
  min-width: max-content;
  white-space: nowrap;
  padding: 4px 0;
  /* your placement */
  left: -10rem; /* right edge sits left of the button */
  top: 100%; /* under the button; adjust if you prefer */
  z-index: 1000;
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(0, 0, 0, 0.08);
  max-height: 60vh;
  overflow-y: auto;
}

/* Show on hover OR when JS adds .is-open */
.actions-flyout-menu:hover .actions-menu-content,
.actions-flyout-menu.is-open .actions-menu-content {
  display: block;
}

/* rest of your item styling preserved */
.actions-menu-content a {
  /* … */
}
.actions-flyout-menu .actions-menu-toggle:focus {
  outline: 2px solid #005ea2;
  outline-offset: 2px;
}

.actions-menu-content a {
  color: #1b1b1b;
  padding: 12px 16px;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 0.3rem;
  width: 100%;
}
.actions-menu-content a .action-icon {
  padding-top: 6px;
}
.actions-menu-content a:hover {
  background-color: #f0f0f0;
}
.actions-menu-content {
  min-width: 12rem; /* JS will reduce width if space is tight */
  background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.08);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  padding: 0.25rem 0;
  max-height: 60vh; /* JS may override */
  overflow-y: auto;
}

.actions-menu-content .action-link {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  padding: 0.5rem 0.75rem;
  text-decoration: none;
}
.actions-menu-content .action-link:hover {
  background: #f3f3f3;
}
.actions-menu-content {
  min-width: 14rem;
  background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.08);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  padding: 0.25rem 0;
  /* the JS sets max-height & overflow-y, but set safe defaults */
  max-height: 60vh;
  overflow-y: auto;
}
.usa-table-container--scrollable {
  padding: 2rem 0 !important;
}
.review-list .usa-table-container--scrollable {
  overflow-y: unset !important;
}
.actions-flyout-menu .actions-menu-toggle:focus {
  outline: 2px solid #005ea2;
  outline-offset: 2px;
}
