/* NextWatch AI post-purchase success experience. Loaded only on the homepage. */
:root {
  --nwps-bg: #050713;
  --nwps-panel: rgba(8, 13, 29, 0.96);
  --nwps-panel-2: rgba(14, 18, 39, 0.92);
  --nwps-cyan: #66e3ff;
  --nwps-blue: #315dff;
  --nwps-violet: #8b5cf6;
  --nwps-magenta: #c82cff;
  --nwps-green: #59e0a1;
  --nwps-text: #f8fbff;
  --nwps-muted: #aeb8cf;
}

html.nwps-dialog-open,
html.nwps-dialog-open body {
  overflow: hidden;
}

.nwps-overlay {
  position: fixed;
  inset: 0;
  z-index: 2147483000;
  display: grid;
  place-items: center;
  padding: clamp(14px, 3vw, 34px);
  background:
    radial-gradient(circle at 16% 10%, rgba(49, 93, 255, 0.24), transparent 31%),
    radial-gradient(circle at 84% 18%, rgba(200, 44, 255, 0.2), transparent 30%),
    radial-gradient(circle at 50% 100%, rgba(102, 227, 255, 0.14), transparent 36%),
    rgba(1, 4, 12, 0.82);
  backdrop-filter: blur(18px) saturate(1.15);
  -webkit-backdrop-filter: blur(18px) saturate(1.15);
  opacity: 0;
  transition: opacity 260ms ease;
}

.nwps-overlay.is-visible {
  opacity: 1;
}

.nwps-dialog {
  position: relative;
  isolation: isolate;
  width: min(760px, 100%);
  max-height: min(760px, calc(100vh - 28px));
  overflow: auto;
  border: 1px solid rgba(133, 235, 255, 0.36);
  border-radius: clamp(24px, 4vw, 36px);
  color: var(--nwps-text);
  background:
    radial-gradient(circle at 10% 0%, rgba(102, 227, 255, 0.12), transparent 34%),
    radial-gradient(circle at 100% 100%, rgba(200, 44, 255, 0.14), transparent 36%),
    linear-gradient(145deg, var(--nwps-panel), var(--nwps-panel-2));
  box-shadow:
    0 42px 130px rgba(0, 0, 0, 0.62),
    0 0 70px rgba(68, 207, 255, 0.18),
    0 0 100px rgba(155, 70, 255, 0.12),
    inset 0 0 0 1px rgba(255, 255, 255, 0.035);
  transform: translateY(22px) scale(0.94);
  opacity: 0;
  transition: transform 500ms cubic-bezier(.2,.9,.2,1), opacity 360ms ease;
}

.nwps-overlay.is-visible .nwps-dialog {
  transform: translateY(0) scale(1);
  opacity: 1;
}

.nwps-dialog::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: inherit;
  background: linear-gradient(115deg, transparent 22%, rgba(255,255,255,.075) 42%, transparent 58%);
  transform: translateX(-120%);
  animation: nwps-sweep 5.8s 0.8s ease-in-out infinite;
  pointer-events: none;
}

.nwps-close {
  position: absolute;
  top: 16px;
  right: 16px;
  z-index: 8;
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(159, 177, 211, 0.22);
  border-radius: 50%;
  color: #dfe7ff;
  background: rgba(255,255,255,.045);
  font: 700 24px/1 Arial, sans-serif;
  cursor: pointer;
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease;
}

.nwps-close:hover {
  transform: rotate(7deg) scale(1.05);
  border-color: rgba(102, 227, 255, 0.56);
  background: rgba(102, 227, 255, 0.09);
}

.nwps-content {
  position: relative;
  z-index: 2;
  display: grid;
  justify-items: center;
  padding: clamp(30px, 6vw, 60px) clamp(22px, 7vw, 72px) clamp(28px, 5vw, 52px);
  text-align: center;
}

.nwps-visual {
  position: relative;
  width: 160px;
  height: 160px;
  display: grid;
  place-items: center;
  margin-bottom: 22px;
}

.nwps-orbit,
.nwps-orbit::before,
.nwps-orbit::after {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  content: "";
}

.nwps-orbit {
  border: 1px solid rgba(102, 227, 255, 0.25);
  box-shadow: 0 0 38px rgba(102, 227, 255, 0.16);
  animation: nwps-spin 8s linear infinite;
}

.nwps-orbit::before {
  inset: 14px;
  border: 1px dashed rgba(185, 94, 255, 0.38);
  animation: nwps-spin-reverse 5.5s linear infinite;
}

.nwps-orbit::after {
  inset: 29px;
  border: 1px solid rgba(89, 224, 161, 0.25);
  box-shadow: inset 0 0 24px rgba(89, 224, 161, 0.08);
}

.nwps-core {
  position: relative;
  width: 88px;
  height: 88px;
  display: grid;
  place-items: center;
  border-radius: 28px;
  background: linear-gradient(135deg, var(--nwps-cyan), var(--nwps-blue) 52%, var(--nwps-magenta));
  box-shadow:
    0 0 26px rgba(102, 227, 255, 0.48),
    0 0 58px rgba(139, 92, 246, 0.35),
    inset 0 0 20px rgba(255,255,255,.18);
  animation: nwps-core-pulse 2.6s ease-in-out infinite;
}

.nwps-check {
  width: 41px;
  height: 22px;
  border-left: 6px solid #fff;
  border-bottom: 6px solid #fff;
  transform: translateY(-4px) rotate(-45deg) scale(0);
  filter: drop-shadow(0 3px 8px rgba(0,0,0,.28));
  animation: nwps-check-in 520ms 500ms cubic-bezier(.15,.9,.2,1.3) forwards;
}

.nwps-particle {
  position: absolute;
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: var(--nwps-cyan);
  box-shadow: 0 0 12px currentColor;
  opacity: 0;
  animation: nwps-particle 2.6s var(--delay, 0s) ease-out infinite;
  transform: rotate(var(--angle, 0deg)) translateY(-54px);
}

.nwps-particle:nth-child(2n) { color: #c87cff; background: currentColor; }
.nwps-particle:nth-child(3n) { color: #59e0a1; background: currentColor; }

.nwps-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 13px;
  padding: 8px 12px;
  border: 1px solid rgba(102, 227, 255, 0.25);
  border-radius: 999px;
  color: #aaf5ff;
  background: rgba(102, 227, 255, 0.07);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .15em;
  text-transform: uppercase;
}

.nwps-kicker::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--nwps-green);
  box-shadow: 0 0 13px rgba(89, 224, 161, .85);
}

.nwps-title {
  max-width: 640px;
  margin: 0;
  font-size: clamp(2.1rem, 7vw, 4.55rem);
  line-height: .94;
  letter-spacing: -.055em;
  text-wrap: balance;
}

.nwps-title-gradient {
  display: block;
  margin-top: 6px;
  color: transparent;
  background: linear-gradient(90deg, #8ff3ff, #7a86ff 48%, #d66cff);
  -webkit-background-clip: text;
  background-clip: text;
}

.nwps-message {
  max-width: 590px;
  margin: 20px 0 0;
  color: var(--nwps-muted);
  font-size: clamp(15px, 2.3vw, 18px);
  line-height: 1.68;
  text-wrap: pretty;
}

.nwps-status-card {
  width: min(100%, 560px);
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 13px;
  align-items: center;
  margin-top: 24px;
  padding: 15px 17px;
  border: 1px solid rgba(102, 227, 255, 0.16);
  border-radius: 18px;
  background: rgba(255,255,255,.032);
  text-align: left;
}

.nwps-status-icon {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 13px;
  color: #cffff4;
  background: rgba(89, 224, 161, .11);
  border: 1px solid rgba(89, 224, 161, .28);
  font-size: 18px;
  box-shadow: 0 0 20px rgba(89, 224, 161, .1);
}

.nwps-status-card strong,
.nwps-status-card span {
  display: block;
}

.nwps-status-card strong {
  margin-bottom: 3px;
  color: #edf5ff;
  font-size: 13px;
}

.nwps-status-card span {
  color: #9aa7c5;
  font-size: 12px;
  line-height: 1.45;
}

.nwps-actions {
  width: min(100%, 560px);
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr);
  gap: 11px;
  margin-top: 22px;
}

.nwps-button {
  min-height: 52px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 13px 18px;
  border-radius: 15px;
  font: 900 12px/1.2 Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  letter-spacing: .06em;
  text-decoration: none;
  cursor: pointer;
  transition: transform 190ms ease, box-shadow 190ms ease, border-color 190ms ease;
}

.nwps-button:hover { transform: translateY(-2px); }

.nwps-button-primary {
  border: 1px solid rgba(146, 242, 255, .82);
  color: #fff;
  background: linear-gradient(120deg, rgba(14,101,153,.98), rgba(66,61,207,.98), rgba(177,42,244,.96));
  background-size: 220% 220%;
  box-shadow: 0 0 22px rgba(102, 227, 255, .28), 0 0 35px rgba(198, 44, 255, .2);
  animation: nwps-button-flow 4s ease infinite;
}

.nwps-button-primary:hover {
  box-shadow: 0 0 30px rgba(102, 227, 255, .45), 0 0 48px rgba(198, 44, 255, .28), 0 12px 30px rgba(0,0,0,.28);
}

.nwps-button-secondary {
  border: 1px solid rgba(159, 177, 211, .24);
  color: #dbe7ff;
  background: rgba(255,255,255,.045);
}

.nwps-button-secondary:hover {
  border-color: rgba(102, 227, 255, .45);
  background: rgba(102, 227, 255, .065);
}

.nwps-footnote {
  margin: 16px 0 0;
  color: #7f8ca7;
  font-size: 11px;
  line-height: 1.5;
}

.nwps-mini-brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 18px;
  color: #8fa0bd;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.nwps-mini-brand img {
  width: 22px;
  height: 22px;
  border-radius: 7px;
  object-fit: cover;
  box-shadow: 0 0 15px rgba(102, 227, 255, .24);
}

.nwps-overlay.is-closing {
  opacity: 0;
}

.nwps-overlay.is-closing .nwps-dialog {
  transform: translateY(12px) scale(.97);
  opacity: 0;
}

@keyframes nwps-sweep {
  0%, 55% { transform: translateX(-120%); }
  82%, 100% { transform: translateX(120%); }
}

@keyframes nwps-spin { to { transform: rotate(360deg); } }
@keyframes nwps-spin-reverse { to { transform: rotate(-360deg); } }

@keyframes nwps-core-pulse {
  0%,100% { transform: scale(1); filter: saturate(1); }
  50% { transform: scale(1.055); filter: saturate(1.18); }
}

@keyframes nwps-check-in {
  to { transform: translateY(-4px) rotate(-45deg) scale(1); }
}

@keyframes nwps-particle {
  0% { opacity: 0; transform: rotate(var(--angle)) translateY(-48px) scale(.5); }
  18% { opacity: .9; }
  75%,100% { opacity: 0; transform: rotate(var(--angle)) translateY(-86px) scale(1.15); }
}

@keyframes nwps-button-flow {
  0%,100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

@media (max-width: 620px) {
  .nwps-overlay { padding: 10px; align-items: end; }
  .nwps-dialog { border-radius: 27px 27px 20px 20px; max-height: calc(100vh - 10px); }
  .nwps-content { padding-top: 44px; }
  .nwps-visual { width: 132px; height: 132px; margin-bottom: 17px; }
  .nwps-core { width: 74px; height: 74px; border-radius: 24px; }
  .nwps-check { width: 35px; height: 19px; border-width: 0 0 5px 5px; }
  .nwps-actions { grid-template-columns: 1fr; }
  .nwps-button { min-height: 50px; }
}

@media (prefers-reduced-motion: reduce) {
  .nwps-dialog,
  .nwps-overlay,
  .nwps-orbit,
  .nwps-orbit::before,
  .nwps-core,
  .nwps-particle,
  .nwps-dialog::before,
  .nwps-button-primary {
    animation: none !important;
    transition-duration: 1ms !important;
  }
  .nwps-check { transform: translateY(-4px) rotate(-45deg) scale(1); }
}
