/* ============================================================
   TWC QUIZ — partials/quiz.css
   Scoped to .twc-quiz to avoid theme conflicts
   ============================================================ */

/* ── Variables ── */
.twc-quiz-section {
  --twc-navy:       #060f1d;
  --twc-navy-light: #0d1c31;
  --twc-teal:       #0976bb;
  --twc-teal-light: #1a8fd4;
  --twc-teal-glow:  rgba(9, 118, 187, 0.12);
  --twc-sand:       #dde1e7;
  --twc-sand-dark:  #c8cdd6;
  --twc-warm-white: #f0f2f5;
  --twc-text-dark:  #060f1d;
  --twc-text-mid:   #3a4557;
  --twc-text-light: #8a96a8;
  --twc-gold:       #07639c;
  --twc-coral:      #b3492f;
}

/* ── Scoped reset ── */
.twc-quiz,
.twc-quiz * {
  box-sizing: border-box;
}

/* ── Section wrapper ── */
.twc-quiz-section {
  background: var(--twc-navy);
  padding: 80px 24px;
}

.twc-quiz-section__inner {
  max-width: 760px;
  margin: 0 auto;
}

.twc-quiz-section__header {
  text-align: center;
  margin-bottom: 48px;
}

.twc-quiz-section__header .twc-section-label {
  color: var(--twc-teal);
}

.twc-quiz-section__header .twc-section-title {
  color: var(--twc-warm-white);
}

/* ── Intro screen ── */
.twc-quiz__intro::after {
  content: '';
  position: absolute;
  bottom: -40px;
  left: 50%;
  transform: translateX(-50%) rotate(45deg);
  width: 80px;
  height: 80px;
  background: var(--twc-navy);
  z-index: 1;
}

.twc-quiz__intro {
  position: relative;
  overflow: visible;
  background: var(--twc-navy);
  border-radius: 16px;
  padding: 60px 40px;
  text-align: center;
  color: #fff;
}

.twc-quiz__intro h2 {
  color: #fff;
  font-size: clamp(24px, 5vw, 36px);
  margin-bottom: 14px;
  line-height: 1.2;
}

.twc-quiz__intro p {
  color: rgba(255, 255, 255, 0.72);
  font-size: clamp(15px, 2.5vw, 17px);
  max-width: 500px;
  margin: 0 auto 28px;
  line-height: 1.65;
}

.twc-quiz__meta {
  display: flex;
  gap: 24px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 32px;
}

.twc-quiz__meta span {
  color: var(--twc-teal-light);
  font-size: 13px;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 6px;
}

.twc-quiz__meta span::before {
  content: '';
  width: 6px;
  height: 6px;
  background: var(--twc-teal);
  border-radius: 50%;
  display: inline-block;
  flex-shrink: 0;
}

/* ── Start button ── */
.twc-quiz__start-btn {
  background: var(--twc-teal);
  color: #fff;
  border: none;
  border-radius: 12px;
  padding: 16px 44px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
  font-family: inherit;
}

.twc-quiz__start-btn:hover {
  background: var(--twc-teal-light);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(42, 157, 143, 0.35);
}

/* ── Progress bar ── */
.twc-quiz__progress {
  display: none;
  padding: 14px 0 0;
}

.twc-quiz__progress-inner {
  display: flex;
  align-items: center;
  gap: 12px;
}

.twc-quiz__progress-bar {
  flex: 1;
  height: 6px;
  background: var(--twc-sand-dark);
  border-radius: 3px;
  overflow: hidden;
}

.twc-quiz__progress-fill {
  height: 100%;
  background: var(--twc-teal);
  border-radius: 3px;
  transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  width: 0%;
}

.twc-quiz__progress-label {
  font-size: 13px;
  color: var(--twc-text-light);
  font-weight: 500;
  min-width: 60px;
  text-align: right;
}

/* ── Body / question area ── */
.twc-quiz__body {
  background: var(--twc-warm-white);
  border-radius: 16px;
  padding: 36px 40px 40px;
  margin-top: 24px;
}

/* ── Question card ── */
.twc-quiz__qcard {
  animation: twcSlideUp 0.32s ease-out;
}

@keyframes twcSlideUp {
  from { opacity: 0; transform: translateY(18px); }
  to   { opacity: 1; transform: translateY(0); }
}

.twc-quiz__q-num {
  font-size: 12px;
  font-weight: 600;
  color: var(--twc-teal);
  text-transform: uppercase;
  letter-spacing: 1.5px;
  margin-bottom: 8px;
}

.twc-quiz__q-text {
  font-size: clamp(21px, 4vw, 26px);
  font-weight: 600;
  line-height: 1.32;
  margin-bottom: 6px;
  color: var(--twc-navy);
}

.twc-quiz__q-sub {
  font-size: 14px;
  color: var(--twc-text-light);
  margin-bottom: 22px;
  line-height: 1.5;
}

.twc-quiz__multi-hint {
  font-size: 12px;
  color: var(--twc-text-light);
  font-style: italic;
  margin-bottom: 10px;
}

/* ── Options ── */
.twc-quiz__options {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 24px;
}

.twc-quiz__opt {
  background: #fff;
  border: 2px solid var(--twc-sand-dark);
  border-radius: 12px;
  padding: 15px 20px;
  text-align: left;
  font-size: 15px;
  color: var(--twc-text-dark);
  cursor: pointer;
  transition: border-color 0.18s, background 0.18s;
  line-height: 1.45;
  position: relative;
  width: 100%;
  font-family: inherit;
}

.twc-quiz__opt:hover {
  border-color: var(--twc-teal);
  background: var(--twc-teal-glow);
}

.twc-quiz__opt.is-selected {
  border-color: var(--twc-teal);
  background: var(--twc-teal-glow);
  font-weight: 500;
}

.twc-quiz__opt.is-selected::after {
  content: '\2713';
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--twc-teal);
  font-weight: 700;
  font-size: 16px;
}

/* ── Navigation ── */
.twc-quiz__nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.twc-quiz__back {
  background: none;
  border: none;
  font-size: 14px;
  color: var(--twc-text-light);
  cursor: pointer;
  padding: 8px 0;
  transition: color 0.18s;
  font-family: inherit;
}

.twc-quiz__back:hover { color: var(--twc-text-dark); }

.twc-quiz__next {
  background: var(--twc-teal);
  color: #fff;
  border: none;
  border-radius: 10px;
  padding: 13px 30px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  opacity: 0.4;
  pointer-events: none;
  transition: opacity 0.2s, background 0.2s, transform 0.2s, box-shadow 0.2s;
  font-family: inherit;
}

.twc-quiz__next.is-enabled {
  opacity: 1;
  pointer-events: auto;
}

.twc-quiz__next.is-enabled:hover {
  background: var(--twc-teal-light);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(42, 157, 143, 0.3);
}

/* ── Results ── */
.twc-quiz__results {
  animation: twcSlideUp 0.4s ease-out;
}

.twc-quiz__results-header {
  text-align: center;
  margin-bottom: 32px;
}

.twc-quiz__results-header h2 {
  font-size: clamp(24px, 4.5vw, 32px);
  font-weight: 600;
  color: var(--twc-navy);
  margin-bottom: 10px;
}

.twc-quiz__results-header p {
  font-size: 15px;
  color: var(--twc-text-mid);
  max-width: 480px;
  margin: 0 auto;
  line-height: 1.6;
}

/* ── Service card ── */
.twc-quiz__svc {
  background: #fff;
  border-radius: 14px;
  padding: 22px 24px;
  margin-bottom: 14px;
  border: 1px solid var(--twc-sand-dark);
  transition: box-shadow 0.25s;
}

.twc-quiz__svc:hover { box-shadow: 0 4px 18px rgba(0, 0, 0, 0.06); }

.twc-quiz__svc--high   { border-left: 4px solid var(--twc-teal); }
.twc-quiz__svc--medium { border-left: 4px solid var(--twc-gold); }
.twc-quiz__svc--low    { border-left: 4px solid var(--twc-sand-dark); opacity: 0.65; }

.twc-quiz__svc-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 10px;
}

.twc-quiz__svc-name {
  font-size: 17px;
  font-weight: 600;
  color: var(--twc-navy);
  line-height: 1.3;
}

.twc-quiz__svc-pct {
  font-size: 26px;
  font-weight: 700;
  line-height: 1;
  flex-shrink: 0;
}

.twc-quiz__svc-pct--high   { color: var(--twc-teal); }
.twc-quiz__svc-pct--medium { color: var(--twc-gold); }
.twc-quiz__svc-pct--low    { color: var(--twc-text-light); }

/* Match tag */
.twc-quiz__tag {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  padding: 3px 9px;
  border-radius: 4px;
  margin-bottom: 10px;
}

.twc-quiz__tag--high   { background: rgba(42, 157, 143, 0.12); color: var(--twc-teal); }
.twc-quiz__tag--medium { background: rgba(212, 168, 83, 0.15);  color: #b8922e; }
.twc-quiz__tag--low    { background: var(--twc-sand);           color: var(--twc-text-light); }

/* Progress bar */
.twc-quiz__bar-track {
  height: 6px;
  background: var(--twc-sand);
  border-radius: 3px;
  margin-bottom: 12px;
  overflow: hidden;
}

.twc-quiz__bar-fill {
  height: 100%;
  border-radius: 3px;
  transition: width 1s cubic-bezier(0.4, 0, 0.2, 1);
  width: 0%;
}

.twc-quiz__bar-fill--high   { background: var(--twc-teal); }
.twc-quiz__bar-fill--medium { background: var(--twc-gold); }
.twc-quiz__bar-fill--low    { background: var(--twc-text-light); }

/* Reasons */
.twc-quiz__reasons {
  font-size: 14px;
  color: var(--twc-text-mid);
  line-height: 1.6;
}

.twc-quiz__reason {
  margin-bottom: 4px;
  padding-left: 18px;
  position: relative;
}

.twc-quiz__reason::before {
  content: '\2192';
  position: absolute;
  left: 0;
  color: var(--twc-teal);
  font-weight: 600;
}

/* ── Email capture card ── */
.twc-quiz__email-card {
  background: #fff;
  border-radius: 14px;
  padding: 28px;
  margin-top: 20px;
  border: 2px solid var(--twc-sand-dark);
  text-align: center;
}

.twc-quiz__email-card h3 {
  font-size: 19px;
  font-weight: 600;
  color: var(--twc-navy);
  margin-bottom: 6px;
}

.twc-quiz__email-card p {
  font-size: 14px;
  color: var(--twc-text-mid);
  margin-bottom: 18px;
  line-height: 1.5;
}

.twc-quiz__email-fields {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: 400px;
  margin: 0 auto 16px;
}

.twc-quiz__email-input {
  border: 2px solid var(--twc-sand-dark);
  border-radius: 10px;
  padding: 13px 16px;
  font-family: inherit;
  font-size: 15px;
  color: var(--twc-text-dark);
  outline: none;
  transition: border-color 0.18s;
  width: 100%;
}

.twc-quiz__email-input:focus {
  border-color: var(--twc-teal);
}

.twc-quiz__email-input::placeholder {
  color: var(--twc-text-light);
}

.twc-quiz__email-send {
  background: var(--twc-teal);
  color: #fff;
  border: none;
  border-radius: 10px;
  padding: 13px 28px;
  font-family: inherit;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s ease;
  width: 100%;
}

.twc-quiz__email-send:hover {
  background: var(--twc-teal-light);
}

.twc-quiz__email-send:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.twc-quiz__email-status {
  font-size: 13px;
  margin-top: 8px;
  line-height: 1.4;
}

.twc-quiz__email-status.is-success { color: var(--twc-teal); }
.twc-quiz__email-status.is-error   { color: var(--twc-coral); }

/* ── CTA card ── */
.twc-quiz__cta {
  background: var(--twc-navy);
  border-radius: 14px;
  padding: 40px 32px;
  text-align: center;
  margin-top: 28px;
}

.twc-quiz__cta h3 {
  color: #fff;
  font-size: 22px;
  font-weight: 600;
  margin-bottom: 10px;
}

.twc-quiz__cta p {
  color: rgba(255, 255, 255, 0.65);
  font-size: 14px;
  margin-bottom: 24px;
  line-height: 1.55;
  max-width: 420px;
  margin-left: auto;
  margin-right: auto;
}

.twc-quiz__cta-btn {
  display: inline-block;
  background: var(--twc-teal);
  color: #fff;
  border-radius: 10px;
  padding: 14px 36px;
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  transition: background 0.2s, transform 0.2s;
}

.twc-quiz__cta-btn:hover {
  background: var(--twc-teal-light);
  transform: translateY(-1px);
  color: #fff;
  text-decoration: none;
}

.twc-quiz__retake {
  display: block;
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.45);
  font-size: 13px;
  cursor: pointer;
  margin: 16px auto 0;
  font-family: inherit;
  transition: color 0.18s;
}

.twc-quiz__retake:hover { color: rgba(255, 255, 255, 0.8); }

/* ── Mobile ── */
@media (max-width: 600px) {
  .twc-quiz__intro     { padding: 36px 20px; }
  .twc-quiz__opt       { padding: 13px 16px; font-size: 14px; }
  .twc-quiz__svc       { padding: 16px 18px; }
  .twc-quiz__svc-top   { flex-direction: column; gap: 4px; }
  .twc-quiz__cta       { padding: 28px 20px; }
  .twc-quiz__email-card { padding: 20px; }
}