/* ============================================================
   quiz.css  —  Quiz modal styles for lp (JPMorgan Analytics)
   Color accent: #00cafe (cyan, matches lp branding)
   Font: Inter (same as lp)
   ============================================================ */

/* ============================================================
   OVERLAY
   ============================================================ */
.qz-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 999;
  background: #fff;
  overflow-y: auto;
  font-family: 'Inter', Arial, Helvetica, sans-serif;
}
.qz-overlay.active { display: block; }

/* Utility: hidden screen */
.qz-hidden { display: none !important; }

/* ---- Close button ---- */
.qz-close {
  position: fixed;
  top: 14px;
  right: 14px;
  z-index: 100000;
  width: 40px;
  height: 40px;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 2px 10px rgba(0,0,0,0.15);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: box-shadow 0.2s;
}
.qz-close:hover { box-shadow: 0 4px 16px rgba(0,0,0,0.22); }
.qz-close img { width: 18px; height: 18px; display: block; }

/* ============================================================
   SHARED: screen wrapper
   ============================================================ */
.qz-screen {
  width: 100%;
  min-height: 100vh;
  box-sizing: border-box;
}

/* ============================================================
   SCREEN 1 — INTRO
   ============================================================ */
.qz-intro__inner {
  max-width: 560px;
  margin: 0 auto;
  padding: 48px 24px 40px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.qz-intro__title {
  font-size: 28px;
  font-weight: 700;
  line-height: 1.3;
  color: #111;
  margin: 0 0 16px;
}
@media (min-width: 480px) { .qz-intro__title { font-size: 32px; } }

.qz-intro__subtitle {
  font-size: 15px;
  font-weight: 400;
  line-height: 1.65;
  color: #444;
  margin: 0 0 24px;
}

.qz-intro__image {
  width: 100%;
  max-width: 340px;
  margin: 0 auto 28px;
}
.qz-intro__image img {
  width: 100%;
  height: auto;
  display: block;
}

.qz-intro__btn {
  width: 100%;
  max-width: 420px;
  padding: 16px 24px;
  border: none;
  border-radius: 10px;
  background: #00cafe;
  color: #fff;
  font-family: inherit;
  font-size: 18px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 0 0 0 rgba(0,202,254,0.4);
  animation: qz-pulse 2s ease infinite;
  margin-bottom: 16px;
}
@keyframes qz-pulse {
  0%   { box-shadow: 0 0 0 0 rgba(0,202,254,0.4); }
  70%  { box-shadow: 0 0 0 14px rgba(0,202,254,0); }
  100% { box-shadow: 0 0 0 0 rgba(0,202,254,0); }
}

.qz-intro__disclaimer {
  font-size: 12px;
  line-height: 1.6;
  color: #888;
  margin: 0 0 20px;
}
.qz-intro__disclaimer a { color: #888; text-decoration: underline; }

.qz-intro__footer {
  font-size: 11px;
  color: #bbb;
  line-height: 1.5;
  margin: 0;
}

/* ============================================================
   SCREEN 2 — QUESTIONS
   ============================================================ */
.qz-questions__inner {
  max-width: 540px;
  margin: 0 auto;
  padding: 20px 24px 60px;
}

/* Progress */
.qz-progress {
  display: flex;
  gap: 10px;
  margin-bottom: 4px;
}
.qz-progress__section {
  display: flex;
  flex-direction: column;
}
.qz-progress__section--profile  { flex: 0 0 37%; }
.qz-progress__section--personal { flex: 1 1 auto; }

.qz-progress__track {
  position: relative;
  height: 7px;
  border-radius: 4px;
  background: #e0e0e0;
  overflow: hidden;
}
.qz-progress__section--profile .qz-progress__track { background: #00cafe; }

.qz-progress__fill {
  position: absolute;
  inset: 0 auto 0 0;
  border-radius: 4px;
  background: #00cafe;
  transition: width 280ms ease;
}

.qz-progress__section-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 4px;
}
.qz-progress__label {
  display: block;
  font-size: 10px;
  font-weight: 700;
  color: #00cafe;
  margin-top: 4px;
  text-transform: uppercase;
}
@media (min-width: 375px) { .qz-progress__label { font-size: 12px; } }

.qz-counter {
  font-size: 11px;
  font-weight: 600;
  color: #a0a0a0;
}

/* Back button */
.qz-back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 20px 0 0;
  padding: 0;
  border: none;
  background: transparent;
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  color: #222;
  cursor: pointer;
}
.qz-back img { width: 16px; height: 16px; display: block; }

/* Question block */
.qz-question { display: none; float: none; }
.qz-question.is-active { display: block; float: none; }

.qz-question__title {
  font-size: 22px;
  font-weight: 600;
  line-height: 1.45;
  color: #111;
  margin: 28px 0 24px;
  min-height: 64px;
}
@media (min-width: 480px) { .qz-question__title { font-size: 24px; } }

/* Answer option */
.qz-answer {
  display: flex;
  align-items: center;
  padding: 12px 18px;
  margin-bottom: 12px;
  border-radius: 10px;
  background: #e8f9ff;
  border: 2px solid #e8f9ff;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}
.qz-answer span {
  font-size: 15px;
  font-weight: 500;
  line-height: 1.5;
  color: #222;
}
.qz-answer:hover { border-color: #00cafe; }
.qz-answer.is-selected {
  background: #b8ebf8;
  border-color: #00cafe;
}
/* Q6 multi-choice option */
.qz-answer.is-chosen {
  background: #b8ebf8;
  border-color: #00cafe;
}

.qz-answer--custom { display: block; padding: 10px 16px; }
.qz-custom-input {
  width: 100%;
  border: none;
  background: transparent;
  font-family: inherit;
  font-size: 15px;
  font-weight: 500;
  color: #222;
  outline: none;
}
.qz-custom-input::placeholder { color: #aaa; }

/* Q6 submit */
.qz-submit {
  display: block;
  width: 100%;
  margin-top: 20px;
  margin-left: 0;
  margin-right: 0;
  padding: 16px;
  border: none;
  border-radius: 10px;
  background: #00cafe;
  color: #fff;
  font-family: inherit;
  font-size: 18px;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.2s;
  float: none;
  box-sizing: border-box;
  text-align: center;
}
.qz-submit:hover { opacity: 0.9; }

/* ============================================================
   SCREEN 3 — LOADING
   ============================================================ */
.qz-loading__inner {
  max-width: 560px;
  margin: 0 auto;
  padding: 48px 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
}

/* SVG + label wrapper — always column, centered */
.qz-loader__col {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 28px;
}

/* SVG loader */
.qz-loader {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}
.qz-loader svg {
  transform: rotate(-90deg);
  display: block;
}
.qz-loader__bg   { transition: none; }
.qz-loader__ring { transition: stroke-dashoffset 2s linear; }

.qz-loader__pct {
  position: absolute;
  font-size: 28px;
  font-weight: 700;
  color: #00cafe;
  margin: 0;
  line-height: 1;
}

.qz-loader__label {
  font-size: 16px;
  font-weight: 600;
  color: #111;
  text-align: center;
  margin: 16px 0 0;
}

/* Checklist */
.qz-checklist {
  list-style: none;
  padding: 16px 20px;
  margin: 0;
  width: 100%;
  max-width: 360px;
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 3px 16px rgba(0,19,90,0.1);
  box-sizing: border-box;
}

.qz-checklist__item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 7px 0;
  border-bottom: 1px solid #f0f0f0;
}
.qz-checklist__item:last-child { border-bottom: none; }

.qz-checklist__icon {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.qz-checklist__spinner {
  display: block;
  width: 16px;
  height: 16px;
  border: 2px solid #00cafe;
  border-top-color: transparent;
  border-radius: 50%;
  animation: qz-spin 0.8s linear infinite;
}
@keyframes qz-spin { to { transform: rotate(360deg); } }

.qz-checklist__done {
  display: none;
  width: 20px;
  height: 20px;
}

/* When item is done: hide spinner, show checkmark, full opacity */
.qz-checklist__item.is-done .qz-checklist__spinner { display: none; }
.qz-checklist__item.is-done .qz-checklist__done    { display: block; }
.qz-checklist__item.is-done .qz-checklist__text    { opacity: 1; }

.qz-checklist__text {
  font-size: 14px;
  line-height: 1.4;
  color: #333;
  opacity: 0.45;
  transition: opacity 0.3s;
}
@media (min-width: 360px) { .qz-checklist__text { font-size: 15px; } }

/* ============================================================
   SCREEN 4 — RESULT / FORM
   ============================================================ */
.qz-result__inner {
  max-width: 560px;
  margin: 0 auto;
  padding: 48px 24px 60px;
}

.qz-result__title {
  font-size: 22px;
  font-weight: 700;
  line-height: 1.35;
  color: #111;
  margin: 0 0 14px;
}
@media (min-width: 480px) { .qz-result__title { font-size: 26px; } }

.qz-result__subtitle {
  font-size: 15px;
  line-height: 1.65;
  color: #444;
  margin: 0 0 20px;
}
.qz-result__action-title {
  font-size: 16px;
  font-weight: 700;
  color: #111;
  margin: 0 0 6px;
}
.qz-result__action-text {
  font-size: 15px;
  line-height: 1.6;
  color: #555;
  margin: 0 0 24px;
}

/* Form */
.qz-form {
  display: flex;
  flex-direction: column;
  gap: 0;
}
.qz-form__input {
  display: block;
  width: 100%;
  height: 54px;
  padding: 0 16px;
  margin-bottom: 12px;
  border: 1.5px solid #d0d0d0;
  border-radius: 8px;
  background: #f9fafb;
  font-family: inherit;
  font-size: 15px;
  color: #222;
  outline: none;
  box-sizing: border-box;
  transition: border-color 0.2s;
}
.qz-form__input:focus   { border-color: #00cafe; }
.qz-form__input.false   { border-color: #e33; }
.qz-form__input.valid   { border-color: #00cafe; }
.qz-form__input::placeholder { color: #aaa; }

.qz-form__check-wrap {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 16px;
  cursor: pointer;
}
.qz-form__check-wrap input[type=checkbox] {
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  margin-top: 2px;
  accent-color: #00cafe;
}
.qz-form__check-wrap span {
  font-size: 12px;
  line-height: 1.6;
  color: #555;
}

.qz-form__btn {
  display: block;
  width: 100%;
  padding: 18px;
  border: none;
  border-radius: 10px;
  background: #00cafe;
  color: #fff;
  font-family: inherit;
  font-size: 18px;
  font-weight: 700;
  cursor: pointer;
  transition: opacity 0.2s;
  margin-top: 12px;
  margin-left: 0;
  margin-right: 0;
  float: none;
  box-sizing: border-box;
  text-align: center;
}
.qz-form__btn:hover { opacity: 0.9; }
