.pdc-lock {
  overflow: hidden;
}

[data-product-detail-coupon] {
  --pdc-coupon-background-start: #ff5a1f;
  --pdc-coupon-background-end: #ff5a1f;
  --pdc-content-text: #fff;
  --pdc-button-background-start: #ff5a1f;
  --pdc-button-background-end: #ff5a1f;
  --pdc-button-text: #fff;
  --pdc-code-background: #fff;
  --pdc-code-text: #d92d20;
  --pdc-status-text: #ff5a1f;
  --pdc-shell: color-mix(in srgb, var(--pdc-code-background) 84%, var(--pdc-coupon-background-start));
  --pdc-ticket-fill: linear-gradient(180deg, var(--pdc-coupon-background-start), var(--pdc-coupon-background-end));
  box-sizing: border-box;
  width: 100%;
  margin: 12px 0;
  color: var(--pdc-content-text);
  font-family: inherit;
}

[data-product-detail-coupon][hidden],
[data-product-detail-coupon] [hidden] {
  display: none !important;
}

[data-product-detail-coupon] *,
[data-product-detail-coupon] *::before,
[data-product-detail-coupon] *::after {
  box-sizing: border-box;
}

.pdc-ticket {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(126px, auto);
  min-height: 84px;
  overflow: hidden;
  border: 0;
  border-radius: 12px;
  background: var(--pdc-shell);
  padding: 6px;
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--pdc-content-text) 8%, transparent);
}

.pdc-ticket__action::before,
.pdc-ticket__action::after {
  position: absolute;
  z-index: 1;
  left: -6px;
  width: 12px;
  height: 12px;
  border: 0;
  border-radius: 50%;
  background: var(--pdc-shell);
  content: "";
}

.pdc-ticket__action::before { top: -6px; }
.pdc-ticket__action::after { bottom: -6px; }

.pdc-ticket__offer {
  display: flex;
  min-width: 0;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  border-radius: 8px 0 0 8px;
  background: var(--pdc-ticket-fill);
  color: var(--pdc-content-text);
  padding: 10px 18px;
  transition: background-color .2s ease,color .2s ease;
}

.pdc-ticket__offer strong {
  overflow-wrap: anywhere;
  font-size: 17px;
  font-weight: 600;
  line-height: 1.2;
}

.pdc-ticket__offer span {
  opacity: .82;
  font-size: 12px;
  line-height: 1.35;
}

.pdc-ticket__action {
  position: relative;
  display: flex;
  min-width: 120px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-left: 1px dashed color-mix(in srgb, var(--pdc-content-text) 72%, transparent);
  border-radius: 0 8px 8px 0;
  background: var(--pdc-ticket-fill);
  color: var(--pdc-content-text);
  padding: 10px 14px;
  transition: background-color .2s ease,color .2s ease;
}

.pdc-ticket.is-revealed {
  grid-template-columns: minmax(0, 1fr) minmax(190px, 42%);
}

.pdc-ticket.is-revealed .pdc-ticket__action {
  min-width: 0;
}

.pdc-ticket.is-revealed .pdc-ticket__action [data-pdc-code] {
  width: 100%;
  max-width: 190px;
}

.pdc-ticket__action [data-pdc-get] {
  min-width: 82px;
  min-height: 36px;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(180deg, var(--pdc-button-background-start), var(--pdc-button-background-end));
  color: var(--pdc-button-text);
  font: inherit;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 6px 16px color-mix(in srgb, var(--pdc-button-background-end) 24%, transparent);
  transition: transform .18s ease,filter .18s ease;
}

.pdc-ticket__action [data-pdc-get]:hover { filter: brightness(.97); transform: translateY(-1px); }

.pdc-ticket__action [data-pdc-get]:disabled {
  cursor: wait;
  opacity: .55;
}

.pdc-ticket__action button:focus-visible,
.pdc-share-actions button:focus-visible,
.pdc-dialog__close:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 2px;
}

[data-pdc-code] {
  max-width: 170px;
  min-height: 38px;
  border: 0;
  border-radius: 999px;
  background: var(--pdc-code-background);
  color: var(--pdc-code-text);
  padding: 8px 14px;
  overflow-wrap: anywhere;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 13px;
  font-weight: 700;
  text-align: center;
  cursor: copy;
  box-shadow: 0 6px 16px rgb(0 0 0 / .08);
  transition: transform .18s ease,box-shadow .18s ease;
}

[data-pdc-code]:hover { transform: translateY(-1px); box-shadow: 0 8px 20px rgb(0 0 0 / .12); }

.pdc-status {
  min-height: 18px;
  margin: 4px 2px 0;
  color: var(--pdc-status-text);
  font-size: 12px;
  line-height: 1.4;
}

.pdc-status:empty {
  display: none;
}

.pdc-overlay {
  position: fixed;
  z-index: 2147483000;
  inset: 0;
  overflow: auto;
  padding: 24px;
  background: rgb(17 24 39 / .52);
  backdrop-filter: blur(2px);
}

.pdc-dialog {
  position: relative;
  width: min(520px, 100%);
  margin: 6vh auto;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  background: #fff;
  color: #171717;
  padding: 28px 30px 26px;
  box-shadow: 0 24px 70px rgb(0 0 0 / .24);
  text-align: center;
  outline: 0;
}

.pdc-dialog h2 {
  margin: 0;
  padding-right: 28px;
  font-size: 24px;
  font-weight: 500;
  line-height: 1.25;
  text-align: left;
}

.pdc-dialog > p {
  max-width: 390px;
  margin: 28px auto 0;
  color: #6b7280;
  font-size: 14px;
  line-height: 1.55;
}

.pdc-dialog__close {
  position: absolute;
  top: 16px;
  right: 18px;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: #171717;
  font-size: 30px;
  line-height: 1;
  cursor: pointer;
}

.pdc-envelope {
  position: relative;
  width: 140px;
  height: 170px;
  margin: 32px auto 0;
  overflow: hidden;
  border-radius: 10px;
  background: linear-gradient(180deg, #ff4f62, #dc202d);
  box-shadow: 0 16px 30px rgb(220 32 45 / .2);
}

.pdc-envelope::before {
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  height: 86px;
  border-bottom: 2px solid #ffd25a;
  border-radius: 0 0 50% 50%;
  background: linear-gradient(180deg, #ff5368, #ee3042);
  box-shadow: 0 4px 8px rgb(152 14 28 / .15);
  content: "";
}

.pdc-envelope span {
  position: absolute;
  z-index: 1;
  top: 65px;
  left: 50%;
  display: grid;
  width: 42px;
  height: 42px;
  transform: translateX(-50%);
  border: 4px solid #ffd04a;
  border-radius: 50%;
  background: #ffb923;
  color: #d98600;
  font-size: 20px;
  font-weight: 800;
  place-items: center;
}

.pdc-share-actions {
  display: grid;
  grid-template-columns: repeat(10, 36px);
  justify-content: center;
  gap: 10px;
  margin-top: 30px;
  border-top: 1px solid #e5e7eb;
  padding-top: 24px;
}

.pdc-share-actions button {
  display: grid;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: #111;
  padding: 0;
  font: inherit;
  cursor: pointer;
  place-items: center;
  transition: background-color .18s ease,transform .18s ease;
}

.pdc-share-actions svg { width: 18px; height: 18px; fill: currentColor; }
.pdc-icon-sprite { position: absolute; width: 0; height: 0; overflow: hidden; }

.pdc-share-actions button:hover {
  background: #f3f4f6;
  transform: translateY(-1px);
}

@media (max-width: 520px) {
  .pdc-ticket {
    grid-template-columns: minmax(0, 1fr) 108px;
    min-height: 78px;
    border-radius: 10px;
    padding: 6px;
  }
  .pdc-ticket.is-revealed { grid-template-columns: minmax(0, 1fr) minmax(126px, 44%); }
  .pdc-ticket__offer { padding-inline: 14px; }
  .pdc-ticket__action { min-width: 108px; padding-inline: 10px; }
  .pdc-ticket.is-revealed .pdc-ticket__action [data-pdc-code] { max-width: 112px; }
  .pdc-overlay { padding: 0; }
  .pdc-dialog {
    min-height: 100%;
    margin: 0;
    border-radius: 0;
    padding: 24px 18px;
  }
  .pdc-share-actions { grid-template-columns: repeat(5, 36px); row-gap: 12px; }
}

@media (prefers-reduced-motion: reduce) {
  [data-product-detail-coupon] * { scroll-behavior: auto !important; transition: none !important; }
}
