/* ==========================================================================
   PRESS-EFFECT-1 — one "button sinks in when clicked" effect for the whole admin.
   Pressed = moves down 1px + (on surfaced controls) an inset shadow, like the raised buttons.
   Why this file exists: PAGES-UNIFY restyled buttons with ID-prefixed rules that overrode the old pressed
   shadow in raised-buttons.css, and chips / pills / tiles / tabs never had one.
   Uses the individual `translate` property so it never collides with an element's own `transform`.
   Load LAST (after shopify-shell.css). Roll back: remove this file's <link>.
   ========================================================================== */

/* 1) Every clickable control sinks 1px while pressed. */
button:not(:disabled):not([aria-disabled="true"]):active,
[role="button"]:not([aria-disabled="true"]):active,
a.btn:not(.disabled):not([aria-disabled="true"]):active,
label.btn:active,
summary:active,
a.more-tile:active,
.nav-link:active,
.sb-link:active {
  translate: 0 1px;
}

/* 2) Surfaced controls (they have a visible face) also get the inset "pushed in" shadow. */
.btn:not(:disabled):active,
.icon-btn:not(:disabled):active,
.dpk-pill:active,
.dpk-nav:not(:disabled):active,
.dash-range-btn:active,
.dash-kebab-btn:active,
.tg-btn:active,
.hm-btn:active,
.hm-icon-btn:active,
.more-tile:active,
.range-btn:active,
.tab-btn:active,
.an-tab:active,
.acc-tab:active,
.pos-pay-tab:active,
.cfp-tax-tab:active,
.category-chip:active,
.category-pill:active,
.subcat-pill:active,
.cs-chip:active,
.ord-chip:active,
.ls-chip:active,
.dm-chip:active,
.pos-cat-chip:active,
.catsug-chip:active,
.ipk-chip:active,
.ipk-btn:active,
.pos-charge-btn:not(:disabled):active,
.pos-scan-btn:active,
.pos-qty-btn:active,
.pos-icon-btn:active,
.pos-topbar-pill:active,
.pos-fs-btn:active,
.tbl-icon-btn:active,
.pill-icon-btn:active,
.pfv-btn:active,
.pfv-iconbtn:active,
.pfs-btn:active,
.pd-icon-btn:active,
.pd-share-btn:active,
.ls-btn:active,
.ls-bar-btn:active,
.cf-btn-primary:active,
.cf-btn-secondary:active,
.view-toggle-btn:active,
.cs-filter-btn:active,
.cell-menu-btn:active,
.ed-tool-btn:active,
.sp-btn:active,
.hd-btn:active,
.vopt-btn-step:active,
.vopt-foot-btn:active,
.mc-sel-btn:active,
.notif-clear-btn:active,
.help-action-btn:active,
.account-action-btn:active,
.nl-save-btn:active,
.search-pill-btn:active,
.dm-trends-btn:active {
  box-shadow: inset 0 2px 3px rgba(16, 24, 40, .16) !important;
}
/* solid / dark-faced controls need a deeper sink */
.btn-primary:not(:disabled):active,
.btn-gold:not(:disabled):active,
.tg-btn-primary:active,
.hm-btn-primary:active,
.cf-btn-primary:active,
.ls-btn-primary:active,
.pos-charge-btn:not(:disabled):active,
.pos-scan-btn:active,
.pfs-btn-save:active,
.pfs-btn-dark:active,
.dash-quick .more-tile[data-dm-route="pos"]:active {
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, .28) !important;
}

/* 3) Exceptions: calendar day cells inside a range strip must not shift (it would tear the strip). */
.dpk-d.in-range:active, .dpk-d.is-start:active, .dpk-d.is-end:active { translate: none; }

@media (prefers-reduced-motion: reduce) {
  button:active, [role="button"]:active, a.btn:active, label.btn:active, summary:active,
  a.more-tile:active, .nav-link:active, .sb-link:active { translate: none; }
}
