/* ELC Method Match Quiz – scoped for shortcode (no html/body override) */

/* Lock body scroll when quiz popup is open (robust on mobile) */
html.elc-quiz-popup-open {
  overflow: hidden;
  height: 100%;
}

body.elc-quiz-popup-open {
  overflow: hidden;
  position: fixed;
  width: 100%;
  left: 0;
  right: 0;
  touch-action: none;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: none;
}

/* Sticky footer bar (global call-to-action) */
.elc-quiz-footer-bar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 2147483000;
  background: #ffd87d; /* brand yellow */
  color: #203873; /* brand blue */
  border-top: 1px solid rgba(32, 56, 115, 0.2);
  box-shadow: 0 -10px 30px rgba(32, 56, 115, 0.18);
  padding: 0.75rem 1rem;
  transform: translateY(0);
  transition: transform 220ms ease;
  will-change: transform;
}

.elc-quiz-footer-bar.is-hidden {
  transform: translateY(110%);
}

.elc-quiz-footer-bar__inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  gap: 0.75rem;
  align-items: center;
  justify-content: space-between;
}

.elc-quiz-footer-bar__copy {
  min-width: 0;
}

.elc-quiz-footer-bar__cta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0;
}

.elc-quiz-footer-bar__title {
  font-family: 'Sen', sans-serif;
  font-weight: 800;
  letter-spacing: -0.01em;
  font-size: 1.6rem;
  line-height: 1.2;
  margin: 0;
}

.elc-quiz-footer-bar__desc {
  font-family: 'Sen', sans-serif;
  font-weight: 700;
  font-size: 0.9rem;
  line-height: 1.2;
  opacity: 0.9;
  white-space: nowrap;
  text-align: left;
}

body .elc-quiz-footer-bar__btn {
  text-decoration: none;
  white-space: nowrap;
  /* Match `elc-quiz-trigger-btn` but filled blue */
  --elc-trigger-bg: #203873;
  --elc-trigger-accent: #ffd87d;
  background: var(--elc-trigger-bg);
  color: var(--elc-trigger-accent);
  border-color: var(--elc-trigger-bg);
  transition: transform 0.15s ease, opacity 0.15s ease, background 0.2s, border-color 0.2s, color 0.2s;
}

body .elc-quiz-footer-bar__btn-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.5em;
  height: 1.5em;
}

body .elc-quiz-footer-bar__btn-icon svg {
  width: 100%;
  height: 100%;
  display: block;
}

body .elc-quiz-footer-bar__btn:hover {
  opacity: 0.95;
  background: #2e4a8b;
  border-color: #2e4a8b;
  transform: translateY(-1px);
}

/* Avoid overlapping the quiz UI */
body.elc-quiz-popup-open .elc-quiz-footer-bar {
  display: none;
}

/* Hide sticky footer after user has submitted the quiz (localStorage) */
body.elc-quiz-submitted .elc-quiz-footer-bar {
  display: none !important;
}

@media (max-width: 640px) {
  .elc-quiz-footer-bar {
    padding: 0.65rem 0.8rem calc(0.65rem + env(safe-area-inset-bottom));
  }
  .elc-quiz-footer-bar__inner {
    flex-direction: column;
    align-items: stretch;
    gap: 0.6rem;
  }
  .elc-quiz-footer-bar__copy {
    text-align: center;
  }
  body .elc-quiz-footer-bar__title {
    font-size: 1.3rem;
    margin-bottom: 10px;
    line-height: 1.15;
    letter-spacing: -0.015em;
    text-wrap: balance;
  }
  .elc-quiz-footer-bar__cta {
    align-items: stretch;
  }
  .elc-quiz-footer-bar__desc {
    white-space: normal;
    text-align: center;
    font-size: 0.9rem;
  }
  body .elc-quiz-footer-bar__btn {
    justify-content: center;
    padding: 0.3rem 1.5rem;
    width: max-content;
    margin: 0 auto;
    font-size: 0.9rem;
  }
}

@media (max-width: 380px) {
  .elc-quiz-footer-bar__title {
    font-size: 1.3rem;
    margin-bottom: 10px;
  }

  body .elc-quiz-footer-bar__btn{
    padding: 0.3rem 1.5rem;
    width: max-content;
    margin: 0 auto;
  }
  .elc-quiz-footer-bar__desc {
    font-size: 0.85rem;
  }
}

.elc-quiz-shortcode-wrap {
  --bg: #203873;
  --accent: #ffd87d;
  --accent-dark: #e6c25a;
  --white: #fff;
  --text: #4a4a58;
  --text-muted: #595959;
  --border: #e0e0e0;
  --border-light: rgba(255, 216, 125, 0.3);
  --shadow: rgba(32, 56, 115, 0.15);
  --content-bg: #ffffff;
  box-sizing: border-box;
}

.elc-quiz-shortcode-wrap * {
  box-sizing: border-box;
}

.elc-quiz-trigger-btn,
.elc-quiz-trigger-wrap .elc-quiz-trigger-btn,
#elc-quiz-trigger {
  --elc-trigger-bg: transparent;
  --elc-trigger-accent: #ffd87d;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  padding: 0.85rem 1.5rem;
  background: var(--elc-trigger-bg);
  color: var(--elc-trigger-accent);
  border: 1px solid var(--elc-trigger-accent);
  border-radius: 9999px;
  font-family: 'Sen', sans-serif;
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 0.2s, color 0.2s, border-color 0.2s, opacity 0.2s;
}

.elc-quiz-trigger-btn:hover,
.elc-quiz-trigger-wrap .elc-quiz-trigger-btn:hover,
#elc-quiz-trigger:hover {
  opacity: 0.9;
  color: var(--elc-trigger-accent);
  background: transparent;
  border-color: var(--elc-trigger-accent);
}

.elc-quiz-trigger-wrap .elc-quiz-trigger-icon,
#elc-quiz-trigger .elc-quiz-trigger-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  flex-shrink: 0;
  color: var(--elc-trigger-accent);
}

.elc-quiz-trigger-wrap .elc-quiz-trigger-icon svg,
#elc-quiz-trigger .elc-quiz-trigger-icon svg {
  width: 100%;
  height: 100%;
}

.elc-quiz-popup {
  /* Theme vars so popup works inside shortcode wrap or in footer (global) */
  --bg: #203873;
  --accent: #ffd87d;
  --accent-dark: #e6c25a;
  --white: #fff;
  --text: #4a4a58;
  --text-muted: #595959;
  --border: #e0e0e0;
  --border-light: rgba(255, 216, 125, 0.3);
  --shadow: rgba(32, 56, 115, 0.15);
  --content-bg: #ffffff;
  box-sizing: border-box;
  display: none;
  position: fixed;
  inset: 0;
  z-index: 2147483647 !important; /* Above Thrive header and other fixed/sticky elements */
  width: 100%;
  height: 100%;
  overflow: auto;
  background: var(--bg);
  pointer-events: none;
  font-family: 'Sen', sans-serif;
  font-size: 18px;
  line-height: 1.5;
  color: var(--accent);
}

.elc-quiz-popup * {
  box-sizing: border-box;
}

.elc-quiz-popup.is-open {
  display: block;
  pointer-events: auto;
}

.elc-quiz-close {
  position: fixed;
  top: max(0.75rem, env(safe-area-inset-top));
  left: max(0.75rem, env(safe-area-inset-left));
  z-index: 2147483647 !important;
  min-width: 48px;
  min-height: 48px;
  width: 48px;
  height: 48px;
  padding: 0;
  border: 2px solid var(--accent);
  border-radius: 50%;
  background: var(--bg);
  color: var(--accent);
  font-size: 1.75rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s, border-color 0.2s, color 0.2s;
  -webkit-tap-highlight-color: transparent;
}

.elc-quiz-close:hover {
  background: #2e4a8b;
  border-color: var(--accent);
  color: var(--accent);
}

@media (max-width: 768px) {
  .elc-quiz-close {
    left: max(1rem, env(safe-area-inset-left));
    margin-top: 0.5rem;
    min-width: 44px;
    min-height: 44px;
    width: 44px;
    height: 44px;
    font-size: 1.5rem;
  }
}

@media (max-width: 480px) {
  .elc-quiz-close {
    margin-top: 0.5rem;
    min-width: 46px;
    min-height: 46px;
    width: 46px;
    height: 46px;
    font-size: 1.6rem;
  }

  .elc-quiz-popup .quiz-btn {
    padding: 0.7rem 0.5rem;
  }

  .elc-quiz-popup .quiz-btn-next {
    min-width: 93px;
  }
}

.elc-quiz-popup-inner {
  position: relative;
  width: 100%;
  min-height: 100vh;
}

.quiz-wrap {
  width: 100%;
  max-width: 1080px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  margin: 0 auto;
  margin-bottom: 2rem;
  padding: 0 15px;
  box-sizing: border-box !important;
  padding-top: 80px;
}

.landing-screen {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: var(--bg);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  padding-bottom: 3rem;
  text-align: center;
  padding-top: 150px;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
}

.landing-screen.hidden {
  display: none !important;
}

.landing-icon {
  display: block;
  max-width: 120px;
  width: 100%;
  height: auto;
  margin-bottom: 1.5rem;
  object-fit: contain;
}

body .landing-screen h1 {
  font-family: 'Sen', sans-serif !important;
  font-weight: 700 !important;
  font-size: clamp(1.75rem, 4vw, 2.5rem) !important;
  color: var(--accent) !important;
  margin: 0 0 1rem 0 !important;
  max-width: 520px !important;
}

.landing-screen .landing-desc {
  font-size: 1rem !important;
  color: #ffd54f !important;
  max-width: 480px !important;
  margin: 0 0 2.5rem 0 !important;
  line-height: 1.6 !important;
}

.landing-screen .landing-meta-inline {
  font-size: 0.9rem;
  font-weight: 600;
  color: #ffe082;
  text-decoration: underline;
}

.quiz-btn-start-quiz {
  display: inline-flex;
  align-items: center;
  gap: 1.3rem;
  padding: 0.9rem 1.75rem;
  background: transparent;
  border: 2px solid var(--accent);
  border-radius: 10px;
  font-family: 'Sen', sans-serif;
  font-weight: 700;
  font-size: 1rem;
  color: var(--accent);
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}

.quiz-btn-start-quiz:hover {
  background: var(--accent);
  color: var(--bg);
}

.quiz-header {
  width: 100%;
  padding: 1rem 0;
  background: var(--bg);
  border-bottom: 1px solid var(--border-light);
  flex-shrink: 0;
}

.quiz-header-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}

.quiz-logo {
  font-family: 'Sen', sans-serif;
  font-weight: 700;
  font-size: 2rem;
  color: var(--accent);
}

.quiz-logo a {
  color: inherit;
  text-decoration: none;
}

.quiz-logo a:hover {
  color: var(--accent-dark);
}

@media (max-width: 768px) {
  .quiz-logo {
    font-size: 1.25rem;
  }
}

@media (max-width: 480px) {
  .quiz-logo {
    font-size: 28px;
  }
}

.progress-wrap {
  width: 100%;
  background: var(--bg);
  flex-shrink: 0;
}

.progress-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0.75rem 0;
}

.progress-label {
  font-size: 0.85rem;
  color: var(--accent);
  opacity: 0.9;
  margin-bottom: 0.35rem;
}

.progress-bar {
  height: 8px;
  background: var(--border-light);
  border-radius: 4px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  width: 0%;
  background: var(--accent);
  border-radius: 4px;
  transition: width 0.4s ease;
}

.conversation {
  flex: 1;
  width: 100%;
  margin: 0;
  padding: 1.5rem 1.25rem 3rem 1.5rem;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  background: #fff;
  margin-top: 1rem;
  border-radius: 12px;
}

.conversation.elc-quiz-results-visible {
  justify-content: center;
}

.message {
  max-width: 85%;
  padding: 1rem 1.25rem;
  border-radius: 18px;
  animation: elc-fadeIn 0.35s ease;
}

@keyframes elc-fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.message-bot {
  align-self: flex-start;
  background: transparent;
  border: none;
  box-shadow: none;
  color: var(--accent);
}

.message-user {
  align-self: flex-end;
  background: rgba(255, 216, 125, 0.2);
  border: 1px solid var(--accent);
  color: var(--accent);
}

.message-user .choice-text {
  color: inherit;
}

.message-label {
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #1a2e4a;
  margin-bottom: 2rem;
  font-weight: bold;
}

.message-text {
  font-size: 1.05rem;
  margin: 0;
  color: #1a2e4a;
}

.choices {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  margin-top: 1rem;
}

.choice {
  display: flex;
  align-items: center;
  width: 100%;
  text-align: left;
  padding: 0.85rem 1.1rem;
  border: 1px solid #203873;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.95);
  font-family: 'Sen', sans-serif;
  font-size: 0.95rem;
  color: #1a2e4a;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s, box-shadow 0.2s;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1);
}

.choice:hover {
  border-color: var(--bg);
  background: rgba(255, 255, 255, 1);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
}

.choice.selected,
.choice:focus {
  background: var(--bg);
  color: var(--accent);
  border-color: var(--bg);
}

.choice::before {
  content: '';
  width: 22px;
  height: 22px;
  border: 2px solid rgba(26, 46, 74, 0.4);
  border-radius: 50%;
  margin-right: 0.75rem;
  flex-shrink: 0;
  background: rgba(255, 255, 255, 0.9);
}

.choice.selected::before {
  border-color: var(--accent);
  background: var(--accent);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23203873' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'%3E%3C/polyline%3E%3C/svg%3E");
  background-size: 14px;
  background-position: center;
  background-repeat: no-repeat;
}

.choice:disabled {
  cursor: not-allowed;
  opacity: 0.7;
}

.choice input[type="radio"] {
  margin-right: 0.5rem;
}

.choice-multi::before {
  display: none;
}

.choice-multi {
  cursor: pointer;
}

.choice-multi input[type="checkbox"] {
  width: 20px;
  height: 20px;
  margin: 0 0.75rem 0 0;
  flex-shrink: 0;
  cursor: pointer;
  accent-color: var(--bg);
}

.choice-multi .choice-multi-text {
  flex: 1;
}

.choice-hint {
  font-size: 0.8rem;
  color: #6b7280;
  margin-top: 0.5rem;
}

.likert-options {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.75rem;
}

.likert-options .choice {
  flex: 1;
  min-width: 80px;
}

.inline-form {
  margin-top: 1rem;
}

.inline-form label {
  display: block;
  margin-bottom: 0.35rem;
  font-size: 0.9rem;
  color: #1a2e4a;
}

.inline-form input,
.inline-form select,
.inline-form textarea {
  width: 100%;
  max-width: 400px;
  padding: 0.7rem 0.9rem;
  border: 1px solid #d1d5db;
  border-radius: 10px;
  font-family: inherit;
  font-size: 1rem;
  margin-bottom: 0.75rem;
  background: #ffffff;
  color: #1a2e4a;
}

.inline-form input::placeholder,
.inline-form textarea::placeholder {
  color: #6b7280;
}

.inline-form input:focus,
.inline-form select:focus,
.inline-form textarea:focus {
  outline: none;
  border-color: #203873;
  box-shadow: 0 0 0 2px rgba(32, 56, 115, 0.2);
}

.inline-form .required {
  color: #b91c1c;
}

.inline-form.details-form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem 1.5rem;
  max-width: 100%;
  margin-top: 3rem;
}

.inline-form.details-form .field {
  min-width: 0;
}

.inline-form.details-form .field input,
.inline-form.details-form .field select,
.inline-form.details-form .field textarea {
  max-width: none;
  margin-bottom: 0;
}

.inline-form.details-form .field-full {
  grid-column: 1 / -1;
}

@media (max-width: 600px) {
  .inline-form.details-form {
    grid-template-columns: 1fr;
  }
}

.quiz-btn {
  display: inline-block;
  padding: 0.7rem 1.4rem;
  border-radius: 10px;
  font-family: 'Sen', sans-serif;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s, color 0.2s;
}

.quiz-btn-primary {
  background: var(--bg);
  color: var(--accent);
  border: 2px solid var(--bg);
}

.quiz-btn-primary:hover {
  background: #2e4a8b;
  border-color: #2e4a8b;
  color: var(--accent);
}

.quiz-btn-skip {
  background: #fff;
  color: var(--bg);
  border: 2px solid var(--bg);
}

.quiz-btn-skip:hover {
  background: rgba(32, 56, 115, 0.08);
  border-color: var(--bg);
  color: var(--bg);
}

.quiz-btn-wrap {
  margin-top: 1rem;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.step-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border-light);
}

.step-nav .nav-left {
  display: flex;
  gap: 0.5rem;
}

.step-nav .nav-right {
  display: flex;
  gap: 0.5rem;
}

.quiz-btn-back {
  background: #fff;
  color: var(--bg);
  border: 2px solid var(--bg);
}

.quiz-btn-back:hover {
  background: var(--bg);
  border-color: var(--bg);
  color: #fff;
}

.quiz-btn-next {
  min-width: 120px;
}

.results-screen {
  width: 600px;
  max-width: 100%;
  margin: 0 auto;
  padding: 0;
}

.results-card {
  background: rgba(255, 255, 255, 0.97);
  border-radius: 20px;
  padding: 2.25rem 2rem;
  color: #1a2e4a;
  text-align: center;
  margin-top: 40px;
}

.results-card-icon {
  width: 88px;
  height: 88px;
  margin: 0 auto 1.25rem;
  color: var(--bg);
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-dark) 100%);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 16px rgba(255, 216, 125, 0.4);
} 

.results-card-icon svg {
  width: 48px;
  height: 48px;
}

.tcb-style-wrap p.results-card-title {
  font-family: 'Sen', sans-serif;
  font-size: 2rem;
  font-weight: 700;
  color: var(--bg);
  margin: 0 0 0.75rem 0;
  padding-bottom: 0px;
}

.results-card h1 {
  font-family: 'Sen', sans-serif;
  color: var(--bg);
  margin-top: 0;
}

.results-card .top-match {
  font-size: 1.25rem;
  margin: 1rem 0;
  padding: 1rem;
  background: rgba(32, 56, 115, 0.08);
  border-radius: 12px;
  border-left: 4px solid var(--accent);
  color: #1a2e4a;
}

.results-card .alternatives {
  margin-top: 1.5rem;
  color: #1a2e4a;
}

.results-card .alternatives ul {
  margin: 0.5rem 0 0 1.25rem;
  padding: 0;
}

.results-card .method-desc {
  margin-top: 1rem;
  color: #2d3748;
  font-size: 0.95rem;
}

.results-card .email-note {
  margin-top: 1.5rem;
  padding: 1rem;
  background: rgba(32, 56, 115, 0.06);
  border-radius: 10px;
  font-size: 0.9rem;
  color: #2d3748;
}

.results-card a {
  color: var(--bg);
  font-weight: 600;
}

.results-card a:hover {
  color: var(--accent-dark);
}

.elc-quiz-shortcode-wrap .hidden {
  display: none !important;
}

.welcome-title {
  font-family: 'Sen', sans-serif;
  font-size: 1.5rem;
  color: #1a2e4a;
  margin: 0 0 0.5rem 0;
}

.step-content .message-text {
  color: #1a2e4a;
}
