/* public/assets/css/celebration.css
   Globale "plaatsing geaccepteerd"-celebration.
   v1: één statisch avatar-asset, geanimeerd als geheel via transforms.
   Overlay is fixed/full-screen en pointer-events:none zodat de ATS-bediening
   nooit permanent geblokkeerd wordt. */

.ats-celeb-overlay {
  position: fixed;
  inset: 0;
  z-index: 99999;
  pointer-events: none;
  overflow: hidden; /* geen horizontale scrollbar door de loop-animatie */
  display: block;
}

.ats-celeb-stage {
  position: absolute;
  top: 62%;
  left: -20vw;
  transform: translate(0, -50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  transition: left 1.8s cubic-bezier(.22,.9,.32,1);
}
.ats-celeb-stage.is-entering { left: 50%; margin-left: -110px; }
.ats-celeb-stage.is-exiting  { left: 120vw; transition: left 1.7s cubic-bezier(.5,0,.75,0); }

.ats-celeb-avatar {
  /* Desktop-basiswaarde: circa 200–240px hoog */
  height: clamp(200px, 20vw, 240px);
  width: auto;
  display: block;
  z-index: 1;
  filter: drop-shadow(0 10px 18px rgba(0,0,0,.28));
  animation: ats-celeb-bounce 0.55s ease-in-out infinite;
}
.ats-celeb-avatar--hidden { visibility: hidden; }

/* Loop-bounce terwijl de avatar naar binnen/buiten beweegt — iets
   pittiger dan een reine schuifbeweging, zodat het "lopen" leesbaar
   blijft ook zonder losse loop-frames. */
@keyframes ats-celeb-bounce {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  25%      { transform: translateY(-9%) rotate(-2deg); }
  75%      { transform: translateY(-9%) rotate(2deg); }
}

/* Bel-moment: duidelijk voelbare wobble/rotatie rond de hand-met-bel
   (linksboven in de afbeelding), i.p.v. losse arm-animatie. */
.ats-celeb-stage.is-bell .ats-celeb-avatar {
  animation: ats-celeb-wobble 0.3s ease-in-out 3;
  transform-origin: 25% 15%;
}
@keyframes ats-celeb-wobble {
  0%, 100% { transform: rotate(0deg) scale(1); }
  50%      { transform: rotate(-16deg) scale(1.04); }
}

.ats-celeb-text {
  margin-top: 10px;
  text-align: center;
  background: rgba(15, 15, 20, .82);
  color: #fff;
  border-radius: 14px;
  padding: 10px 18px;
  max-width: min(320px, 80vw);
  opacity: 0;
  transform: translateY(6px);
  transition: opacity .4s ease, transform .4s ease;
}
.ats-celeb-overlay.is-text-visible .ats-celeb-text {
  opacity: 1;
  transform: translateY(0);
}
.ats-celeb-title {
  font-weight: 800;
  font-size: clamp(14px, 2.4vw, 18px);
  line-height: 1.2;
}
.ats-celeb-sub {
  font-weight: 500;
  font-size: clamp(12px, 2vw, 14px);
  margin-top: 4px;
  color: #f5f5f5;
}

/* Euro-particles: los van de avatar, dwarrelen vanaf het midden omhoog/omlaag.
   Hogere z-index dan de avatar zodat ze duidelijk als eigen, bewegende
   elementen herkenbaar zijn — ook tegen een avatar-afbeelding die zelf al
   biljetten toont. */
.ats-celeb-particles {
  position: absolute;
  left: 0; top: -20px;
  width: 100%;
  height: 0;
  z-index: 3;
}
.ats-celeb-euro {
  position: absolute;
  top: 0;
  font-size: clamp(20px, 3.2vw, 30px);
  font-weight: 800;
  color: #ffce33;
  -webkit-text-stroke: 1.5px #166534;
  text-shadow: 0 2px 3px rgba(0,0,0,.35);
  opacity: 0;
  animation-name: ats-celeb-fall;
  animation-timing-function: ease-in;
  animation-fill-mode: forwards;
  will-change: transform, opacity;
}
@keyframes ats-celeb-fall {
  0%   { opacity: 0; transform: translateY(-10px) scale(.4) rotate(0deg); }
  12%  { opacity: 1; transform: translateY(0) scale(1.15) rotate(0deg); }
  100% { opacity: 0; transform: translateY(190px) scale(1) rotate(var(--ats-celeb-rot, 90deg)); }
}

/* ── Responsive: avatar-grootte/afstand via clamp(), geen vaste desktop-
   coördinaten die op kleinere schermen kapot gaan (§12).
   Desktop: 200–240px | Tablet: 150–190px | Mobiel: 110–140px ── */
@media (max-width: 1023px) {
  .ats-celeb-avatar { height: clamp(150px, 18vw, 190px); }
}
@media (max-width: 767px) {
  .ats-celeb-avatar { height: clamp(110px, 22vw, 140px); }
  .ats-celeb-text { max-width: 88vw; padding: 8px 14px; }
}

/* ── Reduced motion: alleen compacte statische melding (§13) ── */
.ats-celeb-overlay--reduced {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding-top: 24px;
}
.ats-celeb-reduced-card {
  background: rgba(15, 15, 20, .9);
  color: #fff;
  border-radius: 14px;
  padding: 12px 20px;
  text-align: center;
  max-width: min(360px, 90vw);
  opacity: 0;
  transform: translateY(-8px);
  transition: opacity .25s ease, transform .25s ease;
}
.ats-celeb-overlay--reduced.is-visible .ats-celeb-reduced-card {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  .ats-celeb-avatar { animation: none !important; }
  .ats-celeb-stage { transition: none !important; }
  .ats-celeb-euro { animation: none !important; display: none; }
}
