/* SC-2317: Sugar Megarush animated header banner (pure CSS), markup in xslbase/banner-html.xsl (.sc-slot) */
.sc-slot {
  --h: 90px;
  --radius: 12px;
  --border: rgba(255, 214, 0, .55);

  position: relative;
  display: block;
  box-sizing: border-box;
  width: 100%;
  max-width: 1200px;
  min-width: 300px;
  height: var(--h);
  border-radius: var(--radius);
  overflow: hidden;
  isolation: isolate;
  border: 1px solid var(--border);
  background: #b04bd8;
  text-decoration: none;
  container-type: inline-size;
  transform: translateZ(0);
  transition: transform .3s ease, box-shadow .3s ease;
  -webkit-tap-highlight-color: transparent;
}
.sc-slot:hover,
.sc-slot:focus-visible {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(255, 80, 200, .35);
}
.sc-slot:focus-visible { outline: 2px solid #ffd600; outline-offset: 3px; }

.sc-slot__layer {
  position: absolute;
  display: block;
  width: auto;
  pointer-events: none;
  user-select: none;
  will-change: transform;
}

.sc-slot__bg {
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  animation: sc-slot-bg-zoom 14s ease-in-out infinite alternate;
}

.sc-slot__main {
  left: 16%;
  bottom: -26%;
  height: 124%;
  animation:
    sc-slot-in-left .9s cubic-bezier(.2, .9, .3, 1.2) both,
    sc-slot-float 4s ease-in-out .9s infinite;
}

.sc-slot__flyer {
  left: 0;
  top: 0;
  height: 62%;
  --fly-rot: -56deg;
  transform-origin: 0 0;
  transform: translate(105cqw, calc(var(--h) + 80%)) rotate(var(--fly-rot));
  animation: sc-slot-fly 13.9s cubic-bezier(.45, 0, .7, 1) 1.5s infinite;
}

.sc-slot__flyer--2 {
  transform: translate(-70%, calc(var(--h) + 5%)) rotate(calc(var(--fly-rot) * -1)) translateX(100%) scaleX(-1);
  animation-name: sc-slot-fly-2;
}

.sc-slot__logo {
  right: 15%;
  top: 50%;
  height: 76%;
  translate: 0 -50%;
  filter: drop-shadow(0 2px 3px rgba(80, 0, 90, .35));
  animation:
    sc-slot-in-right .9s cubic-bezier(.2, .9, .3, 1.2) .15s both,
    sc-slot-pulse 2.6s ease-in-out 1.1s infinite;
}

.sc-slot__deco { animation: sc-slot-drift 5s ease-in-out infinite; filter: drop-shadow(0 2px 3px rgba(80, 0, 90, .35)); }
.sc-slot__deco--1 { left: 9%;  top: 50%; translate: 0 -50%; height: 66%; animation-delay: -1s; }
.sc-slot__deco--2 { left: 49%; bottom: 8%; height: 50%; --travel: -84%;
  animation: sc-slot-bear-up 4.5s ease-in-out infinite; }
.sc-slot__deco--3 { right: 4%; bottom: 6%; height: 70%; animation-duration: 4.5s; animation-delay: -.5s; }
.sc-slot__deco--4 { left: calc(34% + 20px); top: 2%; height: 92%;
  animation:
    sc-slot-in-left .9s cubic-bezier(.2, .9, .3, 1.2) .1s both,
    sc-slot-float 4s ease-in-out 1s infinite; }
.sc-slot__deco--5 { left: 28%; top: 6%; height: 40%; --travel: 135%;
  animation: sc-slot-star-down 4s ease-in-out infinite; }

.sc-slot__provider {
  left: 1.2%;
  bottom: 8%;
  height: 34%;
  z-index: 3;
  filter: drop-shadow(0 1px 1px rgba(0, 0, 0, .7)) drop-shadow(0 0 4px rgba(0, 0, 0, .45));
}

.sc-slot::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 5;
  background: linear-gradient(105deg, transparent 40%, rgba(255, 255, 255, .4) 50%, transparent 60%);
  transform: translateX(-120%);
  animation: sc-slot-shine 6s ease-in-out 1.5s infinite;
  pointer-events: none;
}

.sc-slot__bg    { z-index: 0; }
.sc-slot__flyer { z-index: 0; }
.sc-slot__deco  { z-index: 1; }
.sc-slot__main  { z-index: 2; }
.sc-slot__logo  { z-index: 3; }

@media (max-width: 1023px) {
  .sc-slot__provider { left: 1%; }
  .sc-slot__deco--1  { left: 11%; }
  .sc-slot__main     { left: 17.5%; }
  .sc-slot__deco--5  { left: 30%; }
  .sc-slot__deco--4  { left: calc(34.5% + 20px); }
  .sc-slot__deco--2  { left: 49.5%; }
  .sc-slot__logo     { right: 11%; height: 60%; }
  .sc-slot__deco--3  { right: 2%; }
  .sc-slot__flyer    { --fly-rot: -55deg; }
}

@media (max-width: 767px) {
  .sc-slot { --h: 100px; --radius: 10px; }
  .sc-slot__provider { left: 2%; bottom: 5%; height: 26%; }
  .sc-slot__deco--1  { left: 2%; top: 5%; translate: none; height: 46%; }
  .sc-slot__main     { left: 11%; bottom: -20%; height: 110%; }
  .sc-slot__deco--5  { left: 27%; height: 32%; --travel: 194%; }
  .sc-slot__deco--4  { left: 30.5%; top: 3%; height: 72%; }
  .sc-slot__deco--2  { left: 43%; bottom: 12%; height: 34%; --travel: -159%; }
  .sc-slot__logo     { right: 9.5%; height: min(56%, 9cqw); }
  .sc-slot__deco--3  { right: 1.5%; bottom: 5%; height: 46%; }
  .sc-slot__flyer    { height: 56%; --fly-rot: -51deg; }
}

@media (max-width: 479px) {
  .sc-slot__provider { left: 2%; bottom: 3%; height: 20%; }
  .sc-slot__deco--1  { left: 2%; top: 4%; height: 40%; }
  .sc-slot__main     { left: 12%; bottom: -10%; height: 100%; }
  .sc-slot__deco--5  { left: 31%; top: 8%; height: 26%; --travel: 235%; }
  .sc-slot__deco--4  { left: 37%; top: 2%; height: 54%; }
  .sc-slot__deco--2  { left: 48%; bottom: 15%; height: 26%; --travel: -208%; }
  .sc-slot__logo     { right: 11%; height: 72%; }
  .sc-slot__deco--3  { right: 1.5%; bottom: 3%; height: 36%; }
  .sc-slot__flyer    { height: 50%; --fly-rot: -44deg; }
}

@media (max-width: 400px) {
  .sc-slot__provider { height: 40%; }
}

/* ---------- keyframes ---------- */
@keyframes sc-slot-bg-zoom  { from { transform: scale(1); } to { transform: scale(1.06) translateX(-1%); } }
@keyframes sc-slot-float    { 0%, 100% { transform: translateY(0) rotate(-2deg); } 50% { transform: translateY(-5%) rotate(2deg); } }
@keyframes sc-slot-pulse    { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.18); } }
@keyframes sc-slot-drift    { 0%, 100% { transform: translate(0, 0) rotate(0); } 33% { transform: translate(8%, -18%) rotate(14deg); } 66% { transform: translate(-6%, 10%) rotate(-10deg); } }
@keyframes sc-slot-in-left  { from { opacity: 0; transform: translateX(-40%) scale(.8); } to { opacity: 1; transform: none; } }
@keyframes sc-slot-in-right { from { opacity: 0; transform: translateX(30%) scale(.8); } to { opacity: 1; transform: none; } }
@keyframes sc-slot-star-down { 0%, 100% { transform: translateY(0) rotate(0); } 50% { transform: translateY(var(--travel)) rotate(30deg); } }
@keyframes sc-slot-bear-up   { 0%, 100% { transform: translateY(0) rotate(0); } 50% { transform: translateY(var(--travel)) rotate(-8deg); } }

@keyframes sc-slot-fly {
  0%          { transform: translate(105cqw, calc(var(--h) + 80%)) rotate(var(--fly-rot)); }
  40.3%, 100% { transform: translate(-150%, -75%) rotate(var(--fly-rot)); }
}

@keyframes sc-slot-fly-2 {
  0%, 40.3%   { transform: translate(-70%, calc(var(--h) + 5%)) rotate(calc(var(--fly-rot) * -1)) translateX(100%) scaleX(-1); }
  80.6%, 100% { transform: translate(calc(100cqw + 100%), -140%) rotate(calc(var(--fly-rot) * -1)) translateX(100%) scaleX(-1); }
}
@keyframes sc-slot-shine    { 0% { transform: translateX(-120%); } 30%, 100% { transform: translateX(120%); } }

@media (prefers-reduced-motion: reduce) {
  .sc-slot *, .sc-slot::after { animation: none !important; }
  .sc-slot__flyer { display: none; }
}
