/**
 * @file button-press.css
 * @project KAINYNE Website
 * @description [RFE-299] Universal button press-state feedback — shared
 *   across all game pages. Every non-disabled, non-toggle <button> gets a
 *   tactile press animation: scale down + inset shadow while held, snap
 *   back on release. Toggle buttons (role-select, ready-up) carry
 *   data-toggle on the element and are exempt so their persistent "on"
 *   styling is not disrupted by the press cycle.
 *
 *   Mobile note: iOS Safari `:active` requires a touchstart listener on
 *   the document to activate; button-press.js installs that listener and
 *   also manages the `.pressed` class as a belt-and-suspenders fallback
 *   for Android Chrome, where `:active` may not fire reliably on fast taps.
 * @module UI/SiteShell
 * @requirements REQ-005
 */

/* [RFE-299] Press-state tokens — override in a game's :root if needed. */
:root {
  --btn-pressed-scale: 0.95;
  --btn-pressed-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.45);
  --btn-pressed-duration: 0.12s;
}

/*
 * [RFE-299] Universal press animation.
 * Selector targets every non-disabled, non-toggle button.
 * `data-toggle` marks buttons that keep persistent "on" state
 * (role-select, ready-up) — their press cycle is intentionally
 * left to the game's own active-state styling.
 */
button:not([disabled]):not([data-toggle]):active {
  transform: scale(var(--btn-pressed-scale)) !important;
  box-shadow: var(--btn-pressed-shadow) !important;
  transition: transform var(--btn-pressed-duration) ease-out, box-shadow var(--btn-pressed-duration) ease-out !important;
}

button:not([disabled]):not([data-toggle]).pressed {
  transform: scale(var(--btn-pressed-scale)) !important;
  box-shadow: var(--btn-pressed-shadow) !important;
  transition: transform var(--btn-pressed-duration) ease-out, box-shadow var(--btn-pressed-duration) ease-out !important;
}
