/* Decorative action icons keep menu labels and React-owned children intact. */
@layer product-buttons {
  body.ow[data-product-buttons] .ow-action-menu-icon {
    position: relative;
    box-sizing: border-box !important;
    min-height: 44px !important;
    text-align: start !important;
    white-space: normal;
    overflow-wrap: anywhere;
  }
  body.ow .ow-action-menu-icon::before {
    content: "";
    position: absolute;
    inset-inline-start: 12px;
    top: 50%;
    width: 17px;
    height: 17px;
    transform: translateY(-50%);
    background-color: currentColor;
    -webkit-mask: var(--ow-action-menu-mask) center / contain no-repeat;
    mask: var(--ow-action-menu-mask) center / contain no-repeat;
    pointer-events: none;
  }
  body.ow .ow-action-menu-icon[data-action-menu-icon="star"]::before {
    background-color: var(--star-gold, #FFD700);
  }
  /* The full-colour menu drawings, at the 24px size the create menus use. */
  body.ow .ow-action-menu-icon.has-menu-art::before {
    width: 24px;
    height: 24px;
    background: var(--ow-action-menu-art) center / contain no-repeat;
    -webkit-mask: none;
    mask: none;
  }
  @media (forced-colors: active) {
    body.ow .ow-action-menu-icon::before { background-color: CanvasText; }
  }
}
/* A ⋮ panel is a plain dropdown like the row menus: one 44px row per action,
   however much room the window leaves beside the trigger. */
body.ow .tp-menu > div { display: flex; flex-direction: column; min-width: 190px; padding: 6px 0; border-radius: 4px; }
body.ow .tp-menu > div > form { margin: 0; }
body.ow .tp-menu > summary { display: inline-grid; place-items: center; min-width: 44px; min-height: 44px; padding: 0; }
body.ow .tp-menu > div :is(a, button) { display: block; width: 100%; min-height: 44px; padding: 10px 14px; border: 0; border-radius: 0; background: none; color: var(--text); font: inherit; font-size: 14px; font-weight: 400; line-height: 1.5; text-align: start; text-decoration: none; white-space: nowrap; cursor: pointer; }
body.ow .tp-menu > div :is(a, button):hover { background: var(--surface-alt); }
body.ow .tp-menu > div button:disabled { color: var(--text-quiet); background: none; cursor: not-allowed; }
/* The shared button padding sits in a nested layer, so the icon gap joins it to keep labels clear of the icon. */
@layer product-buttons.compact-actions.size-contract {
  body.ow[data-product-buttons] .ow-action-menu-icon { padding-inline-start: 37px !important; }
  body.ow[data-product-buttons] .ow-action-menu-icon.has-menu-art { padding-inline-start: 46px !important; }
}
