/* PRO offer dialog, shared by every CES admin screen: the template catalogues (markup in modules/template/tpl/list.php)
   and the editors (built by ppsgen.backend.prooffer.js, e.g. for a PRO colour palette). */
.ppsgenTemplateProOfferPopup {
  position: fixed;
  inset: 0;
  z-index: 999999;
}

.ppsgenTemplateProOfferPopupBackdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.66);
  backdrop-filter: blur(4px);
}

.ppsgenTemplateProOfferPopupDialog {
  position: absolute;
  top: 50%;
  left: 50%;
  width: calc(100% - 32px);
  max-width: 760px;
  max-height: calc(100vh - 48px);
  overflow-y: auto;
  transform: translate(-50%, -50%);
  padding: 28px 30px;
  border-radius: 24px;
  background:
    radial-gradient(circle at top left, rgba(255, 255, 255, 0.32), transparent 34%),
    linear-gradient(135deg, #111827 0%, #172554 42%, #1d4ed8 100%);
  box-shadow: 0 26px 52px rgba(15, 23, 42, 0.34);
  color: #ffffff;
}

.ppsgenTemplateProOfferPopupClose {
  position: absolute;
  top: 16px;
  right: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.16);
  color: #ffffff;
  text-decoration: none;
}

.ppsgenTemplateProOfferPopupClose:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.22);
}

.ppsgenTemplateProOfferPopupEyebrow {
  margin-bottom: 10px;
  color: #fcd34d;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.65px;
  text-transform: uppercase;
}

.ppsgenTemplateProOfferPopupTitle {
  margin: 0 0 12px;
  color: #ffffff;
  font-size: 34px;
  line-height: 1.08;
  font-weight: 900;
}

.ppsgenTemplateProOfferPopupText {
  margin: 0;
  color: rgba(255, 255, 255, 0.9);
  font-size: 15px;
  line-height: 1.7;
}

.ppsgenTemplateProOfferPopupPrice {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 10px;
  margin-top: 18px;
  padding: 16px 18px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.14);
}

.ppsgenTemplateProOfferPopupPriceLabel,
.ppsgenTemplateProOfferPopupPriceMeta {
  color: rgba(255, 255, 255, 0.82);
  font-size: 13px;
  font-weight: 700;
}

.ppsgenTemplateProOfferPopupPriceValue {
  color: #fcd34d;
  font-size: 34px;
  line-height: 1;
  font-weight: 900;
}

.ppsgenTemplateProOfferPopupPriceValue del {
  opacity: 0.7;
  margin-right: 8px;
  color: rgba(255, 255, 255, 0.86);
}

.ppsgenTemplateProOfferPopupPriceValue strong {
  color: #86efac;
  font-weight: 900;
}

.ppsgenTemplateProOfferPopupList {
  margin: 20px 0 0;
  padding: 0;
  list-style: none;
}

.ppsgenTemplateProOfferPopupList li {
  position: relative;
  margin: 0 0 12px;
  padding-left: 28px;
  color: rgba(255, 255, 255, 0.92);
  font-size: 14px;
  line-height: 1.55;
}

.ppsgenTemplateProOfferPopupList li::before {
  content: '✓';
  position: absolute;
  left: 0;
  top: 0;
  color: #86efac;
  font-size: 18px;
  font-weight: 900;
}

.ppsgenTemplateProOfferPopupActions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 22px;
}

.ppsgenTemplateProOfferPopupBtn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 46px;
  padding: 0 18px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  text-decoration: none;
  font-size: 14px;
  font-weight: 800;
}

.ppsgenTemplateProOfferPopupBtnPrimary {
  background: #fcd34d;
  border-color: #fcd34d;
  color: #101828;
}

.ppsgenTemplateProOfferPopupBtnPrimary:hover {
  color: #101828;
  background: #fde68a;
  border-color: #fde68a;
}

.ppsgenTemplateProOfferPopupBtnSecondary {
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
}

.ppsgenTemplateProOfferPopupBtnSecondary:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.18);
}

@media screen and (max-width: 782px) {
  .ppsgenTemplateProOfferPopupDialog {
    padding: 22px 18px;
    border-radius: 18px;
  }

  .ppsgenTemplateProOfferPopupTitle {
    font-size: 28px;
  }

  .ppsgenTemplateProOfferPopupActions {
    flex-direction: column;
  }

  .ppsgenTemplateProOfferPopupBtn {
    justify-content: center;
  }
}

/* ---- PRO offer, premium look (.ppsgenTemplateProOfferPopupLux) ----
   Deep ink card with soft aurora light, a gradient hairline, the clicked template on the right and one
   bright call to action. */
.ppsgenTemplateProOfferPopupLux .ppsgenTemplateProOfferPopupBackdrop {
  background: radial-gradient(ellipse at 50% 30%, rgba(30, 27, 75, 0.55), rgba(2, 6, 23, 0.84));
  backdrop-filter: blur(10px) saturate(120%);
}

.ppsgenTemplateProOfferPopupLux .ppsgenTemplateProOfferPopupDialog {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: 36px;
  align-items: center;
  max-width: 940px;
  padding: 44px 44px 40px;
  border-radius: 28px;
  background:
    radial-gradient(540px 340px at 0% 0%, rgba(124, 58, 237, 0.36), transparent 62%),
    radial-gradient(480px 320px at 100% 100%, rgba(14, 165, 233, 0.26), transparent 62%),
    radial-gradient(360px 240px at 88% 0%, rgba(236, 72, 153, 0.16), transparent 62%),
    linear-gradient(180deg, #0c1126 0%, #070a17 100%);
  box-shadow: 0 40px 120px rgba(2, 6, 23, 0.7), inset 0 1px 0 rgba(255, 255, 255, 0.08);
  color: #e6e9f5;
  font-family: Inter, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  animation: ppsgenProOfferIn 0.38s cubic-bezier(0.2, 0.9, 0.3, 1) both;
}

@keyframes ppsgenProOfferIn {
  from {
    opacity: 0;
    transform: translate(-50%, -46%) scale(0.97);
  }
  to {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
  }
}

/* a faint grid fading out from the top left, and a gradient hairline around the card */
.ppsgenTemplateProOfferPopupLux .ppsgenTemplateProOfferPopupDialog::before,
.ppsgenTemplateProOfferPopupLux .ppsgenTemplateProOfferPopupDialog::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
}

.ppsgenTemplateProOfferPopupLux .ppsgenTemplateProOfferPopupDialog::before {
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
  background-size: 32px 32px;
  -webkit-mask-image: radial-gradient(ellipse at 20% 0%, #000 0%, transparent 70%);
  mask-image: radial-gradient(ellipse at 20% 0%, #000 0%, transparent 70%);
}

.ppsgenTemplateProOfferPopupLux .ppsgenTemplateProOfferPopupDialog::after {
  padding: 1px;
  background: linear-gradient(135deg, rgba(167, 139, 250, 0.75), rgba(255, 255, 255, 0.06) 42%, rgba(56, 189, 248, 0.55));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
}

.ppsgenTemplateProOfferPopupLux .ppsgenTemplateProOfferPopupMain,
.ppsgenTemplateProOfferPopupLux .ppsgenTemplateProOfferPopupAside {
  position: relative;
  z-index: 1;
  min-width: 0;
}

.ppsgenTemplateProOfferPopupLux .ppsgenTemplateProOfferPopupClose {
  z-index: 2;
  top: 18px;
  right: 18px;
  width: 36px;
  height: 36px;
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.12);
  color: #aab3cf;
  transition: background 0.15s ease, color 0.15s ease;
}

.ppsgenTemplateProOfferPopupLux .ppsgenTemplateProOfferPopupClose:hover {
  background: rgba(255, 255, 255, 0.14);
  color: #ffffff;
}

.ppsgenTemplateProOfferPopupLux .ppsgenTemplateProOfferPopupEyebrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 0;
  padding: 6px 12px 6px 10px;
  border: 1px solid rgba(167, 139, 250, 0.38);
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(167, 139, 250, 0.2), rgba(56, 189, 248, 0.12));
  color: #d6ccff;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
}

.ppsgenTemplateProOfferPopupLux .ppsgenTemplateProOfferPopupEyebrow .dashicons {
  width: 14px;
  height: 14px;
  color: #fbbf24;
  font-size: 14px;
}

.ppsgenTemplateProOfferPopupLux .ppsgenTemplateProOfferPopupTitle {
  margin: 18px 0 14px;
  background: linear-gradient(180deg, #ffffff 35%, #c7d2fe);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  font-size: 36px;
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

.ppsgenTemplateProOfferPopupLux .ppsgenTemplateProOfferPopupText {
  color: #aab3cf;
  font-size: 15px;
  line-height: 1.65;
}

.ppsgenTemplateProOfferPopupLux .ppsgenTemplateProOfferPopupList {
  margin-top: 22px;
}

.ppsgenTemplateProOfferPopupLux .ppsgenTemplateProOfferPopupList li {
  margin-bottom: 12px;
  padding-left: 34px;
  color: #dfe4f5;
  font-size: 14px;
}

.ppsgenTemplateProOfferPopupLux .ppsgenTemplateProOfferPopupList li::before {
  content: '✓';
  top: 0;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: linear-gradient(135deg, #8b5cf6, #0ea5e9);
  box-shadow: 0 0 0 4px rgba(139, 92, 246, 0.14);
  color: #ffffff;
  font-size: 12px;
  font-weight: 800;
  line-height: 22px;
  text-align: center;
}

.ppsgenTemplateProOfferPopupLux .ppsgenTemplateProOfferPopupAside {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* the clicked template, slightly turned towards the text, in a glass frame */
.ppsgenTemplateProOfferPopupLux .ppsgenTemplateProOfferPopupPreview {
  margin: 0;
  padding: 10px 10px 8px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.04);
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.45), 0 0 70px rgba(124, 58, 237, 0.25);
  transform: perspective(900px) rotateY(-6deg) rotateX(2deg);
  transition: transform 0.35s ease;
}

.ppsgenTemplateProOfferPopupLux .ppsgenTemplateProOfferPopupPreview:hover {
  transform: none;
}

.ppsgenTemplateProOfferPopupLux .ppsgenTemplateProOfferPopupPreview[hidden] {
  display: none;
}

.ppsgenTemplateProOfferPopupLux .ppsgenTemplateProOfferPopupPreview img {
  display: block;
  width: 100%;
  height: 168px;
  border-radius: 12px;
  object-fit: cover;
  object-position: top center;
}

.ppsgenTemplateProOfferPopupLux .ppsgenTemplateProOfferPopupPreview figcaption {
  margin-top: 8px;
  overflow: hidden;
  color: #c7d2fe;
  font-size: 12px;
  font-weight: 600;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ppsgenTemplateProOfferPopupLux .ppsgenTemplateProOfferPopupPrice {
  display: grid;
  gap: 6px;
  margin: 0;
  padding: 18px 20px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0.025));
}

.ppsgenTemplateProOfferPopupLux .ppsgenTemplateProOfferPopupPriceLabel {
  color: #94a3c8;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.ppsgenTemplateProOfferPopupLux .ppsgenTemplateProOfferPopupPriceValue {
  color: #94a3c8;
  font-size: 16px;
  font-weight: 600;
}

.ppsgenTemplateProOfferPopupLux .ppsgenTemplateProOfferPopupPriceValue strong {
  background: linear-gradient(90deg, #fde68a, #f59e0b);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  font-size: 46px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.ppsgenTemplateProOfferPopupLux .ppsgenTemplateProOfferPopupPriceMeta {
  color: #8b95b5;
  font-size: 12px;
  font-weight: 500;
}

.ppsgenTemplateProOfferPopupLux .ppsgenTemplateProOfferPopupActions {
  flex-direction: column;
  gap: 8px;
  margin: 0;
}

.ppsgenTemplateProOfferPopupLux .ppsgenTemplateProOfferPopupBtn {
  justify-content: center;
  width: 100%;
  box-sizing: border-box;
}

.ppsgenTemplateProOfferPopupLux .ppsgenTemplateProOfferPopupBtnPrimary {
  position: relative;
  overflow: hidden;
  min-height: 54px;
  border: 0;
  border-radius: 14px;
  background: linear-gradient(135deg, #8b5cf6 0%, #6366f1 45%, #0ea5e9 100%);
  box-shadow: 0 14px 34px rgba(99, 102, 241, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.25);
  color: #ffffff;
  font-size: 15px;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

/* a slow sheen across the button */
.ppsgenTemplateProOfferPopupLux .ppsgenTemplateProOfferPopupBtnPrimary::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(110deg, transparent 30%, rgba(255, 255, 255, 0.35) 50%, transparent 70%);
  transform: translateX(-100%);
  animation: ppsgenProOfferSheen 3.2s ease-in-out infinite;
}

@keyframes ppsgenProOfferSheen {
  0%,
  55% {
    transform: translateX(-100%);
  }
  100% {
    transform: translateX(100%);
  }
}

.ppsgenTemplateProOfferPopupLux .ppsgenTemplateProOfferPopupBtnPrimary:hover {
  background: linear-gradient(135deg, #8b5cf6 0%, #6366f1 45%, #0ea5e9 100%);
  box-shadow: 0 18px 44px rgba(99, 102, 241, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.3);
  color: #ffffff;
  transform: translateY(-1px);
}

.ppsgenTemplateProOfferPopupLux .ppsgenTemplateProOfferPopupBtnSecondary {
  min-height: 40px;
  border: 0;
  background: transparent;
  color: #94a3c8;
  font-size: 13px;
  font-weight: 600;
}

.ppsgenTemplateProOfferPopupLux .ppsgenTemplateProOfferPopupBtnSecondary:hover {
  background: rgba(255, 255, 255, 0.05);
  color: #ffffff;
}

@media screen and (max-width: 782px) {
  .ppsgenTemplateProOfferPopupLux .ppsgenTemplateProOfferPopupDialog {
    grid-template-columns: 1fr;
    gap: 22px;
    padding: 28px 20px 22px;
    border-radius: 22px;
  }

  .ppsgenTemplateProOfferPopupLux .ppsgenTemplateProOfferPopupTitle {
    font-size: 27px;
  }

  .ppsgenTemplateProOfferPopupLux .ppsgenTemplateProOfferPopupPreview {
    transform: none;
  }

  .ppsgenTemplateProOfferPopupLux .ppsgenTemplateProOfferPopupPreview img {
    height: 140px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .ppsgenTemplateProOfferPopupLux .ppsgenTemplateProOfferPopupDialog,
  .ppsgenTemplateProOfferPopupLux .ppsgenTemplateProOfferPopupBtnPrimary::after {
    animation: none;
  }
}

/* Preview built from HTML (ppsgen.backend.prooffer.js), e.g. a PRO colour palette shown large */
.ppsgenTemplateProOfferPopupLux .ppsgenProOfferPreviewBox {
  overflow: hidden;
  height: 168px;
  border-radius: 12px;
}

.ppsgenProOfferPreviewBox .ppsgenPaletteMock {
  height: 100%;
  border-radius: 12px;
  opacity: 1;
}

.ppsgenProOfferPreviewBox .ppsgenPaletteCard {
  gap: 10px;
  width: 62%;
  padding: 18px 20px;
  border-radius: 10px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
}

.ppsgenProOfferPreviewBox .ppsgenPaletteCard i {
  height: 9px;
  border-radius: 5px;
}

.ppsgenProOfferPreviewBox .ppsgenPaletteCard b {
  height: 20px;
  margin-top: 4px;
  border-radius: 6px;
}

@media screen and (max-width: 782px) {
  .ppsgenTemplateProOfferPopupLux .ppsgenProOfferPreviewBox {
    height: 140px;
  }
}
