/**
 * Gin mirrors $form['actions'] into a page-level sticky bar / "more actions"
 * dropdown (#edit-more-actions) once, from the initial full page load, and
 * on later AJAX responses only rebinds click handlers for buttons that were
 * already mirrored there (see gin/js/more_actions.js updateFormId()) -- it
 * never adds an entry for a button that didn't exist yet at that first load.
 *
 * The RGI multistep wizard (field_group_ajaxified_multipage) adds/removes
 * next/prev/submit from $form['actions'] as the step changes, entirely via
 * AJAX. Concretely: "prev" doesn't exist on step 1, and "submit" (Confirmar)
 * only exists on the last step. Since neither is in the sticky mirror
 * captured at step 1, the dropdown goes stale as soon as you advance, and
 * the final submit button never gets a mirror at all -- there is no way to
 * finish the wizard from the dropdown.
 *
 * Fix: hide the unreliable dropdown for this form and reveal the real
 * actions row instead (Gin only visually hides it via a clip-rect,
 * expecting the mirror to always be current -- see
 * gin/dist/css/components/more_actions.css). The real row is rebuilt by
 * Drupal on every AJAX step, so it is always correct.
 */
body:has(form.node-rgi-form) [data-drupal-selector="edit-more-actions"],
body:has(form.node-rgi-edit-form) [data-drupal-selector="edit-more-actions"] {
  display: none !important;
}

/*
 * Same selector shape Gin uses to clip-hide #edit-actions (see
 * gin/dist/css/components/more_actions.css), with the RGI form class added
 * as an extra qualifier so this rule's specificity beats Gin's instead of
 * losing to it on the shared !important properties.
 */
.gin-sticky-form-actions--preprocessed ~ .layout-container form.node-rgi-form.gin--has-sticky-form-actions .gin-sticky-form-actions,
.gin-sticky-form-actions--preprocessed ~ .layout-container form.node-rgi-edit-form.gin--has-sticky-form-actions .gin-sticky-form-actions {
  position: static !important;
  clip: auto !important;
  height: auto !important;
  width: auto !important;
  overflow: visible !important;
  display: flex !important;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1rem;
}
