/* Shared Freaking Ding Bat coupon. Swap this file (and coupon.js) for the common copy. */

.coupon-dock[hidden], #btn-claim[hidden], .win-offer[hidden] { display: none !important; }
.win-offer { margin: .6rem 0 0; color: #a6fb03; }
.coupon-dock {
  position: absolute;
  z-index: 8;
  left: 0;
  right: 0;
  bottom: calc(6px + env(safe-area-inset-bottom));
  display: flex;
  justify-content: center;
  padding: 0 8px;
  pointer-events: none;
}

html[data-coupon="open"] .coupon-dock[hidden], #btn-claim[hidden], .win-offer[hidden] { display: none !important; }
.win-offer { margin: .6rem 0 0; color: #a6fb03; }
.coupon-dock {
  visibility: hidden;
}

.coupon-ticket {
  pointer-events: auto;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  width: min(440px, 100%);
  height: 40px;
  padding: 0 16px 0 12px;
  border: 0;
  border-radius: 6px;
  background: #ff7a1a;
  color: #1a0b12;
  font-family: "Chakra Petch", "Arial Black", "Segoe UI", sans-serif;
  font-weight: 800;
  font-synthesis: weight;
  font-size: 0.92rem;
  line-height: 1;
  letter-spacing: 0.01em;
  cursor: pointer;
  overflow: hidden;
  -webkit-mask:
    radial-gradient(circle 8px at 0 50%, #0000 7.5px, #000 8px) left / 51% 100% no-repeat,
    radial-gradient(circle 8px at 100% 50%, #0000 7.5px, #000 8px) right / 51% 100% no-repeat;
  mask:
    radial-gradient(circle 8px at 0 50%, #0000 7.5px, #000 8px) left / 51% 100% no-repeat,
    radial-gradient(circle 8px at 100% 50%, #0000 7.5px, #000 8px) right / 51% 100% no-repeat;
}

.coupon-ticket::before {
  content: "";
  position: absolute;
  inset: 4px;
  border: 2px dashed #1a0b12;
  border-radius: 3px;
  pointer-events: none;
}

.coupon-scissors {
  position: relative;
  z-index: 1;
  font-size: 0.95rem;
  line-height: 1;
}

.coupon-ticket-label {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: baseline;
  gap: 0.35rem;
  min-width: 0;
  white-space: nowrap;
}

.coupon-off {
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.coupon-rest {
  font-weight: 800;
  text-transform: none;
}

.coupon-shimmer {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 38%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.55), transparent);
  transform: translateX(-140%);
  animation: coupon-shimmer 2.5s ease-in-out infinite;
  pointer-events: none;
}

@keyframes coupon-shimmer {
  0%, 8% { transform: translateX(-140%); }
  58%, 100% { transform: translateX(320%); }
}

.coupon-sheet {
  position: absolute;
  inset: 0;
  z-index: 30;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  pointer-events: auto;
}

.coupon-sheet[hidden] {
  display: none !important;
}

.coupon-backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  padding: 0;
  background: rgba(12, 6, 16, 0.56);
  opacity: 0;
  transition: opacity 280ms ease-out;
  cursor: pointer;
}

.coupon-sheet.is-open .coupon-backdrop {
  opacity: 1;
}

.coupon-panel {
  position: relative;
  z-index: 1;
  width: min(440px, calc(100% - 16px));
  max-height: calc(100dvh - 16px - env(safe-area-inset-top));
  margin-bottom: calc(8px + env(safe-area-inset-bottom));
  overflow: auto;
  transform: translate3d(0, 110%, 0);
  transition: transform 280ms ease-out;
  -webkit-overflow-scrolling: touch;
}

.coupon-sheet.is-open .coupon-panel {
  transform: translate3d(0, 0, 0);
}

.coupon-card {
  --rip: 158px;
  position: relative;
  background: #fff4e0;
  color: #1a0b12;
  border-radius: 12px;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.4);
  -webkit-mask:
    radial-gradient(circle 8px at 0 var(--rip), #0000 7.5px, #000 8px) left / 51% 100% no-repeat,
    radial-gradient(circle 8px at 100% var(--rip), #0000 7.5px, #000 8px) right / 51% 100% no-repeat;
  mask:
    radial-gradient(circle 8px at 0 var(--rip), #0000 7.5px, #000 8px) left / 51% 100% no-repeat,
    radial-gradient(circle 8px at 100% var(--rip), #0000 7.5px, #000 8px) right / 51% 100% no-repeat;
}

.coupon-x {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 2;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 2px solid #1a0b12;
  background: #fff4e0;
  color: #1a0b12;
  font-size: 1.25rem;
  line-height: 1;
  cursor: pointer;
}

.coupon-band {
  position: relative;
  min-height: 148px;
  padding: 16px 18px 18px;
  background: #ff7a1a;
  color: #1a0b12;
}

.coupon-brand {
  margin: 0;
  max-width: calc(100% - 88px);
  font-family: "Chakra Petch", "Segoe UI", sans-serif;
  font-size: 0.68rem;
  font-weight: 800;
  font-synthesis: weight;
  letter-spacing: 0.08em;
}

.coupon-amount {
  margin: 0.35rem 0 0;
  font-family: "Chakra Petch", "Arial Black", "Segoe UI", sans-serif;
  font-size: 44px;
  font-weight: 900;
  font-synthesis: weight;
  line-height: 0.9;
  letter-spacing: -0.03em;
}

.coupon-sub {
  margin: 0.2rem 0 0;
  font-family: "Chakra Petch", "Segoe UI", sans-serif;
  font-size: 0.95rem;
  font-weight: 800;
  font-synthesis: weight;
  letter-spacing: 0.14em;
}

.coupon-barcode {
  position: absolute;
  top: 14px;
  right: 48px;
  width: 64px;
  height: 26px;
  background: repeating-linear-gradient(
    90deg,
    #1a0b12 0 1px,
    transparent 1px 3px,
    #1a0b12 3px 5px,
    transparent 5px 6px,
    #1a0b12 6px 7px,
    transparent 7px 10px,
    #1a0b12 10px 13px,
    transparent 13px 15px,
    #1a0b12 15px 16px,
    transparent 16px 18px
  );
}

.coupon-rip {
  height: 0;
  border-top: 2px dashed #ff7a1a;
  margin: 0 14px;
}

.coupon-body {
  padding: 0.85rem 1rem 0.9rem;
  background: #fff4e0;
}

.coupon-body .form {
  margin-top: 0.2rem;
}

#reward-form[hidden],
#reward-thanks[hidden] {
  display: none !important;
}

.coupon-body .form label span {
  color: #1a0b12;
  font-weight: 500;
}

.coupon-body .form input[type="email"],
.coupon-body .form input[type="tel"] {
  background: #fffdf8;
  color: #1a0b12;
  border: 1.5px solid #1a0b12;
}

.coupon-body .check {
  color: #1a0b12;
}

.coupon-body .check input {
  accent-color: #ff7a1a;
}

.coupon-done {
  width: 100%;
  min-height: 48px;
  border: 0;
  border-radius: 999px;
  background: #ff7a1a;
  color: #1a0b12;
  font-family: "Chakra Petch", "Segoe UI", sans-serif;
  font-weight: 800;
  font-synthesis: weight;
  font-size: 1.05rem;
  cursor: pointer;
}

.coupon-done:hover { background: #e85d04; }

.coupon-back {
  width: 100%;
  min-height: 44px;
  margin-top: 0.2rem;
  border: 0;
  background: transparent;
  color: #1a0b12;
  font-family: "Chakra Petch", "Segoe UI", sans-serif;
  font-weight: 500;
  text-decoration: underline;
  cursor: pointer;
}

.coupon-claimed {
  position: relative;
  min-height: 140px;
  padding: 0.4rem 0.2rem 0.2rem;
  text-align: center;
}

.coupon-claimed h2 {
  margin: 0.8rem 0 0;
  color: #1a0b12;
  font-family: "Chakra Petch", "Arial Black", "Segoe UI", sans-serif;
  font-size: clamp(1.45rem, 5vw, 1.85rem);
  font-weight: 800;
  font-synthesis: weight;
  line-height: 1.15;
}

.coupon-stamp {
  display: inline-block;
  margin-top: 0.35rem;
  padding: 0.15rem 0.55rem;
  border: 4px solid #c2410c;
  border-radius: 6px;
  color: #c2410c;
  font-family: "Chakra Petch", "Arial Black", "Segoe UI", sans-serif;
  font-size: 1.55rem;
  font-weight: 900;
  font-synthesis: weight;
  letter-spacing: 0.16em;
  line-height: 1.1;
  transform: rotate(-12deg);
}

@media (prefers-reduced-motion: reduce) {
  .coupon-shimmer { animation: none; opacity: 0; }
  .coupon-panel {
    transform: none;
    opacity: 0;
    transition: opacity 200ms ease;
  }
  .coupon-sheet.is-open .coupon-panel { opacity: 1; }
  .coupon-backdrop { transition: opacity 200ms ease; }
}

html.reduce .coupon-shimmer { animation: none; opacity: 0; }

html.reduce .coupon-panel {
  transform: none;
  opacity: 0;
  transition: opacity 200ms ease;
}

html.reduce .coupon-sheet.is-open .coupon-panel { opacity: 1; }
