/* Spin to win on the Moroccan tariffs page (js/spin.js). Every rule is namespaced under .dps-spin so
 * nothing here can restyle the storefront. The wheel is dark glass in both themes: it is an overlay
 * over the page, not part of it.
 */
.dps-spin-lock, .dps-spin-lock body { overflow: hidden; }

.dps-spin {
  position: fixed; inset: 0; z-index: 2147483000;
  display: grid; place-items: center; padding: 16px;
  background: rgba(5, 6, 9, .72);
  -webkit-backdrop-filter: blur(14px) saturate(140%); backdrop-filter: blur(14px) saturate(140%);
  opacity: 0; transition: opacity .26s ease;
  font-family: var(--font, "Inter", system-ui, sans-serif);
  color: #fff;
}
.dps-spin[hidden] { display: none; }
.dps-spin.is-open { opacity: 1; }

.dps-spin-aurora { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
.dps-spin-aurora i {
  position: absolute; width: 60vmax; height: 60vmax; border-radius: 50%;
  filter: blur(70px); opacity: .55; mix-blend-mode: screen;
  animation: dps-spin-drift 16s ease-in-out infinite alternate;
}
.dps-spin-aurora i:nth-child(1) { background: #E4002B; left: -18vmax; top: -22vmax; }
.dps-spin-aurora i:nth-child(2) { background: #6d28d9; right: -20vmax; bottom: -26vmax; animation-delay: -5s; opacity: .35; }
.dps-spin-aurora i:nth-child(3) { background: #ff7a45; right: 10vmax; top: -30vmax; animation-delay: -10s; opacity: .22; }
@keyframes dps-spin-drift {
  from { transform: translate3d(0, 0, 0) scale(1); }
  to { transform: translate3d(6vmax, 4vmax, 0) scale(1.15); }
}

.dps-spin-confetti { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 3; }

.dps-spin-card {
  position: relative; z-index: 2;
  width: min(940px, 100%); max-height: calc(100vh - 32px); overflow-x: hidden; overflow-y: auto;
  scrollbar-width: none;
  display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); align-items: center; gap: 28px;
  padding: 36px 40px 30px;
  border-radius: 30px;
  background: linear-gradient(155deg, rgba(255, 255, 255, .13), rgba(255, 255, 255, .035) 55%, rgba(255, 255, 255, .06));
  border: 1px solid rgba(255, 255, 255, .16);
  box-shadow: 0 50px 140px rgba(0, 0, 0, .6), inset 0 1px 0 rgba(255, 255, 255, .18);
  transform: translateY(18px) scale(.97); transition: transform .42s cubic-bezier(.2, .9, .25, 1.15);
}
.dps-spin.is-open .dps-spin-card { transform: none; }
.dps-spin-card::-webkit-scrollbar { display: none; }
.dps-spin-card::before {
  content: ""; position: absolute; inset: 0; border-radius: inherit; padding: 1px; pointer-events: none;
  background: conic-gradient(from var(--dps-spin-sweep, 0deg), rgba(255, 46, 82, .9), transparent 30%,
                             transparent 70%, rgba(255, 209, 102, .7));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
  opacity: .7;
}

.dps-spin-x {
  position: absolute; top: 14px; right: 14px; z-index: 4;
  width: 38px; height: 38px; border-radius: 50%; border: 1px solid rgba(255, 255, 255, .16);
  background: rgba(255, 255, 255, .06); color: #fff; display: grid; place-items: center; cursor: pointer;
  transition: background .2s ease, transform .2s ease;
}
.dps-spin-x:hover { background: rgba(255, 255, 255, .14); transform: rotate(90deg); }
.dps-spin-x svg { width: 18px; height: 18px; }

/* The wheel */
.dps-spin-stage { display: grid; place-items: center; }
.dps-spin-wheel {
  position: relative; width: min(430px, 100%); aspect-ratio: 1;
  filter: drop-shadow(0 30px 60px rgba(228, 0, 43, .28)) drop-shadow(0 12px 24px rgba(0, 0, 0, .6));
}
.dps-spin-bezel, .dps-spin-dial, .dps-spin-gloss { position: absolute; inset: 0; }
.dps-spin-svg { display: block; width: 100%; height: 100%; overflow: visible; }
.dps-spin-dial { inset: 7.5%; will-change: transform; }
.dps-spin-dial .dps-spin-svg { transform: scale(1.1765); }

.dps-spin-slice { transition: opacity .5s ease, filter .5s ease; }
.dps-spin-sep { stroke: rgba(255, 255, 255, .28); stroke-width: 1.4; }
.dps-spin-rim { fill: none; stroke: rgba(255, 255, 255, .35); stroke-width: 2; }
.dps-spin-label { color: #fff; }
.dps-spin-glyph { opacity: .9; }
.dps-spin-big {
  fill: #fff; font-size: 26px; font-weight: 800; letter-spacing: -.02em;
  paint-order: stroke; stroke: rgba(0, 0, 0, .18); stroke-width: 3px;
}
.dps-spin-small {
  fill: rgba(255, 255, 255, .88); font-size: 11px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase;
}
.dps-spin.is-won .dps-spin-slice:not(.win) { opacity: .45; }
.dps-spin.is-won .dps-spin-slice.win { filter: brightness(1.25) saturate(1.2); stroke: #fff; stroke-width: 3; }

.dps-spin-led { fill: #ffd2db; animation: dps-spin-led 1.2s steps(1, end) infinite; }
.dps-spin.is-spinning .dps-spin-led { animation-duration: .24s; }
.dps-spin.is-won .dps-spin-led { fill: #FFD166; animation-duration: .5s; }
@keyframes dps-spin-led {
  0% { opacity: 1; filter: drop-shadow(0 0 4px #ff2e52); }
  50% { opacity: .25; filter: none; }
}

.dps-spin-gloss {
  inset: 7.5%; border-radius: 50%; pointer-events: none;
  background: radial-gradient(120% 80% at 30% 12%, rgba(255, 255, 255, .28), rgba(255, 255, 255, .04) 40%, transparent 55%),
              radial-gradient(closest-side, transparent 78%, rgba(0, 0, 0, .35));
}

.dps-spin-pointer {
  position: absolute; left: 50%; top: -1.5%; width: 9%; height: 12%;
  transform: translateX(-50%); transform-origin: 50% 18%; z-index: 2;
  background: linear-gradient(180deg, #ffffff, #ffd3dc);
  clip-path: polygon(50% 100%, 0 18%, 12% 0, 88% 0, 100% 18%);
  filter: drop-shadow(0 0 10px rgba(255, 46, 82, .95)) drop-shadow(0 4px 6px rgba(0, 0, 0, .5));
}
.dps-spin-pointer.tick { animation: dps-spin-tick .12s ease-out; }
@keyframes dps-spin-tick {
  0% { transform: translateX(-50%) rotate(0); }
  40% { transform: translateX(-50%) rotate(-16deg); }
  100% { transform: translateX(-50%) rotate(0); }
}

.dps-spin-hub {
  position: absolute; left: 50%; top: 50%; z-index: 3;
  width: 23%; aspect-ratio: 1; transform: translate(-50%, -50%);
  border-radius: 50%; border: 3px solid rgba(255, 255, 255, .85); cursor: pointer;
  background: radial-gradient(circle at 35% 28%, #ff7d95, #E4002B 46%, #8a0019 100%);
  color: #fff; font: 800 clamp(13px, 2.1vw, 17px)/1 var(--font, system-ui, sans-serif);
  letter-spacing: .08em; text-transform: uppercase; white-space: normal; padding: 0 8px; line-height: 1.1;
  box-shadow: 0 10px 30px rgba(228, 0, 43, .55), inset 0 2px 0 rgba(255, 255, 255, .45), inset 0 -6px 14px rgba(0, 0, 0, .35);
  transition: transform .18s ease;
}
.dps-spin-hub:hover:not([disabled]) { transform: translate(-50%, -50%) scale(1.06); }
.dps-spin-hub:active:not([disabled]) { transform: translate(-50%, -50%) scale(.96); }
.dps-spin-hub[disabled] { cursor: default; }
.dps-spin.is-spinning .dps-spin-hub { font-size: clamp(11px, 1.6vw, 13px); }
.dps-spin-hub::after {
  content: ""; position: absolute; inset: -10px; border-radius: 50%;
  border: 2px solid rgba(255, 46, 82, .75); animation: dps-spin-pulse 1.8s ease-out infinite; pointer-events: none;
}
.dps-spin.is-spinning .dps-spin-hub::after, .dps-spin.is-won .dps-spin-hub::after { animation: none; opacity: 0; }
@keyframes dps-spin-pulse {
  0% { transform: scale(.92); opacity: .9; }
  100% { transform: scale(1.35); opacity: 0; }
}

/* The words */
.dps-spin-copy { min-width: 0; }
.dps-spin-eyebrow {
  display: inline-flex; align-items: center; gap: 8px; margin: 0 0 16px;
  padding: 7px 14px 7px 10px; border-radius: 999px;
  background: rgba(228, 0, 43, .16); border: 1px solid rgba(255, 46, 82, .45);
  color: #ffc2ce; font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
}
.dps-spin-eyebrow.won { background: rgba(255, 209, 102, .14); border-color: rgba(255, 209, 102, .5); color: #ffe39f; }
.dps-spin-ico { width: 16px; height: 16px; flex: none; }
.dps-spin-title {
  margin: 0 0 12px; font-size: clamp(30px, 4.4vw, 46px); line-height: 1.02; font-weight: 800; letter-spacing: -.035em;
  background: linear-gradient(100deg, #ffffff 30%, #ffb3c1 70%, #ff2e52);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.dps-spin-lede { margin: 0 0 18px; font-size: 16px; line-height: 1.55; color: rgba(255, 255, 255, .78); }
.dps-spin-chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 24px; padding: 0; list-style: none; }
.dps-spin-chips li {
  padding: 6px 12px; border-radius: 999px; font-size: 13px; font-weight: 600;
  background: rgba(255, 255, 255, .07); border: 1px solid rgba(255, 255, 255, .12); color: rgba(255, 255, 255, .9);
}
.dps-spin-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.dps-spin-btn {
  border: 0; cursor: pointer; border-radius: 14px; padding: 15px 24px;
  font: 700 16px/1 var(--font, system-ui, sans-serif); transition: transform .18s ease, box-shadow .2s ease, background .2s ease;
}
.dps-spin-btn.primary {
  color: #fff; background: linear-gradient(135deg, #ff2e52, #E4002B 55%, #b5001f);
  box-shadow: 0 14px 34px rgba(228, 0, 43, .45), inset 0 1px 0 rgba(255, 255, 255, .35);
}
.dps-spin-btn.primary:hover:not([disabled]) { transform: translateY(-2px); box-shadow: 0 18px 40px rgba(228, 0, 43, .55), inset 0 1px 0 rgba(255, 255, 255, .35); }
.dps-spin-btn.ghost { color: rgba(255, 255, 255, .82); background: transparent; padding: 15px 14px; }
.dps-spin-btn.ghost:hover:not([disabled]) { color: #fff; }
.dps-spin-btn[disabled] { opacity: .5; cursor: default; }
.dps-spin-btn:focus-visible, .dps-spin-hub:focus-visible, .dps-spin-x:focus-visible {
  outline: 3px solid #FFD166; outline-offset: 3px;
}

.dps-spin-result { animation: dps-spin-rise .5s cubic-bezier(.2, .9, .25, 1.1); }
.dps-spin-result[hidden], .dps-spin-intro[hidden] { display: none; }
@keyframes dps-spin-rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
.dps-spin-ticket {
  position: relative; display: flex; align-items: center; gap: 16px; margin: 0 0 14px; padding: 20px 22px;
  border-radius: 18px; color: #14161a;
  background: linear-gradient(135deg, #ffffff, #ffe9ee);
  box-shadow: 0 20px 50px rgba(0, 0, 0, .35);
}
.dps-spin-ticket-ico {
  flex: none; width: 54px; height: 54px; border-radius: 16px; display: grid; place-items: center; color: #fff;
  background: radial-gradient(circle at 35% 28%, #ff7d95, #E4002B 55%, #96001E);
  box-shadow: 0 10px 22px rgba(228, 0, 43, .4);
}
.dps-spin-ticket-ico .dps-spin-ico { width: 26px; height: 26px; }
.dps-spin-ticket strong { display: block; font-size: 22px; line-height: 1.15; font-weight: 800; letter-spacing: -.02em; }
.dps-spin-ticket span { display: block; margin-top: 4px; font-size: 14px; line-height: 1.45; color: #4b5260; }
.dps-spin-note { margin: 0 0 22px; font-size: 14px; line-height: 1.5; color: rgba(255, 255, 255, .72); }
.dps-spin-demo { margin: 22px 0 0; font-size: 11.5px; line-height: 1.4; color: rgba(255, 255, 255, .5); }

/* The badge left pinned after the wheel closes */
.dps-spin-badge {
  position: fixed; left: max(16px, env(safe-area-inset-left)); bottom: max(16px, env(safe-area-inset-bottom));
  z-index: 2147482000; display: flex; align-items: center; gap: 2px;
  border-radius: 999px; padding: 4px; color: #fff;
  background: linear-gradient(135deg, rgba(20, 22, 26, .92), rgba(40, 10, 18, .92));
  border: 1px solid rgba(255, 46, 82, .45);
  box-shadow: 0 16px 40px rgba(0, 0, 0, .35), 0 0 0 4px rgba(228, 0, 43, .12);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  font-family: var(--font, system-ui, sans-serif);
  animation: dps-spin-rise .45s cubic-bezier(.2, .9, .25, 1.1);
}
.dps-spin-badge[hidden] { display: none; }
.dps-spin-badge button { border: 0; background: none; color: inherit; cursor: pointer; font: inherit; }
.dps-spin-badge-open {
  display: inline-flex; align-items: center; gap: 10px; padding: 9px 14px 9px 10px; border-radius: 999px;
  font-size: 14px; font-weight: 700; max-width: min(78vw, 420px);
}
.dps-spin-badge-open span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dps-spin-badge-open .dps-spin-ico {
  width: 30px; height: 30px; padding: 6px; border-radius: 50%; color: #fff;
  background: radial-gradient(circle at 35% 28%, #ff7d95, #E4002B 55%, #96001E);
}
.dps-spin-badge.won .dps-spin-badge-open .dps-spin-ico { background: radial-gradient(circle at 35% 28%, #ffe7a8, #f5b82e 60%, #b47b00); }
.dps-spin-badge-x { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; opacity: .7; }
.dps-spin-badge-x:hover { opacity: 1; background: rgba(255, 255, 255, .08); }
.dps-spin-badge-x .dps-spin-ico { width: 14px; height: 14px; }
.dps-spin-badge button:focus-visible { outline: 3px solid #FFD166; outline-offset: 2px; }

/* A phone: one screen, never a scroll. The wheel takes its size from the visible height (dvh, which
   leaves out the browser's own bars), the chips give way, and the words tighten, so the pointer, the
   wheel and the button are all on screen at once on a 360 by 640 phone. */
@media (max-width: 820px) {
  .dps-spin { padding: 10px; place-items: center; }
  .dps-spin-card {
    grid-template-columns: 1fr; gap: 10px; padding: 18px 16px 14px; border-radius: 24px;
    text-align: center; max-height: calc(100vh - 20px); max-height: calc(100dvh - 20px);
  }
  .dps-spin-x { top: 10px; right: 10px; width: 34px; height: 34px; }
  .dps-spin-wheel { width: min(300px, 76vw); width: min(300px, 76vw, 41dvh); }
  .dps-spin-eyebrow { margin-bottom: 10px; padding: 5px 12px 5px 9px; font-size: 10.5px; }
  .dps-spin-title { margin-bottom: 6px; font-size: clamp(24px, 7vw, 30px); }
  .dps-spin-lede { margin-bottom: 14px; font-size: 14px; line-height: 1.45; }
  .dps-spin-chips { display: none; }
  .dps-spin-actions { justify-content: center; flex-wrap: nowrap; }
  .dps-spin-btn { padding: 14px 18px; font-size: 15px; }
  .dps-spin-btn.primary { flex: 1 1 auto; }
  .dps-spin-btn.ghost { flex: none; padding: 14px 8px; }
  .dps-spin-ticket { text-align: left; gap: 12px; margin-bottom: 10px; padding: 14px 16px; border-radius: 16px; }
  .dps-spin-ticket-ico { width: 44px; height: 44px; border-radius: 13px; }
  .dps-spin-ticket strong { font-size: 18px; }
  .dps-spin-ticket span { font-size: 13px; }
  .dps-spin-note { margin-bottom: 12px; font-size: 13px; }
  .dps-spin-demo { margin-top: 10px; font-size: 10.5px; }
}

@media (prefers-reduced-motion: reduce) {
  .dps-spin-aurora i, .dps-spin-led, .dps-spin-hub::after { animation: none; }
  .dps-spin, .dps-spin-card { transition: none; }
}
