/* t103: site-wide tap/press feedback. Loaded last with rc-tap.js.
   Press: scale(0.97) + gold ring/glow, optional ripple from the tap point.
   iOS: -webkit-tap-highlight-color is cleared so this replaces the grey flash.
   prefers-reduced-motion: color/outline only, no scale or ripple. */

html, body{
  -webkit-tap-highlight-color:transparent;
}

.rc-tap,
a.buy-btn, a.gold-btn, a.gold-button, a.buy-button, a.btn,
button, [role="button"], input[type="submit"], input[type="button"],
.buy-btn, .gold-btn, .gold-button, .buy-button, .btn,
.langs a, .languages a, a.language, .language-chip, .language-tag,
.switch-track a, .menu-btn, .menu-button,
.card-link, .media-link, .category,
.product, .world-card, .offer-card,
.rc-sub-links a, .nav-links a, .brand{
  -webkit-tap-highlight-color:transparent;
  touch-action:manipulation;
  transform:translateZ(0);
  transition:
    transform 150ms cubic-bezier(0.22, 1.25, 0.36, 1),
    box-shadow 150ms ease-out,
    filter 150ms ease-out,
    background-color 150ms ease-out,
    color 150ms ease-out;
}

/* Compact controls clip the ripple; cards/badges must not clip. */
.buy-btn, .gold-btn, .gold-button, .buy-button, .btn,
.langs a, .languages a, a.language, .language-chip,
.switch-track a, .menu-btn, .menu-button,
button, [role="button"], input[type="submit"], input[type="button"]{
  position:relative;
}

.rc-tap-ink{
  overflow:hidden;
}

.rc-ripple{
  position:absolute;
  width:12px;
  height:12px;
  margin:-6px 0 0 -6px;
  border-radius:50%;
  background:radial-gradient(circle, rgba(255,224,138,.55) 0%, rgba(233,169,14,.28) 55%, rgba(233,169,14,0) 70%);
  pointer-events:none;
  transform:scale(0);
  animation:rc-ripple 450ms ease-out forwards;
  z-index:3;
}

@keyframes rc-ripple{
  0%{transform:scale(0);opacity:.85}
  100%{transform:scale(18);opacity:0}
}

.rc-tap:active,
.rc-tap.is-pressed,
a.buy-btn:active, a.gold-btn:active, a.gold-button:active, a.buy-button:active, a.btn:active,
button:active, [role="button"]:active,
input[type="submit"]:active, input[type="button"]:active,
.buy-btn:active, .gold-btn:active, .gold-button:active, .buy-button:active, .btn:active,
.langs a:active, .languages a:active, a.language:active, .language-chip:active,
.switch-track a:active, .menu-btn:active, .menu-button:active,
.card-link:active, .media-link:active, .category:active,
.product:active, .world-card:active, .offer-card:active,
.rc-sub-links a:active, .nav-links a:active, .brand:active,
.buy-btn.is-pressed, .gold-btn.is-pressed, .gold-button.is-pressed,
.buy-button.is-pressed, .btn.is-pressed,
button.is-pressed, [role="button"].is-pressed,
.langs a.is-pressed, .languages a.is-pressed, a.language.is-pressed,
.language-chip.is-pressed, .switch-track a.is-pressed,
.menu-btn.is-pressed, .menu-button.is-pressed,
.card-link.is-pressed, .media-link.is-pressed, .category.is-pressed,
.product.is-pressed, .world-card.is-pressed, .offer-card.is-pressed,
.rc-sub-links a.is-pressed, .nav-links a.is-pressed, .brand.is-pressed{
  transform:scale(0.97);
  box-shadow:0 0 0 2px rgba(244,189,37,.62), 0 0 16px rgba(255,199,60,.42);
}

/* Selected lang / pill state stays after release */
.langs a.active, .languages a.active, a.language.active,
.language-chip.active, .switch-track a.active{
  /* existing gold fill remains; press still scales via :active / .is-pressed */
}

@media (prefers-reduced-motion:reduce){
  .rc-tap,
  a.buy-btn, a.gold-btn, a.gold-button, a.buy-button, a.btn,
  button, [role="button"], input[type="submit"], input[type="button"],
  .buy-btn, .gold-btn, .gold-button, .buy-button, .btn,
  .langs a, .languages a, a.language, .language-chip, .language-tag,
  .switch-track a, .menu-btn, .menu-button,
  .card-link, .media-link, .category,
  .product, .world-card, .offer-card,
  .rc-sub-links a, .nav-links a, .brand{
    transition:background-color 120ms ease, color 120ms ease, filter 120ms ease, box-shadow 120ms ease !important;
  }
  .rc-tap:active, .rc-tap.is-pressed,
  a.buy-btn:active, a.gold-btn:active, a.gold-button:active, a.buy-button:active, a.btn:active,
  button:active, [role="button"]:active,
  .buy-btn:active, .gold-btn:active, .gold-button:active, .buy-button:active, .btn:active,
  .langs a:active, .languages a:active, a.language:active, .language-chip:active,
  .switch-track a:active, .menu-btn:active, .menu-button:active,
  .card-link:active, .media-link:active, .category:active,
  .product:active, .world-card:active, .offer-card:active,
  .rc-sub-links a:active, .nav-links a:active, .brand:active,
  .is-pressed{
    transform:none !important;
    box-shadow:none;
    filter:brightness(1.16);
    outline:2px solid rgba(244,189,37,.8);
    outline-offset:2px;
  }
  .rc-ripple{display:none !important;animation:none !important}
}

/* Win against page-level ID/header rules (e.g. #piano-type-fix). */
.is-pressed{
  transform:scale(0.97) !important;
  box-shadow:0 0 0 2px rgba(244,189,37,.62), 0 0 16px rgba(255,199,60,.42) !important;
}
@media (prefers-reduced-motion:reduce){
  .is-pressed{
    transform:none !important;
    box-shadow:none !important;
  }
}
