:root {
  --by-discount-green: #086b5f;
  --by-discount-green-dark: #064c44;
  --by-discount-mint: #eaf7f2;
  --by-discount-gold: #f3c456;
  --by-discount-ink: #102f2b;
}

.by-discount-trigger {
  appearance: none;
  min-width: 0;
  border: 1px solid rgba(8, 107, 95, .28);
  border-radius: 13px;
  background: linear-gradient(135deg, #fff 0%, #effaf6 100%);
  color: var(--by-discount-green-dark);
  font-family: inherit;
  font-size: .78rem;
  font-weight: 700;
  line-height: 1.05;
  cursor: pointer;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}

.by-discount-trigger:hover {
  transform: translateY(-1px);
  border-color: var(--by-discount-green);
  box-shadow: 0 7px 18px rgba(8, 107, 95, .13);
}

.by-discount-trigger:focus-visible,
.by-discount-dialog button:focus-visible {
  outline: 3px solid rgba(243, 196, 86, .65);
  outline-offset: 2px;
}

.by-discount-trigger:disabled {
  cursor: wait;
  opacity: .68;
  transform: none;
  box-shadow: none;
}

.by-discount-trigger strong,
.by-discount-trigger span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.by-discount-trigger strong { font-weight: 800; }
.by-discount-trigger span { margin-top: 2px; font-size: .62rem; font-weight: 600; opacity: .78; }

.navigation-buttons.one-button.by-discount-actions-active {
  display: grid;
  grid-template-columns: minmax(132px, .44fr) minmax(210px, 1fr);
  align-items: stretch;
  gap: 10px;
}

.navigation-buttons.one-button .by-discount-trigger--desktop {
  min-height: 100%;
  padding: 8px 12px;
}

.mobile-checkout-bar__actions--configure.by-discount-actions-active {
  display: grid;
  grid-template-columns: auto minmax(82px, .74fr) minmax(126px, 1.26fr);
  align-items: center;
  gap: 6px;
}

.configure-step-mobile-footer .by-discount-trigger--mobile {
  width: 100%;
  min-height: 48px;
  padding: 5px 7px;
  border-radius: 11px;
  font-size: .68rem;
}

.configure-step-mobile-footer .by-discount-trigger--mobile span { font-size: .55rem; }

.by-discount-base-price {
  color: #778682 !important;
  text-decoration: line-through;
  text-decoration-thickness: 1.5px;
}

.by-discount-price-result {
  display: inline-flex;
  min-width: 0;
  align-items: center;
  justify-content: center;
  color: var(--by-discount-green-dark);
  font-family: inherit;
  line-height: 1.05;
}

.by-discount-price-result strong {
  color: inherit;
  font-size: .98em;
  font-weight: 900;
  white-space: nowrap;
}

.price-header .by-discount-price-result { margin-left: 4px; }

.configure-step-mobile-footer .by-discount-price-result {
  max-width: 96px;
  font-size: .74rem;
}

.by-discount-modal-open { overflow: hidden; }

.by-discount-modal {
  position: fixed;
  inset: 0;
  z-index: 2147483000;
  display: grid;
  place-items: center;
  padding: 16px;
}

.by-discount-modal__overlay {
  position: absolute;
  inset: 0;
  background: rgba(7, 30, 27, .68);
  backdrop-filter: blur(5px);
}

.by-discount-dialog {
  position: relative;
  width: min(420px, 100%);
  max-height: calc(100dvh - 32px);
  overflow: auto;
  padding: 30px 24px 22px;
  border: 1px solid rgba(255, 255, 255, .72);
  border-radius: 28px;
  background: radial-gradient(circle at 50% 0%, #f7fff9 0, #fff 52%);
  box-shadow: 0 28px 80px rgba(3, 30, 26, .3);
  color: var(--by-discount-ink);
  font-family: inherit;
  text-align: center;
  animation: by-discount-enter .26s ease-out both;
}

.by-discount-dialog__close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 40px;
  height: 40px;
  border: 1px solid rgba(8, 107, 95, .16);
  border-radius: 50%;
  background: #fff;
  color: var(--by-discount-ink);
  font: 400 1.8rem/1 sans-serif;
  cursor: pointer;
}

.by-discount-dialog__eyebrow {
  display: inline-flex;
  padding: 6px 10px;
  border-radius: 999px;
  background: var(--by-discount-mint);
  color: var(--by-discount-green);
  font-size: .69rem;
  font-weight: 800;
  letter-spacing: .1em;
}

.by-discount-dialog h2 {
  margin: 14px 34px 8px;
  font-size: clamp(1.55rem, 6vw, 2rem);
  line-height: 1.06;
  font-weight: 800;
}

.by-discount-dialog__intro {
  margin: 0 auto 18px;
  max-width: 330px;
  color: #59716d;
  font-size: .9rem;
  line-height: 1.5;
}

.by-discount-reel {
  position: relative;
  margin: 2px 0 16px;
  padding: 18px 0;
  overflow: hidden;
  border: 1px solid rgba(8, 107, 95, .17);
  border-radius: 20px;
  background: linear-gradient(180deg, #f8fffc, #eaf7f2);
  box-shadow: inset 0 1px 8px rgba(8, 107, 95, .08);
}

.by-discount-reel::before,
.by-discount-reel::after {
  content: '';
  position: absolute;
  z-index: 2;
  top: 0;
  bottom: 0;
  width: 54px;
  pointer-events: none;
}

.by-discount-reel::before { left: 0; background: linear-gradient(90deg, #effaf6, transparent); }
.by-discount-reel::after { right: 0; background: linear-gradient(-90deg, #effaf6, transparent); }

.by-discount-reel__pointer {
  position: absolute;
  z-index: 4;
  top: 0;
  left: 50%;
  width: 0;
  height: 0;
  transform: translateX(-50%);
  border-left: 7px solid transparent;
  border-right: 7px solid transparent;
  border-top: 10px solid var(--by-discount-gold);
  filter: drop-shadow(0 2px 2px rgba(95, 65, 0, .2));
}

.by-discount-reel__viewport { overflow: hidden; }

.by-discount-reel__track {
  display: flex;
  gap: 8px;
  width: max-content;
  will-change: transform;
}

.by-discount-reel__item {
  display: grid;
  place-items: center;
  flex: 0 0 68px;
  height: 64px;
  border: 1px solid rgba(8, 107, 95, .16);
  border-radius: 16px;
  background: rgba(255, 255, 255, .92);
  color: var(--by-discount-green-dark);
  font-size: 1.05rem;
  font-weight: 800;
  box-shadow: 0 5px 13px rgba(8, 107, 95, .08);
}

.by-discount-reel__item.is-result {
  border-color: var(--by-discount-gold);
  background: var(--by-discount-green);
  color: #fff;
  box-shadow: 0 0 0 4px rgba(243, 196, 86, .24), 0 9px 22px rgba(8, 107, 95, .22);
  animation: by-discount-win .5s ease both;
}

.by-discount-dialog__message {
  min-height: 2.7em;
  margin: 0 0 14px;
  color: #58706c;
  font-size: .78rem;
  line-height: 1.4;
}

.by-discount-dialog__message[data-kind="success"] { color: var(--by-discount-green); font-weight: 650; }
.by-discount-dialog__message[data-kind="error"] { color: #b1372d; font-weight: 650; }

.by-discount-dialog__action {
  width: 100%;
  min-height: 52px;
  border: 0;
  border-radius: 15px;
  background: var(--by-discount-green);
  color: #fff;
  font-family: inherit;
  font-size: .98rem;
  font-weight: 800;
  line-height: 1.2;
  cursor: pointer;
  box-shadow: 0 10px 24px rgba(8, 107, 95, .2);
}

.by-discount-dialog__action:hover { background: var(--by-discount-green-dark); }
.by-discount-dialog__action:disabled { opacity: .62; cursor: wait; }

.by-discount-dialog__fineprint {
  margin: 12px auto 0;
  max-width: 330px;
  color: #7a8e8a;
  font-size: .66rem;
  line-height: 1.4;
}

@keyframes by-discount-enter {
  from { opacity: 0; transform: translateY(10px) scale(.985); }
}

@keyframes by-discount-win {
  50% { transform: scale(1.12); }
}

@media (max-width: 430px) {
  .by-discount-dialog { padding: 26px 16px 18px; border-radius: 22px; }
  .by-discount-dialog h2 { margin-left: 26px; margin-right: 26px; }
  .by-discount-dialog__close { width: 38px; height: 38px; }
  .mobile-checkout-bar__actions--configure.by-discount-actions-active {
    grid-template-columns: auto minmax(76px, .7fr) minmax(118px, 1.3fr);
    gap: 5px;
  }
}

@media (max-width: 350px) {
  .configure-step-mobile-footer .by-discount-trigger--mobile { padding-inline: 5px; font-size: .62rem; }
  .configure-step-mobile-footer .by-discount-trigger--mobile span { font-size: .5rem; }
  .configure-step-mobile-footer .by-discount-price-result { max-width: 82px; font-size: .68rem; }
}

@media (prefers-reduced-motion: reduce) {
  .by-discount-dialog,
  .by-discount-reel__item.is-result,
  .by-discount-trigger {
    animation: none !important;
    transition: none !important;
  }
}
