:root {
  --cgpt-popup-red: #ff0002;
  --cgpt-popup-red-deep: #ff0002;
  --cgpt-popup-black: #101011;
  --cgpt-popup-white: #ffffff;
}

body.cgpt-ad-lock {
  overflow: hidden;
}

.cgpt-ad-overlay,
.cgpt-ad-overlay *,
.cgpt-ad-overlay *::before,
.cgpt-ad-overlay *::after {
  box-sizing: border-box;
}

.cgpt-ad-overlay[hidden] {
  display: none;
}

.cgpt-ad-overlay {
  position: fixed;
  inset: 0;
  z-index: 2147483000;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(4, 4, 5, 0.74);
  opacity: 0;
  backdrop-filter: blur(13px) saturate(0.75);
  -webkit-backdrop-filter: blur(13px) saturate(0.75);
  transition: opacity 360ms ease;
}

.cgpt-ad-overlay.cgpt-ad-visible {
  opacity: 1;
}

.cgpt-ad-dialog {
  position: relative;
  display: grid;
  width: min(940px, 100%);
  min-height: 520px;
  grid-template-columns: minmax(0, 0.98fr) minmax(0, 1.02fr);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 34px;
  background: var(--cgpt-popup-black);
  box-shadow:
    0 45px 100px rgba(0, 0, 0, 0.58),
    0 0 0 1px rgba(0, 0, 0, 0.45);
  color: var(--cgpt-popup-white);
  font-family: "Outfit", ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  opacity: 0;
  transform: translateY(38px) scale(0.94);
  transition:
    opacity 620ms cubic-bezier(0.16, 1, 0.3, 1),
    transform 620ms cubic-bezier(0.16, 1, 0.3, 1);
}

.cgpt-ad-visible .cgpt-ad-dialog {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.cgpt-ad-close {
  position: absolute;
  top: 22px;
  right: 22px;
  z-index: 4;
  width: 42px;
  height: 42px;
  margin: 0;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 50%;
  background: rgba(20, 20, 21, 0.55);
  color: #fff;
  cursor: pointer;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: background 180ms ease, transform 180ms ease;
}

.cgpt-ad-close:hover {
  background: var(--cgpt-popup-red);
  transform: rotate(5deg);
}

.cgpt-ad-close:focus-visible,
.cgpt-ad-cta:focus-visible {
  outline: 3px solid #fff;
  outline-offset: 3px;
}

.cgpt-ad-close span {
  position: absolute;
  top: 20px;
  left: 12px;
  width: 17px;
  height: 1.5px;
  border-radius: 2px;
  background: currentColor;
}

.cgpt-ad-close span:first-child {
  transform: rotate(45deg);
}

.cgpt-ad-close span:last-child {
  transform: rotate(-45deg);
}

.cgpt-ad-art {
  position: relative;
  display: grid;
  min-height: 520px;
  place-items: center;
  overflow: hidden;
  background:
    radial-gradient(circle at 21% 18%, rgba(255, 255, 255, 0.16), transparent 24%),
    linear-gradient(145deg, var(--cgpt-popup-red) 0%, var(--cgpt-popup-red-deep) 100%);
}

.cgpt-ad-art::before {
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(255, 255, 255, 0.42) 0.7px, transparent 0.8px);
  background-size: 10px 10px;
  content: "";
  opacity: 0.1;
  mix-blend-mode: overlay;
}

.cgpt-ad-art::after {
  position: absolute;
  right: -55%;
  bottom: -70%;
  width: 130%;
  aspect-ratio: 1;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 50%;
  content: "";
}

.cgpt-ad-art img {
  position: relative;
  z-index: 2;
  display: block;
  width: min(84%, 390px);
  height: auto;
  border: 0;
  filter: drop-shadow(0 28px 34px rgba(0, 0, 0, 0.28));
  animation: cgpt-ad-float 5.2s ease-in-out 950ms infinite;
}

.cgpt-ad-glow {
  position: absolute;
  width: 56%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: #fff;
  filter: blur(70px);
  opacity: 0.2;
}

.cgpt-ad-ring {
  position: absolute;
  z-index: 1;
  border: 1px solid rgba(255, 255, 255, 0.29);
  border-radius: 50%;
}

.cgpt-ad-ring::after {
  position: absolute;
  top: -4px;
  left: 50%;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 15px rgba(255, 255, 255, 0.8);
  content: "";
}

.cgpt-ad-ring-one {
  width: 80%;
  aspect-ratio: 1;
  animation: cgpt-ad-orbit 13s linear infinite;
}

.cgpt-ad-ring-two {
  width: 58%;
  aspect-ratio: 1;
  animation: cgpt-ad-orbit 9s linear infinite reverse;
}

.cgpt-ad-content {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 72px clamp(36px, 5vw, 68px) 52px;
}

.cgpt-ad-content::before {
  position: absolute;
  top: -50px;
  right: -60px;
  width: 190px;
  height: 190px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 50%;
  content: "";
}

.cgpt-ad-eyebrow {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 24px;
  color: #a8a8ab;
  font-family: inherit;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  line-height: 1.2;
  text-transform: uppercase;
}

.cgpt-ad-eyebrow span {
  padding: 5px 8px;
  border-radius: 999px;
  background: var(--cgpt-popup-red);
  color: #fff;
  font-size: 9px;
}

.cgpt-ad-title {
  max-width: 450px;
  margin: 0;
  color: #fff;
  font-family: inherit;
  font-size: clamp(2.55rem, 5vw, 4.45rem);
  font-style: normal;
  font-weight: 600;
  letter-spacing: -0.055em;
  line-height: 0.95;
  text-wrap: balance;
}

.cgpt-ad-title em {
  color: var(--cgpt-popup-red);
  font-style: normal;
}

.cgpt-ad-question {
  margin: 22px 0 32px;
  color: #b9b9bc;
  font-family: inherit;
  font-size: clamp(1.05rem, 2vw, 1.3rem);
  font-weight: 400;
  letter-spacing: -0.015em;
  line-height: 1.4;
}

.cgpt-ad-cta,
.cgpt-ad-cta:link,
.cgpt-ad-cta:visited,
.cgpt-ad-cta:hover,
.cgpt-ad-cta:focus,
.cgpt-ad-cta:active {
  position: relative;
  display: inline-flex;
  width: fit-content;
  min-width: 190px;
  min-height: 58px;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  overflow: hidden;
  padding: 0 20px 0 24px;
  border-radius: 999px;
  background: var(--cgpt-popup-red);
  box-shadow: 0 14px 34px rgba(255, 0, 2, 0.22);
  color: #fff !important;
  font-family: inherit;
  font-size: 14px;
  font-weight: 700;
  line-height: 1;
  text-decoration: none !important;
  transition: box-shadow 220ms ease, transform 220ms ease;
}

.cgpt-ad-cta::before {
  position: absolute;
  top: -100%;
  left: -35%;
  width: 28%;
  height: 300%;
  background: rgba(255, 255, 255, 0.3);
  content: "";
  pointer-events: none;
  transform: rotate(24deg);
  transition: left 520ms ease;
  z-index: 1;
}

.cgpt-ad-cta:hover {
  background: var(--cgpt-popup-red) !important;
  box-shadow: 0 20px 42px rgba(255, 0, 2, 0.32);
  color: #fff !important;
  transform: translateY(-3px);
}

.cgpt-ad-cta:hover::before {
  left: 112%;
}

.cgpt-ad-cta > span,
.cgpt-ad-cta svg {
  position: relative;
  z-index: 2;
}

.cgpt-ad-cta > span {
  color: #fff !important;
  opacity: 1 !important;
  visibility: visible !important;
}

.cgpt-ad-cta svg {
  width: 21px;
  fill: none;
  color: #fff !important;
  stroke: #fff !important;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
  transition: transform 220ms ease;
}

.cgpt-ad-cta:hover svg {
  transform: translateX(3px);
}

.cgpt-ad-caption {
  margin: 22px 0 0;
  color: #77777b;
  font-family: inherit;
  font-size: 11px;
  line-height: 1.5;
}

.cgpt-ad-visible .cgpt-ad-eyebrow,
.cgpt-ad-visible .cgpt-ad-title,
.cgpt-ad-visible .cgpt-ad-question,
.cgpt-ad-visible .cgpt-ad-cta,
.cgpt-ad-visible .cgpt-ad-caption {
  animation: cgpt-ad-content-up 600ms cubic-bezier(0.2, 0.75, 0.2, 1) both;
}

.cgpt-ad-visible .cgpt-ad-title {
  animation-delay: 80ms;
}

.cgpt-ad-visible .cgpt-ad-question {
  animation-delay: 150ms;
}

.cgpt-ad-visible .cgpt-ad-cta {
  animation-delay: 220ms;
}

.cgpt-ad-visible .cgpt-ad-caption {
  animation-delay: 280ms;
}

@keyframes cgpt-ad-content-up {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes cgpt-ad-float {
  0%,
  100% {
    transform: translateY(0) rotate(-1deg);
  }
  50% {
    transform: translateY(-11px) rotate(1deg);
  }
}

@keyframes cgpt-ad-orbit {
  to {
    transform: rotate(360deg);
  }
}

@media (max-width: 820px) {
  .cgpt-ad-dialog {
    max-width: 570px;
    max-height: calc(100vh - 28px);
    grid-template-columns: 1fr;
    overflow-y: auto;
    border-radius: 28px;
  }

  .cgpt-ad-art {
    min-height: 255px;
  }

  .cgpt-ad-art img {
    width: min(59%, 245px);
  }

  .cgpt-ad-ring-one {
    width: 68%;
  }

  .cgpt-ad-ring-two {
    width: 46%;
  }

  .cgpt-ad-content {
    padding: 40px 30px 34px;
  }

  .cgpt-ad-title {
    max-width: 430px;
    font-size: clamp(2.3rem, 10vw, 3.65rem);
  }

  .cgpt-ad-question {
    margin: 18px 0 25px;
  }

  .cgpt-ad-close {
    top: 15px;
    right: 15px;
    background: rgba(0, 0, 0, 0.32);
  }
}

@media (max-width: 520px) {
  .cgpt-ad-overlay {
    align-items: center;
    padding: 14px;
  }

  .cgpt-ad-art {
    min-height: 210px;
  }

  .cgpt-ad-content {
    padding: 34px 24px 28px;
  }

  .cgpt-ad-eyebrow {
    margin-bottom: 18px;
  }

  .cgpt-ad-title {
    font-size: clamp(2.25rem, 11.8vw, 3.1rem);
  }

  .cgpt-ad-cta {
    width: 100%;
  }

  .cgpt-ad-caption {
    display: none;
  }
}

@media (max-height: 690px) and (min-width: 821px) {
  .cgpt-ad-dialog,
  .cgpt-ad-art {
    min-height: 470px;
  }

  .cgpt-ad-content {
    padding-top: 58px;
    padding-bottom: 42px;
  }

  .cgpt-ad-title {
    font-size: clamp(2.55rem, 4.6vw, 3.8rem);
  }
}

@media (prefers-reduced-motion: reduce) {
  .cgpt-ad-overlay,
  .cgpt-ad-overlay *,
  .cgpt-ad-overlay *::before,
  .cgpt-ad-overlay *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
