.checkout-coupon {
  position: fixed;
  inset: 0;
  margin: auto;
  width: min(26rem, calc(100% - 1.5rem));
  max-height: calc(100dvh - 1.5rem);
  overflow: auto;
  padding: clamp(1.2rem, 5vw, 1.8rem);
  border: 1px solid #fe5ed77a;
  border-radius: 1rem;
  background: radial-gradient(ellipse at 50% 50%, #300e2c, #100911 72%);
  color: var(--white);
  box-shadow: 0 .65rem 2.5rem #000c, 0 0 1.2rem #fe5ed72b;
  text-align: center;
  animation: checkout-coupon-appear .26s ease both;
}

.checkout-coupon::backdrop {
  background: #000c;
  animation: checkout-coupon-backdrop .26s ease both;
}

html:has(.checkout-coupon[open]) { overflow: hidden; }

.checkout-coupon h3 {
  padding-inline: .45rem;
  font-size: clamp(1.55rem, 6vw, 2.6rem);
  line-height: 1.1;
}

.checkout-coupon h3 span {
  display: block;
  color: var(--checkout-accent);
}

.checkout-coupon p {
  margin: .55rem 0 1.05rem;
  color: var(--soft);
  font-size: .875rem;
  line-height: 1.35;
}

.checkout-coupon-close, .checkout-coupon-copy {
  border: 0;
  cursor: var(--interactive-cursor, pointer);
  font: inherit;
}

.checkout-coupon-close {
  position: absolute;
  top: .45rem;
  right: .45rem;
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  background: transparent;
  color: var(--white);
  font-size: 1.4rem;
  line-height: 1;
}

.checkout-coupon-close:hover { background: #fe5ed733; }

.checkout-coupon-printer {
  height: 1.4rem;
  padding: .29rem .6rem;
  border: 1px solid #ffaceb;
  border-radius: 2rem;
  background: linear-gradient(#ff99e4, #b62b9e 42%, #5a164d 60%, #eb56bb);
  box-shadow: 0 .2rem .4rem #000b;
}

.checkout-coupon-printer::before {
  content: "";
  display: block;
  height: 100%;
  border-radius: inherit;
  background: #10050f;
  box-shadow: inset 0 .16rem .28rem #000, 0 1px #ffd2f399;
}

.checkout-coupon-output {
  position: relative;
  width: calc(100% - 2.75rem);
  margin: -.55rem auto 0;
  overflow: hidden;
}

.checkout-coupon-paper {
  padding: .75rem .5rem .6rem;
  background: linear-gradient(#b860a7, transparent .6rem), linear-gradient(115deg, #ffd1b9, #ff94e2 57%, #bfb0ff);
  color: #1b0a1b;
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 5px), 96% 100%, 92% calc(100% - 5px), 88% 100%, 84% calc(100% - 5px), 80% 100%, 76% calc(100% - 5px), 72% 100%, 68% calc(100% - 5px), 64% 100%, 60% calc(100% - 5px), 56% 100%, 52% calc(100% - 5px), 48% 100%, 44% calc(100% - 5px), 40% 100%, 36% calc(100% - 5px), 32% 100%, 28% calc(100% - 5px), 24% 100%, 20% calc(100% - 5px), 16% 100%, 12% calc(100% - 5px), 8% 100%, 4% calc(100% - 5px), 0 100%);
  animation: checkout-coupon-print 1.05s cubic-bezier(.22,.66,.24,1) .2s both;
}

.checkout-coupon.is-copied .checkout-coupon-paper {
  transform: translateY(-101%);
  animation: checkout-coupon-retract .55s cubic-bezier(.5,0,.4,1) both;
}

.checkout-coupon-barcode {
  display: block;
  width: 67%;
  height: .85rem;
  margin: 0 auto .2rem;
  background: repeating-linear-gradient(90deg, currentColor 0 2px, transparent 2px 5px, currentColor 5px 9px, transparent 9px 11px, currentColor 11px 12px, transparent 12px 15px, currentColor 15px 17px, transparent 17px 19px);
}

.checkout-coupon-paper code {
  display: block;
  font: 400 clamp(1.7rem, 8vw, 2.2rem)/1.2 var(--heading-font);
  letter-spacing: .1em;
  user-select: all;
}

.checkout-coupon-copy {
  margin-top: .9rem;
  min-height: 2.75rem;
  padding: .3rem 1rem;
  border-radius: .4rem;
  background: var(--checkout-accent);
  color: #170815;
  font-size: .85rem;
  font-weight: 800;
}

.checkout-coupon-copy:hover:not([aria-disabled="true"]) { background: #ff97e8; }
.checkout-coupon-copy[aria-disabled="true"] { cursor: var(--site-cursor, default); }

.checkout-coupon-status {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
}

@keyframes checkout-coupon-appear {
  from { opacity: 0; transform: translateY(.5rem) scale(.96); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes checkout-coupon-backdrop {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes checkout-coupon-print {
  from { transform: translateY(-101%); }
  52% { transform: translateY(-61%); }
  58% { transform: translateY(-61%); }
  to { transform: translateY(0); }
}

@keyframes checkout-coupon-retract {
  from { transform: var(--retract-from, translateY(0)); }
  to { transform: translateY(-101%); }
}

@media (prefers-reduced-motion: reduce) {
  .checkout-coupon, .checkout-coupon::backdrop, .checkout-coupon-paper,
  .checkout-coupon.is-copied .checkout-coupon-paper { animation: none; }
}
