/* ============================================================
   SLINGBREAK — MOTION & INTERACTION ENHANCEMENTS
   Colors are untouched; this file only adds feel.
   ============================================================ */

/* ── Button press feel ──────────────────────────────────── */
button {
  transition: background .15s, transform .12s cubic-bezier(.2, .8, .2, 1.4), box-shadow .15s;
}
button:active:not(:disabled) {
  transform: translateY(2px) scale(.96) !important;
}
.primary-button:active:not(:disabled) {
  transform: translateY(2px) scale(.95) !important;
}
.buy-button:active:not(:disabled) {
  transform: translateY(2px) scale(.96) !important;
}
.shop-trigger:hover {
  transform: translateY(-3px);
  transition: background .15s, transform .18s cubic-bezier(.2, .8, .2, 1.4), box-shadow .18s;
}
.shop-trigger:active {
  transform: translateY(1px) scale(.95) !important;
}

/* ── Money pop — more dramatic overshoot ────────────────── */
@keyframes cash-pop {
  0%   { transform: scale(1); }
  18%  { transform: scale(1.18); }
  40%  { transform: scale(.95); }
  65%  { transform: scale(1.06); }
  100% { transform: scale(1); }
}

/* Money burst travels further */
@keyframes cash-rise {
  0%   { opacity: 1; transform: translateY(14px) scale(.8); }
  20%  { opacity: 1; transform: translateY(0) scale(1.1); }
  100% { opacity: 0; transform: translateY(-28px) scale(.9); }
}

/* ── Combo count pop ─────────────────────────────────────── */
#combo-count {
  transition: transform .18s cubic-bezier(.2, .8, .2, 1.5), color .25s;
  display: block;
  transform-origin: center bottom;
}
.combo.is-hit #combo-count {
  animation: combo-bump .32s cubic-bezier(.2, .8, .2, 1.5) both;
}
@keyframes combo-bump {
  0%   { transform: scale(1); }
  35%  { transform: scale(1.22) translateY(-4px); }
  65%  { transform: scale(.95); }
  100% { transform: scale(1); }
}

/* Combo mult badge pops when it changes */
.combo-mult {
  transition: transform .22s cubic-bezier(.2, .8, .2, 1.5), background .25s, border-color .25s, color .25s;
  transform-origin: center;
}
.combo.is-hit .combo-mult {
  animation: mult-pop .35s cubic-bezier(.2, .8, .2, 1.5) both;
}
@keyframes mult-pop {
  0%   { transform: scale(1); }
  40%  { transform: scale(1.28) rotate(-3deg); }
  70%  { transform: scale(.96) rotate(1deg); }
  100% { transform: scale(1) rotate(0); }
}

/* Combo spark sparkle when capped */
.combo-spark {
  transition: opacity .3s, transform .45s cubic-bezier(.2, .8, .2, 1.5) !important;
}
.combo.is-capped .combo-spark {
  animation: spark-spin 2.4s linear infinite;
}
@keyframes spark-spin {
  to { transform: scale(1) rotate(360deg); }
}

/* ── Shot money count-up flash ───────────────────────────── */
.earnings.paying #shot-money {
  animation: cash-pop .32s cubic-bezier(.2, .8, .2, 1.4) both;
}

/* ── Skill card — snappier spring, deeper shadow on hover ── */
.skill-card {
  transition: transform .22s cubic-bezier(.2, .8, .2, 1.35),
              background .18s,
              border-color .18s,
              box-shadow .22s !important;
}
@media (hover: hover) {
  .skill-card:not(:disabled):hover {
    transform: translateY(-6px) !important;
    box-shadow: 0 12px 28px #35462b20 !important;
  }
}
.skill-card:not(:disabled):active {
  transform: translateY(-1px) scale(.975) !important;
  transition-duration: .08s !important;
}
.skill-emblem {
  transition: transform .22s cubic-bezier(.2, .8, .2, 1.5) !important;
}
.skill-card:not(:disabled):hover .skill-emblem {
  transform: rotate(-8deg) scale(1.1) !important;
}
.skill-pick svg {
  transition: transform .22s cubic-bezier(.2, .8, .2, 1.5) !important;
}
.skill-card:not(:disabled):hover .skill-pick svg {
  transform: translate(3px, -3px) !important;
}

/* ── Dialog entrances — tighter spring ──────────────────── */
#shop[open] {
  animation: shop-spring .3s cubic-bezier(.18, 1.12, .36, 1) both !important;
}
@keyframes shop-spring {
  from { opacity: 0; transform: translateY(22px) scale(.95); }
  to   { opacity: 1; transform: none; }
}

#skill-draft[open] {
  animation: draft-spring .44s cubic-bezier(.18, 1.12, .36, 1) both !important;
  transform-origin: 50% 60%;
}
@keyframes draft-spring {
  0%   { opacity: 0; transform: translateY(32px) scale(.92); }
  60%  { opacity: 1; transform: translateY(-5px) scale(1.01); }
  100% { opacity: 1; transform: none; }
}

#skill-library[open] {
  animation: draft-spring .38s cubic-bezier(.18, 1.12, .36, 1) both !important;
}

/* ── Skill card deal — each card springs in with energy ─── */
@keyframes skillCardDeal {
  0%   { opacity: 0; transform: translate3d(0, 28px, 0) rotate(var(--deal-angle)) scale(.9); }
  55%  { opacity: 1; transform: translate3d(0, -5px, 0) rotate(calc(var(--deal-angle) * -.4)) scale(1.02); }
  75%  { transform: translate3d(0, 2px, 0) rotate(0) scale(.99); }
  100% { opacity: 1; transform: translate3d(0, 0, 0) rotate(0) scale(1); }
}

/* ── Reset dialog entrance ───────────────────────────────── */
#reset-dialog[open] {
  animation: shop-spring .28s cubic-bezier(.18, 1.12, .36, 1) both;
}

/* ── Achievement hero — snappier rays burst ─────────────── */
.achievement-hero-mark:before,
.achievement-hero-mark:after {
  transition: opacity .18s, transform .32s cubic-bezier(.15, 1.1, .36, 1);
}

/* ── Shop trigger button entrance ───────────────────────── */
@keyframes shop-trigger-in {
  from { opacity: 0; transform: translateY(12px) scale(.88); }
  to   { opacity: 1; transform: none; }
}

/* ── Progress bar smooth fill ───────────────────────────── */
#progress-bar {
  transition: width .4s cubic-bezier(.2, .8, .2, 1) !important;
}

/* ── Combo meter smooth stroke ───────────────────────────── */
.combo-progress {
  transition: stroke-dashoffset .36s cubic-bezier(.2, .9, .2, 1),
              stroke .25s !important;
}

/* ── Toast slide-in feel ─────────────────────────────────── */
.notice-dock .toast {
  transition: opacity .2s cubic-bezier(.2, .8, .2, 1),
              transform .22s cubic-bezier(.2, .8, .2, 1.3) !important;
}
.notice-dock .toast.visible {
  transform: translateX(0) !important;
}

/* ── Intro exit — snappier ───────────────────────────────── */
@keyframes intro-exit {
  to { opacity: 0; transform: scale(1.03); }
}

/* ── Icon button hover lift ──────────────────────────────── */
.icon-button {
  transition: background .15s, color .15s, transform .12s cubic-bezier(.2, .8, .2, 1.4) !important;
}
.icon-button:hover {
  transform: translateY(-1px);
}
.icon-button:active {
  transform: translateY(1px) scale(.92) !important;
}

/* ── Power dot pulse when activated ─────────────────────── */
.power-dot-active {
  animation: dot-ping .25s ease-out;
}
@keyframes dot-ping {
  0%  { transform: scaleY(1.8) scaleX(1.2); }
  100%{ transform: none; }
}

/* ── Owned skill tags fade in ────────────────────────────── */
.owned-skills > span {
  animation: riseIn .3s ease both;
}

/* ── Prefers-reduced-motion guard ────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}

/* The draft screen stays visually stable while the pointer moves across it. */
#skill-draft .skill-card:hover {
  transform: none !important;
  background: #f3f6ee !important;
  border-color: #d6dfcc !important;
  box-shadow: none !important;
}
#skill-draft .skill-card:hover .skill-emblem,
#skill-draft .skill-card:hover .skill-pick svg {
  transform: none !important;
}
#skill-draft .skill-card:focus-visible {
  outline: none !important;
}
