/* =============================================================================
   spx-actionmenu.css — the ONE action menu (SMKK redesign component-library §4).
   A single "Actions ▾" trigger opens a flat menu of a record's verbs — replaces the
   scattered per-row button row. Desktop = anchored popover; phone (≤760px) = bottom
   SmkkSheet. Used app-wide (~38× across the 22 workflow steps). Additive + reversible.
   Pairs with spx-actionmenu.js (toggle/close/roving-focus) and _ActionMenu.cshtml.
   ============================================================================= */

.spx-actionmenu { position: relative; display: inline-flex; }

.spx-actionmenu__list {
    position: absolute;
    top: calc(100% + 4px);
    right: 0;
    z-index: 60;
    min-width: 220px;
    padding: var(--smkk-spx-space-50, 4px);
    background: var(--smkk-spx-surface-elevated, #fff);
    border: 1px solid var(--smkk-spx-border, rgba(31, 41, 51, .14));
    border-radius: var(--smkk-spx-radius-300, 8px);
    box-shadow: var(--smkk-flat-shadow-raised, 0 2px 8px rgba(15, 23, 42, .12));
    display: flex;
    flex-direction: column;
}
.spx-actionmenu__list[hidden] { display: none; }

.spx-actionmenu__item {
    display: flex;
    align-items: center;
    gap: var(--smkk-spx-space-100, 8px);
    min-height: var(--smkk-spx-touch-target-min, 44px);
    padding: 0 var(--smkk-spx-space-150, 12px);
    background: transparent;
    border: 0;
    border-radius: var(--smkk-spx-radius-200, 6px);
    text-align: left;
    color: var(--smkk-spx-text, #1f2933);
    font: inherit;
    text-decoration: none;
    cursor: pointer;
    white-space: nowrap;
}
.spx-actionmenu__item:hover,
.spx-actionmenu__item:focus-visible {
    background: var(--smkk-spx-surface-hover, rgba(47, 109, 90, .08));
    outline: none;
}
.spx-actionmenu__item--primary { font-weight: 700; }
.spx-actionmenu__item--danger { color: var(--smkk-spx-danger-text, #b3261e); }
.spx-actionmenu__item[aria-disabled="true"] { opacity: .5; pointer-events: none; }

.spx-actionmenu__sep {
    height: 1px;
    margin: var(--smkk-spx-space-50, 4px) 0;
    background: var(--smkk-spx-border, rgba(31, 41, 51, .14));
}

/* phone: present the list as a bottom sheet (F7 SmkkSheets), full-width tappable items */
@media (max-width: 760px) {
    .spx-actionmenu__list {
        position: fixed;
        inset: auto 0 0 0;
        top: auto;
        min-width: 0;
        border-radius: 12px 12px 0 0;
        padding-bottom: calc(env(safe-area-inset-bottom) + 8px);
        box-shadow: 0 -6px 24px rgba(15, 23, 42, .18);
    }
    .spx-actionmenu__item { min-height: 48px; font-size: 15px; }
    /* a dim scrim behind the sheet */
    .spx-actionmenu.is-open::before {
        content: ""; position: fixed; inset: 0; z-index: 59; background: rgba(15, 23, 42, .28);
    }
}
