/* ══════════════════════════════════════════════════════════════
   PROMO POPUP
   Shown on a trigger set in Settings → Outfonts Licenses → Promo popup.
   Self-contained: nothing here depends on the product page styles, so
   it can run on any template.
   ══════════════════════════════════════════════════════════════ */

.acpp-overlay {
  position: fixed;
  inset: 0;
  z-index: 100000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(10, 10, 16, 0.58);
  -webkit-backdrop-filter: blur(3px);
  backdrop-filter: blur(3px);
  opacity: 0;
  transition: opacity 0.25s ease;
  font-family: 'Plus Jakarta Sans', -apple-system, 'Segoe UI', Helvetica, Arial, sans-serif;
}
.acpp-overlay.is-open { display: flex; }
.acpp-overlay.is-visible { opacity: 1; }

.acpp-box {
  position: relative;
  width: 100%;
  max-width: 460px;
  background: #fff;
  border-radius: 22px;
  padding: 38px 34px 30px;
  text-align: center;
  box-shadow: 0 30px 70px rgba(15, 15, 26, 0.32);
  transform: translateY(16px) scale(0.97);
  transition: transform 0.3s cubic-bezier(0.22, 0.61, 0.36, 1);
  overflow: hidden;
}
.acpp-overlay.is-visible .acpp-box { transform: none; }

/* Close */
.acpp-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f4f4f5 !important;
  border: none !important;
  border-radius: 50% !important;
  color: #6b6b73 !important;
  cursor: pointer;
  padding: 0 !important;
  line-height: 1 !important;
  box-shadow: none !important;
  transition: background 0.16s, color 0.16s;
}
.acpp-close:hover { background: #141414 !important; color: #fff !important; }
.acpp-close svg { display: block; }

/* Offer badge */
.acpp-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: #fdecec;
  color: #c02f2f;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 6px 13px;
  border-radius: 20px;
  margin-bottom: 18px;
}
.acpp-badge i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #c02f2f;
  display: inline-block;
}

.acpp-title {
  font-size: 21px;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: #141414;
  margin: 10px 0 8px;
  line-height: 1.25;
}
.acpp-text {
  font-size: 14px;
  line-height: 1.6;
  color: #5c5c66;
  margin: 0 0 22px;
}

.acpp-btn {
  display: block;
  width: 100%;
  height: 54px;
  background: #141414 !important;
  color: #fff !important;
  border: none !important;
  border-radius: 13px !important;
  font-family: inherit;
  font-size: 15.5px;
  font-weight: 800;
  letter-spacing: -0.01em;
  cursor: pointer;
  box-shadow: 0 8px 22px rgba(15, 15, 26, 0.22);
  transition: transform 0.14s, box-shadow 0.18s;
}
.acpp-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 28px rgba(15, 15, 26, 0.3);
}
.acpp-btn:active { transform: none; }

.acpp-note {
  font-size: 11.5px;
  color: #9a9aa2;
  margin: 14px 0 0;
  line-height: 1.5;
}
.acpp-dismiss {
  background: none !important;
  border: none !important;
  padding: 0 !important;
  margin-top: 12px;
  font-family: inherit;
  font-size: 12.5px;
  color: #9a9aa2 !important;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
  box-shadow: none !important;
}
.acpp-dismiss:hover { color: #141414 !important; }

/* ── Claimed state ── */
.acpp-won { display: none; }
.acpp-box.is-won .acpp-offer { display: none; }
.acpp-box.is-won .acpp-won { display: block; }

.acpp-tick {
  width: 62px;
  height: 62px;
  margin: 0 auto 16px;
  border-radius: 50%;
  background: #e6f4ec;
  color: #1a7f45;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: acpp-pop 0.45s cubic-bezier(0.18, 0.89, 0.32, 1.28);
}
@keyframes acpp-pop {
  0% { transform: scale(0.3); opacity: 0; }
  60% { transform: scale(1.12); }
  100% { transform: scale(1); opacity: 1; }
}

/* Coupon code — shown as confirmation, not as homework */
.acpp-applied {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 20px 0 4px;
  padding: 14px 16px;
  background: #f6fbf8;
  border: 1px solid #cfe8d9;
  border-radius: 12px;
}
.acpp-applied-lab {
  font-size: 12.5px;
  font-weight: 700;
  color: #1a7f45;
  white-space: nowrap;
}
.acpp-code {
  font-size: 15px;
  font-weight: 900;
  letter-spacing: 0.1em;
  color: #141414;
  word-break: break-all;
  text-align: right;
}

/* Confetti sits above the card but never blocks a click */
.acpp-confetti {
  position: fixed;
  inset: 0;
  z-index: 100001;
  pointer-events: none;
}

@media (max-width: 520px) {
  .acpp-box { padding: 32px 22px 26px; border-radius: 18px; }
  .acpp-title { font-size: 19px; }
  .acpp-code { font-size: 16px; }
}

/* Someone who prefers less motion still gets the popup, just calmer */
@media (prefers-reduced-motion: reduce) {
  .acpp-overlay,
  .acpp-box,
  .acpp-btn { transition: none; }
  .acpp-tick { animation: none; }
}

/* ══════════════════════════════════════════════════════════════
   IMAGE LAYOUTS
   Recommended sizes, both at 2× so they stay sharp on retina:
     Banner on top   920 × 480 px  (2:1)
     Panel on side   560 × 840 px  (2:3 portrait)
   ══════════════════════════════════════════════════════════════ */
.acpp-box.acpp-none .acpp-main { padding: 0; }

/* ── Banner on top ── */
.acpp-box.acpp-top { padding: 0 0 30px; }
.acpp-box.acpp-top .acpp-main { padding: 0; }
.acpp-banner {
  width: 100%;
  aspect-ratio: 2 / 1;
  overflow: hidden;
  background: #f1f1f3;
  margin-bottom: 26px;
}
.acpp-banner img {
  display: block;
  width: 100%; height: 100%;
  object-fit: cover; object-position: center;
}
.acpp-box.acpp-top .acpp-offer,
.acpp-box.acpp-top .acpp-won { padding: 0 34px; }
/* On a photo the plain close button disappears — give it a backing */
.acpp-box.acpp-top .acpp-close,
.acpp-box.acpp-side .acpp-close {
  background: rgba(255, 255, 255, 0.92) !important;
  box-shadow: 0 2px 8px rgba(15, 15, 26, 0.18) !important;
}

/* ── Panel on the side ── */
.acpp-box.acpp-side {
  display: flex;
  align-items: stretch;
  max-width: 720px;
  padding: 0;
  text-align: left;
}
.acpp-side {
  flex: 0 0 250px;
  background: #f1f1f3;
  overflow: hidden;
}
.acpp-side img {
  display: block;
  width: 100%; height: 100%;
  object-fit: cover; object-position: center;
}
.acpp-box.acpp-side .acpp-main {
  flex: 1 1 auto;
  min-width: 0;
  padding: 38px 34px 30px;
}
.acpp-box.acpp-side .acpp-tick { margin-left: 0; }

@media (max-width: 620px) {
  /* A 250px column leaves nothing for the words — stack it */
  .acpp-box.acpp-side { flex-direction: column; max-width: 460px; text-align: center; }
  .acpp-side { flex: 0 0 auto; aspect-ratio: 2 / 1; width: 100%; }
  .acpp-box.acpp-side .acpp-main { padding: 28px 22px 26px; }
  .acpp-box.acpp-top .acpp-offer,
  .acpp-box.acpp-top .acpp-won { padding: 0 22px; }
}

/* ══════════════════════════════════════════════════════════════
   TYPOGRAPHY
   With the big percentage gone, the heading has to carry the offer.
   It is set tight and large; the body and the ticked points below it
   answer the question the heading raises.
   ══════════════════════════════════════════════════════════════ */
.acpp-badge {
  font-size: 10px;
  letter-spacing: 0.14em;
  padding: 5px 12px;
  margin-bottom: 20px;
  background: #fff;
  border: 1px solid #f0d3d3;
}

.acpp-title {
  font-size: 30px;
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1.12;
  color: #141414;
  margin: 0 0 12px;
  text-wrap: balance;
}
.acpp-text {
  font-size: 14.5px;
  line-height: 1.65;
  color: #5c5c66;
  margin: 0 0 22px;
  max-width: 42ch;
  margin-left: auto;
  margin-right: auto;
}

/* Ticked points — what they actually get */
.acpp-points {
  list-style: none;
  margin: 0 0 24px;
  padding: 20px 0 0;
  border-top: 1px solid #ececee;
  display: flex;
  flex-direction: column;
  gap: 11px;
  text-align: left;
}
.acpp-points li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 13.5px;
  line-height: 1.45;
  color: #3d3d45;
}
.acpp-points li svg {
  flex: 0 0 13px;
  margin-top: 3px;
  color: #1a7f45;
}

.acpp-note {
  font-size: 11.5px;
  color: #9a9aa2;
  letter-spacing: 0.005em;
}

/* Claimed state gets the same treatment */
.acpp-won .acpp-title { font-size: 26px; margin-top: 2px; }
.acpp-won .acpp-text { margin-bottom: 0; }

/* The side layout reads left-aligned, so the body should not be centred */
.acpp-box.acpp-side .acpp-text { margin-left: 0; margin-right: 0; max-width: none; }
.acpp-box.acpp-side .acpp-title { font-size: 28px; }

@media (max-width: 520px) {
  .acpp-title { font-size: 25px; }
  .acpp-won .acpp-title { font-size: 22px; }
  .acpp-text { font-size: 14px; }
}
