/* HZW Home Coupon CTA · v0.1.0
   The overlay is aligned to the current square Hero artwork.
   No external image asset is needed: the coupon is rendered in CSS.
*/

.hzw-coupon-host {
  position: relative !important;
  isolation: isolate;
  overflow: hidden;
}

.hzw-coupon-experience {
  position: absolute;
  inset: 0;
  z-index: 20;
  pointer-events: none;
  font-family: Montserrat, Arial, sans-serif;
}

.hzw-coupon-card,
.hzw-coupon-dropzone {
  -webkit-tap-highlight-color: transparent;
}

.hzw-coupon-card {
  --hzw-coupon-x: 0px;
  --hzw-coupon-y: 0px;

  position: absolute;
  left: 20.5%;
  top: 76.5%;
  width: clamp(112px, 13.5vw, 170px);
  aspect-ratio: 1.72 / 1;
  padding: clamp(10px, 1vw, 15px);
  border: 1px solid rgba(13, 2, 33, .16);
  border-radius: clamp(12px, 1.3vw, 18px);
  background:
    radial-gradient(circle at 82% 13%, rgba(255,255,255,.88), rgba(255,255,255,0) 20%),
    linear-gradient(135deg, #FFE56F 0%, #FFD51F 48%, #F4C800 100%);
  color: #0D0221;
  box-shadow:
    0 4px 3px rgba(13,2,33,.12),
    0 16px 24px rgba(13,2,33,.18);
  transform:
    translate(-50%, -50%)
    translate3d(var(--hzw-coupon-x), var(--hzw-coupon-y), 0)
    perspective(800px)
    rotateX(10deg)
    rotateZ(-7deg);
  transform-origin: center;
  cursor: grab;
  pointer-events: auto;
  touch-action: none;
  user-select: none;
  appearance: none;
  text-align: left;
  z-index: 4;
  transition:
    transform 180ms cubic-bezier(.2,.75,.25,1),
    box-shadow 180ms ease,
    opacity 260ms ease,
    filter 260ms ease;
}

.hzw-coupon-card::before,
.hzw-coupon-card::after {
  content: "";
  position: absolute;
  top: 50%;
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background: rgba(63,43,21,.82);
  box-shadow: inset 0 1px 2px rgba(0,0,0,.28);
  transform: translateY(-50%);
}

.hzw-coupon-card::before { left: -7px; }
.hzw-coupon-card::after  { right: -7px; }

.hzw-coupon-card__brand,
.hzw-coupon-card__kicker,
.hzw-coupon-card__title,
.hzw-coupon-card__footer {
  display: block;
  position: relative;
  z-index: 2;
}

.hzw-coupon-card__brand {
  font-size: clamp(7px, .62vw, 10px);
  font-weight: 800;
  letter-spacing: .16em;
}

.hzw-coupon-card__kicker {
  margin-top: .35em;
  font-size: clamp(6px, .55vw, 9px);
  font-weight: 800;
  letter-spacing: .22em;
  opacity: .58;
}

.hzw-coupon-card__title {
  margin-top: .25em;
  font-size: clamp(11px, 1.03vw, 16px);
  line-height: .94;
  font-weight: 800;
  letter-spacing: -.035em;
}

.hzw-coupon-card__footer {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin-top: .7em;
  padding-top: .55em;
  border-top: 1px dashed rgba(13,2,33,.34);
  font-size: clamp(5px, .47vw, 7px);
  font-weight: 700;
  letter-spacing: .08em;
  opacity: .7;
}

.hzw-coupon-card.is-dragging {
  cursor: grabbing;
  transform:
    translate(-50%, -50%)
    translate3d(var(--hzw-coupon-x), var(--hzw-coupon-y), 0)
    perspective(800px)
    rotateX(2deg)
    rotateZ(-2deg)
    scale(1.07);
  box-shadow:
    0 10px 18px rgba(13,2,33,.16),
    0 30px 48px rgba(13,2,33,.28);
  transition: box-shadow 120ms ease, transform 80ms linear;
  z-index: 8;
}

.hzw-coupon-card.is-armed {
  box-shadow:
    0 0 0 4px rgba(255,213,31,.24),
    0 22px 38px rgba(13,2,33,.24);
}

.hzw-coupon-instruction {
  position: absolute;
  left: 11.5%;
  top: 64.8%;
  display: flex;
  align-items: center;
  gap: 7px;
  max-width: 190px;
  padding: 8px 11px;
  border: 1px solid rgba(255,255,255,.28);
  border-radius: 999px;
  background: rgba(13,2,33,.88);
  color: #fff;
  box-shadow: 0 8px 26px rgba(13,2,33,.2);
  font-size: clamp(7px, .62vw, 10px);
  line-height: 1;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  backdrop-filter: blur(10px);
  pointer-events: none;
  z-index: 5;
  animation: hzwCouponHintFloat 2.8s ease-in-out infinite;
  transition: opacity 220ms ease, transform 220ms ease;
}

.hzw-coupon-instruction__arrow {
  color: #FFD51F;
  font-size: 1.35em;
}

.hzw-coupon-instruction.is-hidden {
  opacity: 0;
  transform: translateY(5px);
}

.hzw-coupon-dropzone {
  position: absolute;
  left: 85.2%;
  top: 44.6%;
  width: clamp(54px, 7.3vw, 90px);
  aspect-ratio: 1.45 / 1;
  border: 0;
  border-radius: 18px;
  background: rgba(255,213,31,.02);
  color: #FFD51F;
  pointer-events: auto;
  cursor: pointer;
  opacity: .64;
  z-index: 3;
  appearance: none;
  transition:
    opacity 160ms ease,
    transform 160ms ease,
    background-color 160ms ease,
    box-shadow 160ms ease;
}

.hzw-coupon-dropzone__halo {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 22px;
  height: 22px;
  border: 2px solid rgba(255,213,31,.78);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  box-shadow:
    0 0 0 6px rgba(255,213,31,.08),
    0 0 28px rgba(255,213,31,.20);
  animation: hzwCouponTargetPulse 2s ease-out infinite;
}

.hzw-coupon-dropzone__icon {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -58%);
  font-size: 12px;
  font-weight: 900;
  line-height: 1;
}

.hzw-coupon-dropzone__label {
  position: absolute;
  left: 50%;
  top: calc(100% + 4px);
  transform: translateX(-50%) translateY(-2px);
  width: max-content;
  padding: 5px 7px;
  border-radius: 999px;
  background: rgba(13,2,33,.9);
  color: #FFD51F;
  font-size: clamp(6px, .5vw, 8px);
  line-height: 1;
  font-weight: 800;
  letter-spacing: .1em;
  opacity: 0;
  transition: opacity 160ms ease, transform 160ms ease;
}

.hzw-coupon-experience.is-dragging .hzw-coupon-dropzone,
.hzw-coupon-experience.is-armed .hzw-coupon-dropzone {
  opacity: 1;
}

.hzw-coupon-experience.is-dragging .hzw-coupon-dropzone__label,
.hzw-coupon-experience.is-armed .hzw-coupon-dropzone__label {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.hzw-coupon-dropzone.is-hot,
.hzw-coupon-dropzone.is-armed {
  opacity: 1;
  transform: scale(1.1);
  background: rgba(255,213,31,.12);
  box-shadow: 0 0 0 4px rgba(255,213,31,.15), 0 0 36px rgba(255,213,31,.28);
}

.hzw-coupon-experience.is-completing .hzw-coupon-card {
  pointer-events: none;
  transform:
    translate(-50%, -50%)
    translate3d(var(--hzw-coupon-x), var(--hzw-coupon-y), 0)
    rotateZ(0deg)
    scale(.28);
  opacity: .05;
  filter: brightness(1.15);
  transition:
    transform 420ms cubic-bezier(.16,.84,.2,1),
    opacity 360ms ease,
    filter 360ms ease;
}

.hzw-coupon-success {
  position: absolute;
  left: 72.5%;
  top: 53.5%;
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 8px 10px;
  border: 1px solid rgba(255,213,31,.46);
  border-radius: 999px;
  background: rgba(13,2,33,.91);
  color: #fff;
  box-shadow: 0 12px 34px rgba(13,2,33,.26);
  font-size: clamp(6px, .52vw, 8px);
  line-height: 1;
  font-weight: 800;
  letter-spacing: .08em;
  opacity: 0;
  transform: translateY(7px) scale(.94);
  pointer-events: none;
  transition: opacity 220ms ease, transform 260ms cubic-bezier(.2,.75,.25,1);
  z-index: 7;
}

.hzw-coupon-success__check {
  display: grid;
  place-items: center;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #FFD51F;
  color: #0D0221;
  font-size: 10px;
  font-weight: 900;
}

.hzw-coupon-success.is-visible {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.hzw-coupon-experience.is-completed .hzw-coupon-card,
.hzw-coupon-experience.is-session-completed .hzw-coupon-card {
  opacity: 0;
  pointer-events: none;
}

.hzw-coupon-experience.is-completed .hzw-coupon-dropzone,
.hzw-coupon-experience.is-session-completed .hzw-coupon-dropzone {
  opacity: .2;
  pointer-events: none;
}

.hzw-coupon-live {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

/* Divi module used only as the native Interaction bridge. */
.hzw-coupon-popup-trigger {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  min-width: 0 !important;
  min-height: 0 !important;
  padding: 0 !important;
  margin: 0 !important;
  opacity: 0 !important;
  overflow: hidden !important;
  pointer-events: none !important;
  clip-path: inset(50%) !important;
  left: 0 !important;
  bottom: 0 !important;
}

@keyframes hzwCouponHintFloat {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-4px); }
}

@keyframes hzwCouponTargetPulse {
  0%   { box-shadow: 0 0 0 0 rgba(255,213,31,.18), 0 0 24px rgba(255,213,31,.18); }
  65%  { box-shadow: 0 0 0 12px rgba(255,213,31,0), 0 0 30px rgba(255,213,31,.22); }
  100% { box-shadow: 0 0 0 12px rgba(255,213,31,0), 0 0 24px rgba(255,213,31,.18); }
}

@media (max-width: 980px) {
  .hzw-coupon-card {
    left: 20%;
    top: 76%;
    width: clamp(105px, 24vw, 150px);
  }

  .hzw-coupon-instruction {
    left: 10%;
    top: 63%;
    font-size: 8px;
  }

  .hzw-coupon-dropzone {
    left: 85%;
    top: 44.5%;
    width: clamp(50px, 13vw, 78px);
  }

  .hzw-coupon-success {
    left: 69%;
    top: 54%;
  }
}

@media (max-width: 480px) {
  .hzw-coupon-card {
    left: 19%;
    top: 76.5%;
    width: clamp(96px, 27vw, 122px);
  }

  .hzw-coupon-instruction {
    left: 8%;
    top: 62%;
    max-width: 142px;
    padding: 7px 9px;
    font-size: 6.5px;
  }

  .hzw-coupon-dropzone {
    left: 85%;
    top: 44%;
    width: 58px;
  }

  .hzw-coupon-success {
    left: 63%;
    top: 54%;
    padding: 6px 8px;
    font-size: 6px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .hzw-coupon-card,
  .hzw-coupon-dropzone,
  .hzw-coupon-dropzone__halo,
  .hzw-coupon-instruction,
  .hzw-coupon-success {
    animation: none !important;
    transition-duration: 1ms !important;
  }
}
