.action-motion {
  --action-fill: #c94a35;
  --action-ease: cubic-bezier(.18, .9, .32, 1.06);
  background-image: linear-gradient(var(--action-fill), var(--action-fill));
  background-position: center bottom;
  background-repeat: no-repeat;
  background-size: 100% 0;
  transition: background-size .55s var(--action-ease), color .25s ease, scale .2s ease;
}

:is(.submit-btn, .sl-primary).action-motion { --action-fill: var(--accent-hover); }
.action-motion:where(.hamburger, .menu-toggle, .menu-close, .mob-x, .category-back, .carousel-btn) { border-radius: 6px; }
.action-motion.hamburger span { background-color: currentColor; }
.action-motion.category-back { padding-inline: 4px 8px; }
.action-motion.category-back :is(svg, .category-back-period) { color: var(--action-detail, #c94a35); }

.action-roll {
  display: inline-grid;
  overflow: clip;
  vertical-align: middle;
  padding-block: .08em;
  margin-block: -.08em;
}
.action-roll > span { grid-area: 1 / 1; transition: translate .55s var(--action-ease); }
.action-roll > [aria-hidden] { translate: 0 115%; }
.action-motion > svg { transition: translate .45s var(--action-ease), rotate .45s var(--action-ease); }
.action-motion > .action-arrow {
  display: inline-block;
  flex-shrink: 0;
  width: 1em;
  height: 1em;
  vertical-align: middle;
  margin-inline-start: .55em;
  rotate: -45deg;
  transform: none;
}
.submit-btn.action-motion > .action-arrow { margin-inline-start: 0; }
.category-back.action-motion { --icon-shift: -2px 0; }
:is(#viewerPrev, [data-grid-prev]).action-motion { --icon-shift: -2px 0; }
:is(#viewerNext, [data-grid-next]).action-motion { --icon-shift: 2px 0; }

.action-motion:not(:disabled):is(:focus-visible, :active),
.collection-card:focus-visible .category-enter.action-motion {
  background-size: 100% 100%;
  color: #fff;
  --action-detail: #fff;
}
.action-motion:not(:disabled):focus-visible { outline: 2px solid #c94a35; outline-offset: 4px; }
.action-motion:not(:disabled):active { scale: .97; }
.action-motion:not(:disabled):focus-visible .action-roll > :first-child { translate: 0 -115%; }
.action-motion:not(:disabled):focus-visible .action-roll > [aria-hidden] { translate: 0 0; }
.action-motion:not(:disabled):focus-visible > .action-arrow { rotate: -90deg; translate: .15em -.15em; }
.collection-card:focus-visible .category-enter.action-motion > svg { translate: 2px -2px; }

@media (hover: hover) {
  .action-motion:not(:disabled):hover,
  .collection-card:hover .category-enter.action-motion {
    background-size: 100% 100%;
    color: #fff;
    --action-detail: #fff;
  }
  .action-motion:not(:disabled):hover .action-roll > :first-child { translate: 0 -115%; }
  .action-motion:not(:disabled):hover .action-roll > [aria-hidden] { translate: 0 0; }
  .action-motion:not(:disabled):hover > svg { translate: var(--icon-shift, 0 -2px); }
  .action-motion:not(:disabled):hover > .action-arrow { rotate: -90deg; translate: .15em -.15em; }
  .collection-card:hover .category-enter.action-motion > svg { translate: 2px -2px; }
}

@media (prefers-reduced-motion: reduce) {
  .action-motion, .action-motion > svg, .action-roll > span { transition: none; }
  .action-motion:not(:disabled):active { scale: none; }
  .action-motion .action-roll > span, .action-motion > svg { translate: none !important; }
  .action-roll > [aria-hidden] { visibility: hidden; }
  .action-motion > .action-arrow { rotate: -45deg !important; }
}
