/**
 * First-time buyer coupon UX — copy toast + How to Use modal (index + case guides).
 * Mirrors APP_SHOPPINGCOUPONS (HTML dump index(2).js).
 */

/* Toast (moi.alertInfo success equivalent) */
.cd-coupon-toast {
  position: fixed;
  top: 24px;
  left: 50%;
  z-index: 100000001;
  display: flex;
  align-items: center;
  gap: 8px;
  max-width: calc(100% - 32px);
  padding: 10px 16px;
  color: #fff;
  font-size: 14px;
  line-height: 1.3;
  background: #1d1f21;
  border-radius: 6px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
  transform: translate(-50%, -12px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
}
.cd-coupon-toast.is-on {
  opacity: 1;
  transform: translate(-50%, 0);
}
.cd-coupon-toast--success {
  background: #2c676a;
}

/* How to Use modal (D.createModal width:600, hideCrossLine, zIndex:1e8) */
.app-shoppingcoupons_modal {
  position: fixed;
  inset: 0;
  z-index: 100000000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgba(0, 0, 0, 0.2);
  box-sizing: border-box;
}
.app-shoppingcoupons_modal.is-open {
  display: flex;
}
.app-shoppingcoupons_modal-core {
  position: relative;
  width: 600px;
  max-width: calc(100% - 32px);
  max-height: calc(100vh - 32px);
  overflow: auto;
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.18);
}
.app-shoppingcoupons_modal .app_modal-header {
  position: sticky;
  top: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-sizing: border-box;
  height: 80px;
  padding: 0 32px;
  background: #fff;
  border-bottom: 0;
}
.app-shoppingcoupons_modal-title {
  max-width: 85%;
  overflow: hidden;
  margin: 0;
  padding: 0;
  color: #1d1f21;
  font-size: 24px;
  font-weight: 600;
  line-height: 1.2;
  text-align: left;
  white-space: nowrap;
  text-overflow: ellipsis;
  cursor: pointer;
  background: transparent;
  border: 0;
}
.app-shoppingcoupons_modal.is-detail .app-shoppingcoupons_modal-title {
  cursor: pointer;
}
.app-shoppingcoupons_modal-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  padding: 0;
  color: #1d1f21;
  cursor: pointer;
  background: transparent;
  border: 0;
  transform: translateX(8px);
}
.app-shoppingcoupons_modal-close svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

.cd-coupon-howto-main {
  padding: 0;
}
.cd-coupon-howto-page[hidden] {
  display: none !important;
}
.cd-coupon-howto-nav {
  box-sizing: border-box;
  padding: 8px 32px 48px;
}
.cd-coupon-howto-nav-link {
  display: block;
  width: 100%;
  margin: 0 0 28px;
  padding: 0;
  color: #1d1f21;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.45;
  text-align: left;
  cursor: pointer;
  background: transparent;
  border: 0;
}
.cd-coupon-howto-nav-link:last-child {
  margin-bottom: 0;
}
.cd-coupon-howto-nav-link:hover,
.cd-coupon-howto-nav-link:focus-visible {
  color: #1d1f21;
  text-decoration: underline;
  outline: none;
}

.cd-coupon-howto-shots {
  padding: 0 0 24px;
}
.cd-coupon-howto-img {
  display: block;
  width: 100%;
  height: auto;
}
.cd-coupon-howto-fallback-note {
  margin: 0;
  padding: 0 32px 32px;
  color: #1d1f21;
  font-size: 14px;
  line-height: 1.5;
}

.app_shoppingcoupons-wrap .Prompt_button,
.cd-checkout-promo-header .Prompt_button,
.product_detail_default .Prompt_button {
  cursor: pointer !important;
}

.app_shoppingcoupons-code.is-copied {
  outline: 1px solid #2c676a;
}

@media (max-width: 688px) {
  .app-shoppingcoupons_modal .app_modal-header {
    height: 64px;
    padding: 0 16px;
  }
  .app-shoppingcoupons_modal-title {
    font-size: 20px;
  }
  .cd-coupon-howto-nav {
    padding: 4px 16px 32px;
  }
  .cd-coupon-howto-nav-link {
    margin-bottom: 22px;
    font-size: 15px;
  }
}
