/*
 * AAM Black Friday 2026 wheel - v2 visual candidate, 22 November 2026.
 * Brand palette only: bright orange #ff9000 and AAM teals. No browns, and
 * orange is never darkened, dimmed or used as a low-alpha glow on teal.
 * Every element rule is scoped under .aam-bfw with at least two classes so
 * Hello Elementor resets and Elementor kit rules cannot restyle the popup.
 */

.aam-bfw {
  --bfw-ink: #003e50;
  --bfw-teal: #004c66;
  --bfw-cyan: #00bcd4;
  --bfw-aqua: #7fdde9;
  --bfw-tint: #dff5f9;
  --bfw-orange: #ff9000;
  --bfw-white: #ffffff;
  --bfw-display: Montserrat, "Helvetica Neue", Arial, sans-serif;
  --bfw-text: "Helvetica Neue", Arial, sans-serif;
  --bfw-pad: clamp(20px, 4vw, 36px);
  --bfw-wheel: min(320px, 76vw, 44vh);

  /* Theme slots (light defaults) */
  --bfw-bg: var(--bfw-white);
  --bfw-body: #2c4a55;
  --bfw-heading: var(--bfw-teal);
  --bfw-muted: #4e6670;
  --bfw-event: var(--bfw-ink);
  --bfw-dates: var(--bfw-teal);
  --bfw-tile: rgb(0 76 102 / 0.06);
  --bfw-tile-line: rgb(0 76 102 / 0.2);
  --bfw-tile-number: var(--bfw-ink);
  --bfw-close: var(--bfw-teal);
  --bfw-close-bg: rgb(0 76 102 / 0.08);
  --bfw-close-hover: rgb(0 76 102 / 0.16);
  --bfw-btn: var(--bfw-orange);
  --bfw-btn-text: var(--bfw-ink);
  --bfw-btn-hover: var(--bfw-teal);
  --bfw-btn-hover-text: var(--bfw-white);
  --bfw-btn-shadow: rgb(0 76 102 / 0.35);
  --bfw-stage-shadow: 0 22px 40px -18px rgb(0 62 80 / 0.55);
  --bfw-ticket: var(--bfw-orange);
  --bfw-ticket-text: var(--bfw-ink);
  --bfw-ticket-rule: rgb(0 62 80 / 0.35);
  --bfw-cta: var(--bfw-ink);
  --bfw-cta-text: var(--bfw-white);
  --bfw-cta-hover: var(--bfw-teal);
  --bfw-focus: var(--bfw-ink);

  box-sizing: border-box;
  width: min(780px, 100% - 24px);
  max-width: none;
  max-height: calc(100% - 24px);
  margin: auto;
  padding: 0;
  border: 0;
  border-radius: 28px;
  overflow: hidden auto;
  overscroll-behavior: contain;
  color: var(--bfw-body);
  background: var(--bfw-bg);
  box-shadow: 0 40px 100px -30px rgb(0 20 28 / 0.75);
  font: 400 16px/1.5 var(--bfw-text);
  text-align: center;
}

.aam-bfw:is(dialog:not([open]), [hidden]),
.aam-bfw .aam-bfw__card [hidden] {
  display: none;
}

.aam-bfw *,
.aam-bfw *::before,
.aam-bfw *::after {
  box-sizing: inherit;
}

.aam-bfw::backdrop {
  background: rgb(0 30 40 / 0.62);
  backdrop-filter: blur(4px);
}

html:has(.aam-bfw:modal) {
  overflow: hidden;
}

.aam-bfw :focus-visible {
  outline: 3px solid var(--bfw-focus);
  outline-offset: 3px;
}

/* ---------- Structure ---------- */

/* The confetti canvas shares the card's single grid cell with the content. */
.aam-bfw .aam-bfw__card {
  display: grid;
}

.aam-bfw .aam-bfw__card > * {
  grid-area: 1 / 1;
  min-width: 0;
}

.aam-bfw .aam-bfw__confetti {
  display: block;
  width: 100%;
  height: 100%;
  contain: strict;
  pointer-events: none;
  z-index: 1;
}

/* Header: the Black Friday headline, the countdown to the end of the offer and the close
   button. Small screens stack the countdown under the centred headline. */
.aam-bfw .aam-bfw__top {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr) 40px;
  grid-template-areas: ". event close" "countdown countdown countdown";
  align-items: center;
  gap: 12px;
  padding: 18px var(--bfw-pad) 16px;
}

.aam-bfw .aam-bfw__event {
  grid-area: event;
  margin: 0;
  padding: 0;
  color: var(--bfw-event);
  font: 900 clamp(30px, 8.2vw, 46px)/1 var(--bfw-display);
  letter-spacing: 0.02em;
  text-align: center;
  text-transform: uppercase;
}

.aam-bfw .aam-bfw__countdown {
  display: flex;
  flex-wrap: wrap;
  grid-area: countdown;
  align-items: center;
  justify-content: center;
  gap: 8px 12px;
}

.aam-bfw .aam-bfw__countdown-label {
  color: var(--bfw-dates);
  font: 800 12px/1.2 var(--bfw-display);
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.aam-bfw .aam-bfw__units {
  display: flex;
  gap: 6px;
}

.aam-bfw .aam-bfw__unit {
  display: grid;
  justify-items: center;
  min-width: 56px;
  padding: 6px 4px 5px;
  border: 1px solid var(--bfw-tile-line);
  border-radius: 10px;
  background: var(--bfw-tile);
}

.aam-bfw .aam-bfw__unit b {
  color: var(--bfw-tile-number);
  font: 800 22px/1.05 var(--bfw-display);
  font-variant-numeric: tabular-nums;
}

.aam-bfw .aam-bfw__unit small {
  color: var(--bfw-dates);
  font: 700 10px/1.3 var(--bfw-display);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.aam-bfw .aam-bfw__close {
  display: grid;
  grid-area: close;
  place-items: center;
  width: 40px;
  height: 40px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 50%;
  color: var(--bfw-close);
  background: var(--bfw-close-bg);
  box-shadow: none;
  cursor: pointer;
  transition: background-color 0.15s;
}

.aam-bfw .aam-bfw__close:is(:hover, :focus) {
  color: var(--bfw-close);
  background: var(--bfw-close-hover);
}

.aam-bfw .aam-bfw__close svg {
  display: block;
  width: 18px;
  height: 18px;
}

.aam-bfw .aam-bfw__ornament {
  display: block;
  width: 100%;
  height: 14px;
}

.aam-bfw .aam-bfw__body {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-areas: "intro" "stage" "actions" "terms";
  gap: 18px;
  padding: 20px var(--bfw-pad) var(--bfw-pad);
}

.aam-bfw .aam-bfw__intro {
  grid-area: intro;
}

.aam-bfw .aam-bfw__title {
  margin: 0 0 10px;
  padding: 0;
  color: var(--bfw-heading);
  font: 800 clamp(24px, 3.4vw, 32px)/1.1 var(--bfw-display);
  letter-spacing: -0.02em;
  text-transform: none;
}

.aam-bfw .aam-bfw__intro p {
  margin: 0;
  color: var(--bfw-muted);
  font-size: 16px;
  line-height: 1.5;
}

/* ---------- Wheel ---------- */

.aam-bfw .aam-bfw__stage {
  display: grid;
  grid-area: stage;
  width: var(--bfw-wheel);
  aspect-ratio: 1;
  margin: 0 auto;
  border-radius: 50%;
  box-shadow: var(--bfw-stage-shadow);
  isolation: isolate;
  /* A rotated square disc reaches past the stage at its corners; the visible
     wheel is a circle inside the stage, so clip that invisible overflow. */
  overflow: hidden;
}

.aam-bfw .aam-bfw__stage > svg {
  display: block;
  grid-area: 1 / 1;
  width: 100%;
  height: 100%;
  overflow: visible;
}

.aam-bfw .aam-bfw__disc {
  transform-origin: 50% 50%;
  will-change: transform;
}

/* The rotating disc paints in the positioned layer; grid z-index keeps the
   static rim, hub and pointer above it without any positioning. */
.aam-bfw .aam-bfw__frame {
  z-index: 1;
}

.aam-bfw .aam-bfw__pointer {
  transform-box: view-box;
  transform-origin: 200px 22px;
}

.aam-bfw .aam-bfw__bulb {
  animation: aam-bfw-blink 1.4s steps(1, end) infinite;
}

.aam-bfw .aam-bfw__bulb--b {
  animation-delay: -0.7s;
}

.aam-bfw .aam-bfw__stage.is-spinning .aam-bfw__bulb {
  animation-duration: 0.36s;
}

.aam-bfw .aam-bfw__stage.is-spinning .aam-bfw__bulb--b {
  animation-delay: -0.18s;
}

.aam-bfw .aam-bfw__hit {
  fill: var(--bfw-white);
  fill-opacity: 0;
  stroke-width: 5;
  stroke-linejoin: round;
}

.aam-bfw .is-won .aam-bfw__hit {
  animation: aam-bfw-hit 1.1s ease-in-out 3;
}

/* ---------- Spin button, result and ticket ---------- */

.aam-bfw .aam-bfw__actions {
  display: grid;
  grid-area: actions;
  justify-items: center;
  gap: 12px;
}

.aam-bfw .aam-bfw__spin {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: min(100%, 340px);
  min-height: 56px;
  margin: 0;
  padding: 14px 28px;
  border: 0;
  border-radius: 999px;
  color: var(--bfw-btn-text);
  background: linear-gradient(110deg, transparent 38%, rgb(255 255 255 / 0.55) 50%, transparent 62%) var(--bfw-btn);
  background-size: 260% 100%;
  background-position: 130% 0;
  box-shadow: 0 14px 26px -14px var(--bfw-btn-shadow);
  font: 800 18px/1.15 var(--bfw-display);
  letter-spacing: 0.01em;
  text-transform: none;
  text-decoration: none;
  white-space: normal;
  cursor: pointer;
  animation: aam-bfw-shine 3.6s ease-in-out infinite;
  transition: background-color 0.15s, color 0.15s, transform 0.15s;
}

.aam-bfw .aam-bfw__spin:focus {
  color: var(--bfw-btn-text);
  background-color: var(--bfw-btn);
}

.aam-bfw .aam-bfw__spin:hover:not(:disabled) {
  color: var(--bfw-btn-hover-text);
  background-color: var(--bfw-btn-hover);
  transform: translateY(-1px);
}

/* Full colour while spinning: dimming orange over teal reads as brown. */
.aam-bfw .aam-bfw__spin:disabled {
  color: var(--bfw-btn-text);
  background-color: var(--bfw-btn);
  cursor: progress;
  animation: none;
}

.aam-bfw .aam-bfw__result {
  display: grid;
  justify-items: center;
  width: 100%;
}

.aam-bfw .aam-bfw__error {
  margin: 0;
  color: var(--bfw-heading);
  font-weight: 700;
}

.aam-bfw .aam-bfw__ticket {
  display: grid;
  justify-items: center;
  gap: 6px;
  width: min(100%, 360px);
  padding: 18px 28px 22px;
  border-radius: 18px;
  color: var(--bfw-ticket-text);
  background: var(--bfw-ticket);
  -webkit-mask:
    radial-gradient(circle 11px at 0 62%, transparent 98%, #000) left / 51% 100% no-repeat,
    radial-gradient(circle 11px at 100% 62%, transparent 98%, #000) right / 51% 100% no-repeat;
  mask:
    radial-gradient(circle 11px at 0 62%, transparent 98%, #000) left / 51% 100% no-repeat,
    radial-gradient(circle 11px at 100% 62%, transparent 98%, #000) right / 51% 100% no-repeat;
  animation: aam-bfw-pop 0.55s cubic-bezier(0.2, 1.35, 0.4, 1) both;
}

.aam-bfw .aam-bfw__ticket p {
  margin: 0;
  color: inherit;
}

.aam-bfw .aam-bfw__ticket .aam-bfw__ticket-label {
  font: 800 12px/1.3 var(--bfw-display);
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.aam-bfw .aam-bfw__ticket .aam-bfw__prize {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: center;
  gap: 0 10px;
  font-family: var(--bfw-display);
  line-height: 1;
}

.aam-bfw .aam-bfw__prize strong {
  font-size: clamp(46px, 9vw, 60px);
  font-weight: 900;
  letter-spacing: -0.03em;
}

.aam-bfw .aam-bfw__prize span {
  font-size: 20px;
  font-weight: 800;
}

.aam-bfw .aam-bfw__ticket .aam-bfw__note {
  width: 100%;
  margin-top: 6px;
  padding-top: 12px;
  border-top: 2px dashed var(--bfw-ticket-rule);
  font-size: 14px;
  line-height: 1.4;
}

.aam-bfw .aam-bfw__book {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 48px;
  margin-top: 8px;
  padding: 12px 22px;
  border: 0;
  border-radius: 999px;
  color: var(--bfw-cta-text);
  background: var(--bfw-cta);
  font: 800 16px/1.2 var(--bfw-display);
  text-decoration: none;
  transition: background-color 0.15s;
}

.aam-bfw .aam-bfw__book:focus {
  color: var(--bfw-cta-text);
  background: var(--bfw-cta);
  text-decoration: none;
}

.aam-bfw .aam-bfw__book:hover {
  color: var(--bfw-cta-text);
  background: var(--bfw-cta-hover);
  text-decoration: none;
}

.aam-bfw .aam-bfw__fine {
  display: grid;
  grid-area: terms;
  gap: 8px;
}

.aam-bfw .aam-bfw__blackout {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: 8px;
  margin: 0;
  color: var(--bfw-heading);
  font: 700 14px/1.4 var(--bfw-text);
  text-align: left;
}

.aam-bfw .aam-bfw__blackout svg {
  display: block;
  flex: none;
  width: 18px;
  height: 18px;
  color: var(--bfw-orange);
}

.aam-bfw .aam-bfw__terms {
  margin: 0;
  color: var(--bfw-muted);
  font-size: 12.5px;
  line-height: 1.45;
}

/* ---------- Desktop: copy beside the wheel ---------- */

@media (min-width: 900px) {
  .aam-bfw .aam-bfw__top {
    grid-template-columns: auto minmax(0, 1fr) 40px;
    grid-template-areas: "event countdown close";
    column-gap: 20px;
  }

  .aam-bfw .aam-bfw__event {
    text-align: left;
  }

  .aam-bfw .aam-bfw__countdown {
    flex-direction: column;
    align-items: flex-end;
    gap: 6px;
  }
}

@media (min-width: 760px) {
  .aam-bfw {
    --bfw-wheel: min(340px, 40vw, 60vh);
    text-align: left;
  }

  .aam-bfw .aam-bfw__body {
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-rows: auto auto 1fr;
    grid-template-areas: "intro stage" "actions stage" "terms stage";
    align-items: start;
    column-gap: clamp(28px, 4vw, 48px);
    row-gap: 22px;
    padding-top: 28px;
  }

  .aam-bfw .aam-bfw__stage {
    align-self: center;
  }

  .aam-bfw .aam-bfw__actions,
  .aam-bfw .aam-bfw__result {
    justify-items: start;
  }

  .aam-bfw .aam-bfw__fine {
    align-self: end;
  }

  .aam-bfw .aam-bfw__blackout {
    justify-content: flex-start;
  }
}

/* ---------- Themes ---------- */

/* 1. Midnight marquee: Black Friday night, chasing lights. */
.aam-bfw--marquee {
  --bfw-bg: radial-gradient(120% 85% at 78% 45%, #0b5a73 0, #00303d 50%, #00202a 100%);
  --bfw-body: #d9eef3;
  --bfw-heading: var(--bfw-white);
  --bfw-muted: #a9d0d9;
  --bfw-event: var(--bfw-orange);
  --bfw-dates: var(--bfw-aqua);
  --bfw-tile: rgb(255 255 255 / 0.07);
  --bfw-tile-line: rgb(127 221 233 / 0.35);
  --bfw-tile-number: var(--bfw-white);
  --bfw-close: var(--bfw-white);
  --bfw-close-bg: rgb(255 255 255 / 0.1);
  --bfw-close-hover: rgb(255 255 255 / 0.2);
  --bfw-btn-hover: var(--bfw-white);
  --bfw-btn-hover-text: var(--bfw-ink);
  --bfw-btn-shadow: rgb(0 0 0 / 0.6);
  --bfw-stage-shadow: 0 26px 50px -18px rgb(0 0 0 / 0.65), 0 0 80px 4px rgb(0 188 212 / 0.28);
  --bfw-focus: var(--bfw-white);
}

/* 2. Caribbean lagoon: daylight turquoise with tour icons. */
.aam-bfw--lagoon {
  --bfw-bg: linear-gradient(180deg, var(--bfw-white) 0, var(--bfw-white) 42%, #dff5f9 100%);
  --bfw-stage-shadow: 0 24px 40px -18px rgb(0 76 102 / 0.5), 0 0 0 12px rgb(255 255 255 / 0.85), 0 0 0 13px rgb(0 188 212 / 0.3);
  --bfw-ticket: var(--bfw-teal);
  --bfw-ticket-text: var(--bfw-white);
  --bfw-ticket-rule: rgb(127 221 233 / 0.6);
  --bfw-cta: var(--bfw-orange);
  --bfw-cta-text: var(--bfw-ink);
  --bfw-cta-hover: var(--bfw-white);
}

.aam-bfw--lagoon .aam-bfw__prize span {
  color: var(--bfw-aqua);
}

/* 3. Maya sun: calendar-stone ring at night. */
.aam-bfw--maya {
  --bfw-bg: radial-gradient(110% 75% at 78% 42%, #075a74 0, #00384a 48%, #002632 100%);
  --bfw-body: #d9eef3;
  --bfw-heading: var(--bfw-white);
  --bfw-muted: #a2cbd5;
  --bfw-event: var(--bfw-orange);
  --bfw-dates: var(--bfw-aqua);
  --bfw-tile: rgb(255 255 255 / 0.07);
  --bfw-tile-line: rgb(127 221 233 / 0.35);
  --bfw-tile-number: var(--bfw-white);
  --bfw-close: var(--bfw-white);
  --bfw-close-bg: rgb(255 255 255 / 0.1);
  --bfw-close-hover: rgb(255 255 255 / 0.2);
  --bfw-btn-hover: var(--bfw-white);
  --bfw-btn-hover-text: var(--bfw-ink);
  --bfw-btn-shadow: rgb(0 0 0 / 0.6);
  --bfw-stage-shadow: 0 26px 50px -18px rgb(0 0 0 / 0.7), 0 0 70px 2px rgb(127 221 233 / 0.22);
  --bfw-ticket: var(--bfw-tint);
  --bfw-ticket-text: var(--bfw-ink);
  --bfw-cta: var(--bfw-orange);
  --bfw-cta-text: var(--bfw-ink);
  --bfw-cta-hover: var(--bfw-white);
  --bfw-focus: var(--bfw-white);
}

/* 4. Mystery gifts: bright and playful. */
.aam-bfw--gifts {
  --bfw-bg: radial-gradient(90% 60% at 80% 40%, #e9f9fc 0, var(--bfw-white) 70%);
  --bfw-stage-shadow: 0 24px 40px -18px rgb(0 76 102 / 0.55), 0 0 0 10px #e9f9fc;
}

/* ---------- Motion ---------- */

@keyframes aam-bfw-blink {
  0% { opacity: 1; }
  50% { opacity: 0.3; }
}

@keyframes aam-bfw-shine {
  0%, 55% { background-position: 130% 0; }
  100% { background-position: -30% 0; }
}

@keyframes aam-bfw-hit {
  50% { fill-opacity: 0.35; }
}

@keyframes aam-bfw-pop {
  from { opacity: 0; transform: translateY(10px) scale(0.86); }
  to { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  .aam-bfw .aam-bfw__spin,
  .aam-bfw .aam-bfw__bulb,
  .aam-bfw .is-won .aam-bfw__hit,
  .aam-bfw .aam-bfw__ticket {
    animation: none;
  }

  .aam-bfw .aam-bfw__spin:hover:not(:disabled) {
    transform: none;
  }
}
