/* Offer wall: article loads behind quiz — ~40% visible, lightly blurred */
:root {
  --ae-offerwall-bg-opacity: 0.4;
  --ae-offerwall-bg-blur: 8px;
  --ae-offerwall-scrim: rgba(255, 255, 255, 0.08);
}

body.is-offerwall-open .ae-offerwall-blurred {
  filter: blur(var(--ae-offerwall-bg-blur));
  opacity: var(--ae-offerwall-bg-opacity);
  pointer-events: none;
  user-select: none;
  transition: filter 0.35s ease, opacity 0.35s ease;
}

/* Match site chrome blur to article backdrop during funnel */
body.is-offerwall-open #page > header.site-header,
body.is-offerwall-open #page > footer.site-footer {
  filter: blur(var(--ae-offerwall-bg-blur));
  opacity: var(--ae-offerwall-bg-opacity);
  pointer-events: none;
  user-select: none;
  transition: filter 0.35s ease, opacity 0.35s ease;
}

#av-offerwall__wrapper {
  position: fixed;
  inset: 0;
  z-index: 1000000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
  background: var(--ae-offerwall-scrim);
  backdrop-filter: blur(1px);
  font-family: Inter, Roboto, system-ui, sans-serif;
  pointer-events: auto;
}

.ae-offerwall__panel {
  width: 100%;
  max-width: 520px;
  margin: 0 auto;
  visibility: visible;
  pointer-events: auto;
}

.ae-offerwall__panel--quiz #html_snippet_ae_jobs .elegant-quiz-container {
  width: 100%;
  height: auto;
  min-height: 0;
  max-height: none;
  padding: 28px 0 32px;
  box-shadow: 0 16px 40px rgba(15, 23, 42, 0.22);
  border: 1px solid rgba(15, 23, 42, 0.08);
}

.ae-offerwall__panel--loading {
  min-height: 120px;
}

.ae-offerwall__loading {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 32px 24px;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 16px 40px rgba(15, 23, 42, 0.18);
  color: #374151;
  font-size: 0.9375rem;
  font-weight: 500;
}

.ae-offerwall__loading-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #0f766e;
  animation: ae-offerwall-pulse 1s ease-in-out infinite;
}

.ae-offerwall__loading-dot:nth-child(2) {
  animation-delay: 0.15s;
}

.ae-offerwall__loading-dot:nth-child(3) {
  animation-delay: 0.3s;
}

@keyframes ae-offerwall-pulse {
  0%,
  100% {
    opacity: 0.35;
    transform: scale(0.85);
  }

  50% {
    opacity: 1;
    transform: scale(1);
  }
}

.ae-offerwall__panel--quiz #html_snippet_ae_jobs .elegant-quiz-question-container,
.ae-offerwall__panel--quiz #html_snippet_ae_jobs .elegant-quiz-form-container {
  padding-left: 28px;
  padding-right: 28px;
}

.ae-offerwall__panel--quiz #html_snippet_ae_jobs .elegant-quiz-option {
  background: #fff;
  color: #0f172a;
  border: 2px solid #e2e8f0;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.06);
}

.ae-offerwall__panel--quiz #html_snippet_ae_jobs .elegant-quiz-option:hover {
  border-color: #0f766e;
  background: #f0fdfa;
  box-shadow: 0 8px 20px rgba(15, 118, 110, 0.15);
}

.ae-offerwall__panel--quiz #html_snippet_ae_jobs .elegant-quiz-option__title {
  color: #0f172a;
}

.ae-offerwall__panel--quiz #html_snippet_ae_jobs .elegant-quiz-option__hint {
  color: #64748b;
}

.ae-offerwall__panel--quiz #html_snippet_ae_jobs .elegant-quiz-form-container button {
  background-color: #1f2937;
}

.ae-offerwall__panel--quiz #html_snippet_ae_jobs .elegant-quiz-progress-bar {
  background-color: #0f766e;
}

.ae-video-offer-wall {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.18);
  padding: 32px 28px 28px;
  text-align: center;
}

.ae-video-offer-wall__title {
  margin: 0 0 16px;
  font-size: 1.35rem;
  line-height: 1.35;
  font-weight: 700;
  color: #111827;
}

.ae-video-offer-wall__subtitle {
  margin: 0 0 24px;
  font-size: 1rem;
  line-height: 1.6;
  color: #374151;
}

.ae-video-offer-wall__button,
.ae-offerwall__cta {
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border: 0;
  border-radius: 8px;
  background: #1f2937;
  color: #fff;
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.2;
  padding: 16px 20px;
  cursor: pointer;
}

.ae-video-offer-wall__footnote {
  margin: 16px 0 0;
  font-size: 0.85rem;
  color: #6b7280;
}

.ae-consent-offer-wall {
  padding: 8px 4px 4px;
  text-align: center;
}

.ae-consent-offer-wall__title {
  margin: 0 0 12px;
  font-size: 1.35rem;
  line-height: 1.35;
  font-weight: 700;
  color: #111827;
}

.ae-consent-offer-wall__subtitle {
  margin: 0 0 24px;
  font-size: 0.98rem;
  line-height: 1.55;
  color: #4b5563;
}

.ae-consent-offer-wall__continue {
  margin-bottom: 12px;
}

.ae-consent-skip {
  display: block;
  width: 100%;
  border: 0;
  background: transparent;
  color: #6b7280;
  font-size: 0.95rem;
  font-weight: 500;
  padding: 10px 12px;
  cursor: pointer;
  text-decoration: underline;
}

.ae-consent-skip:hover {
  color: #374151;
}

.ae-consent-offer-wall__legal {
  margin: 16px 0 0;
  font-size: 0.75rem;
  line-height: 1.4;
  color: #9ca3af;
}

.ae-offerwall__panel--consent {
  max-width: 420px;
}

/* Rewarded ad loading buffer — avoids white screen while GAM fills */
#ae-rewarded-loader {
  position: fixed;
  inset: 0;
  z-index: 2000000;
  display: none;
}

#ae-rewarded-loader.is-active {
  display: block;
}

.ae-rewarded-loader__backdrop {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(17, 24, 39, 0.72);
  backdrop-filter: blur(4px);
}

.ae-rewarded-loader--job-wait .ae-rewarded-loader__backdrop {
  background: #f8fafc;
  backdrop-filter: none;
}

.ae-rewarded-loader__box {
  width: min(92vw, 320px);
  padding: 28px 24px;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 20px 40px rgba(15, 23, 42, 0.25);
  text-align: center;
}

.ae-rewarded-loader__box--job {
  width: min(92vw, 380px);
  padding: 36px 28px 32px;
  border: 1px solid #e2e8f0;
  box-shadow: 0 16px 48px rgba(15, 23, 42, 0.12);
}

.ae-rewarded-loader__eyebrow {
  margin: 0 0 20px;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #0f766e;
}

.ae-rewarded-loader--job-wait .ae-rewarded-loader__text {
  display: none;
}

.ae-rewarded-loader__spinner {
  width: 44px;
  height: 44px;
  margin: 0 auto 20px;
  border: 4px solid #e5e7eb;
  border-top-color: #0f766e;
  border-radius: 50%;
  animation: ae-rewarded-spin 0.8s linear infinite;
}

.ae-rewarded-loader--job-wait .ae-rewarded-loader__title {
  margin: 0 0 24px;
  font-size: 1.35rem;
  font-weight: 700;
  line-height: 1.35;
  color: #0f172a;
  min-height: 2.8rem;
  animation: ae-job-msg-pulse 1.8s ease-in-out infinite;
}

.ae-rewarded-loader__steps {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-top: 4px;
}

.ae-rewarded-loader__step {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: #cbd5e1;
  transition: background-color 0.25s ease, transform 0.25s ease;
}

.ae-rewarded-loader__step.is-active {
  background: #0f766e;
  transform: scale(1.15);
}

@keyframes ae-job-msg-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.72; }
}

.ae-rewarded-loader__title {
  margin: 0 0 8px;
  font-size: 1.125rem;
  font-weight: 700;
  color: #111827;
}

.ae-rewarded-loader__text {
  margin: 0;
  font-size: 0.9375rem;
  line-height: 1.5;
  color: #6b7280;
}

body.is-offerwall-open,
body.ae-rewarded-loading,
body.ae-rewarded-active {
  overflow: hidden;
}

/* Hide bottom anchor while offer wall / rewarded is active (avoids half-screen overlap) */
body.is-offerwall-open div[id^="google_ads_iframe_"][style*="bottom"],
body.is-offerwall-open div[id^="google_ads_iframe_"][style*="fixed"],
body.ae-rewarded-loading div[id^="google_ads_iframe_"][style*="bottom"],
body.ae-rewarded-loading div[id^="google_ads_iframe_"][style*="fixed"],
body.ae-rewarded-active div[id^="google_ads_iframe_"][style*="bottom"],
body.ae-rewarded-active div[id^="google_ads_iframe_"][style*="fixed"] {
  visibility: hidden !important;
  pointer-events: none !important;
}

/* Hide offer-wall scrim before rewarded video paints (blur breaks video) */
body.ae-rewarded-loading #av-offerwall__wrapper,
body.ae-rewarded-active #av-offerwall__wrapper {
  display: none !important;
  visibility: hidden !important;
  pointer-events: none !important;
  backdrop-filter: none !important;
}

/* Video rewarded ads fail to render when blur/backdrop filters stay on the page */
body.ae-rewarded-active .ae-offerwall-blurred,
body.ae-rewarded-active #page,
body.ae-rewarded-active #page.ae-offerwall-blurred,
body.ae-rewarded-active #page > header.site-header,
body.ae-rewarded-active #page > footer.site-footer {
  filter: none !important;
  opacity: 1 !important;
  transform: none !important;
  pointer-events: auto !important;
}

@keyframes ae-rewarded-spin {
  to {
    transform: rotate(360deg);
  }
}
