/* Scoped to .pf-root throughout — this component is embedded in WP pages
   alongside theme/plugin CSS, so nothing here may target bare elements or :root. */

.pf-root {
  --pf-green: #34d679;
  --pf-blue: #77c8ff;
  --pf-blue-dark: #65aad9;
  --pf-navy: #0a293e;
  --pf-navy-muted: #45596b;
  --pf-white: #ffffff;
  --pf-border: #d8e3ea;
  --pf-track: rgba(255, 255, 255, 0.55);

  position: relative;
  isolation: isolate;
  box-sizing: border-box;
  /* The theme's nav is fixed and semi-transparent, so it floats over whatever
     is beneath it instead of pushing it down like a normal header. Without
     this, the progress bar and intro load out from under it. */
  padding-top: 107px;
  background-color: #eaf7ff;
  background-image: radial-gradient(circle at bottom left, var(--pf-green) 0%, rgba(52, 214, 121, 0) 35%);
  font-family: "niveau-grotesk", -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  color: var(--pf-navy);
}

.pf-root *,
.pf-root *::before,
.pf-root *::after {
  box-sizing: inherit;
  /* The host page's own global heading/typography CSS (e.g. Elementor's Kit
     styles) targets bare tags like h1/h2 explicitly — an explicit rule beats
     an inherited value no matter its specificity or load order, so without
     this !important, headings inside .pf-root silently pick up the host
     page's font instead of the one set above. */
  font-family: inherit !important;
}

/* progress bar */

.pf-progress-track {
  position: sticky;
  top: 0;
  height: 6px;
  width: 100%;
  background: var(--pf-track);
  border-radius: 999px;
  overflow: hidden;
  margin-bottom: 2.5rem;
}

.pf-progress-fill {
  height: 100%;
  min-width: 30px;
  background: var(--pf-green);
  transition: width 0.35s ease;
}

/* layout shell */

.pf-shell {
  display: flex;
  flex-wrap: wrap;
  gap: 3rem;
  max-width: 1100px;
  margin: 0 auto;
  padding: 100px 1.5rem;
}

.pf-intro {
  flex: 1 1 320px;
  max-width: 420px;
  padding-top: 0.5rem;
}

/* .pf-root prefix (see the same note on .pf-choice above): the host page's
   Elementor Kit CSS sets global font-size directly on h1/h2/p tags via a
   class+tag selector (e.g. ".elementor-kit-52 h1"), which outranks a bare
   single-class selector like ".pf-intro-title" regardless of load order —
   that's what was inflating these to the host's sizes (79px/40px) instead
   of ours. */
.pf-root .pf-intro-title {
  font-size: 3.75rem;
  line-height: 1;
  font-weight: 500;
  margin: 0 0 1rem;
  color: var(--pf-navy);
}

.pf-root .pf-intro-desc {
  font-size: 1rem;
  line-height: 1.6;
  color: var(--pf-navy-muted);
  margin: 0;
}

.pf-panel {
  flex: 1 1 420px;
  max-width: 620px;
}

.pf-root .pf-loading {
  font-size: 1rem;
  color: var(--pf-navy-muted);
}

/* question */

.pf-root .pf-question-text {
  font-size: 1.8125rem;
  line-height: 1.4;
  font-weight: 400;
  margin: 0 0 1.5rem;
  color: var(--pf-navy);
  text-align: center;
}

.pf-choices {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.pf-choices.pf-layout-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 1rem;
}

/* .pf-root prefix (rather than bare .pf-choice) is deliberate: the host
   page's own global button CSS (e.g. Elementor's Kit styles) targets
   `button` tags with a class+tag selector, which otherwise outranks a
   single-class selector regardless of load order. Doubling up on .pf-root
   keeps every rule below comfortably more specific than anything the host
   page can throw at a bare <button>. */
.pf-root .pf-choice {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: 100%;
  padding: 0.9rem 1.25rem;
  border: 1px solid var(--pf-border);
  border-radius: 0.9rem;
  appearance: none;
  background: var(--pf-white);
  color: var(--pf-navy);
  font-size: 1rem;
  font-weight: 500;
  text-align: center;
  line-height: 1.4;
  cursor: pointer;
  /* The host page's reset.css sets `white-space: nowrap` on every <button>;
     without overriding it here, long choice labels (and longer translated
     strings) render on one line and overflow past the button's edges
     instead of wrapping. */
  white-space: normal;
  transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.pf-root .pf-choice:hover,
.pf-root .pf-choice:focus {
  /* background and color are repeated here (not just relying on the base
     rule above) because the host page's own hover/focus rules (e.g.
     Elementor's Kit CSS, the theme's reset.css) are just as specific on
     :hover/:focus as they are elsewhere — without explicit values here too,
     hovering (or a lingering keyboard/click focus, after the mouse has
     already moved away) would flip an unselected choice to the host's fill/
     text color instead of staying white-on-navy. */
  background: var(--pf-white);
  color: var(--pf-navy);
  border-color: var(--pf-navy);
}

.pf-root .pf-choice.is-selected {
  background: var(--pf-navy);
  border-color: var(--pf-navy);
  color: var(--pf-white);
}

.pf-choice-icon {
  width: 2.5rem;
  height: 2.5rem;
  object-fit: contain;
}

/* nav controls */

.pf-nav {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.85rem;
  margin-top: 2rem;
}

.pf-invisible {
  visibility: hidden;
  pointer-events: none;
}

.pf-root .pf-btn-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  max-width: 320px;
  padding: 0.85rem 2rem;
  border: none;
  border-radius: 999px;
  appearance: none;
  background: var(--pf-blue);
  color: var(--pf-navy);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  white-space: normal;
  transition: background-color 0.15s ease;
}

.pf-root .pf-btn-pill:hover,
.pf-root .pf-btn-pill:focus {
  background: var(--pf-blue-dark);
  color: var(--pf-navy);
}

.pf-root .pf-btn-pill:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.pf-root .pf-link-nav {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  appearance: none;
  background: none;
  border: none;
  padding: 0.25rem;
  color: var(--pf-navy-muted);
  font-size: 0.95rem;
  font-weight: 500;
  cursor: pointer;
  white-space: normal;
}

.pf-root .pf-link-nav:hover,
.pf-root .pf-link-nav:focus {
  background: none;
  color: var(--pf-navy);
}

.pf-root .pf-nav-arrow {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
}

.pf-root .pf-nav-arrow-prev {
  transform: rotate(180deg);
}

/* disqualify / done screens */

.pf-message-screen {
  max-width: 480px;
}

.pf-root .pf-message-text {
  font-size: 1.1rem;
  line-height: 1.6;
  color: var(--pf-navy);
  margin: 0 0 1.5rem;
}

.pf-root .pf-btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.75rem 1.75rem;
  border: 1px solid var(--pf-navy);
  border-radius: 999px;
  appearance: none;
  background: transparent;
  color: var(--pf-navy);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  white-space: normal;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.pf-root .pf-btn-secondary:hover,
.pf-root .pf-btn-secondary:focus {
  background: var(--pf-navy);
  color: var(--pf-white);
}

@media (max-width: 760px) {
  .pf-shell {
    flex-direction: column;
    gap: 2.5rem;
    padding-top: 2rem;
  }

  .pf-intro {
    text-align: center;
  }

  .pf-root .pf-intro-title {
    font-size: 2.5rem;
  }

  .pf-intro,
  .pf-panel {
    /* base flex-basis (320px/420px) is a preferred *width* for the desktop
       row layout; in column mode the same numbers become a preferred height,
       forcing empty space below the intro's actual content. */
    flex: 0 0 auto;
    max-width: 100%;
  }
}
