/* ELC Waldorf Early Learning Curriculum Assessment */

html.wela-quiz-popup-open {
  height: 100%;
  overflow: hidden;
}

body.wela-quiz-popup-open {
  position: fixed;
  left: 0;
  right: 0;
  width: 100%;
  overflow: hidden;
  touch-action: none;
}

.wela-quiz-shortcode-wrap,
.wela-quiz-popup {
  --wela-primary: #4b4f3d;
  --wela-primary-dark: #3a3d30;
  --wela-secondary: #e0c097;
  --wela-secondary-dark: #c9a87d;
  --wela-text: #1e2118;
  --wela-muted: #5c5f52;
  --wela-white: #fff;
  --wela-border: rgba(75, 79, 61, 0.28);
  --wela-shadow: rgba(30, 33, 24, 0.18);
  font-family: 'Sen', sans-serif;
  box-sizing: border-box;
}

.wela-quiz-shortcode-wrap *,
.wela-quiz-popup * {
  box-sizing: border-box;
}

body .wela-quiz-footer-bar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 2147483000;
  padding: 0.75rem 1rem;
  background-color: #e0c097 !important;
  background-image: none !important;
  color: #4b4f3d;
  border-top: 1px solid rgba(75, 79, 61, 0.2);
  box-shadow: 0 -10px 30px var(--wela-shadow);
  transform: translateY(0);
  transition: transform 220ms ease;
}

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

body.wela-quiz-popup-open .wela-quiz-footer-bar,
body.wela-quiz-submitted .wela-quiz-footer-bar {
  display: none !important;
}

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

.wela-quiz-footer-bar__title {
  font-weight: 800;
  font-size: clamp(1.15rem, 2.5vw, 1.6rem);
  line-height: 1.2;
}

.wela-quiz-footer-bar__desc {
  font-weight: 700;
  font-size: 0.9rem;
  opacity: 0.92;
}

.wela-quiz-trigger-wrap {
  display: flex;
  align-items: center;
  position: relative;
  z-index: 1;
}

body .wela-quiz-trigger-btn,
body .wela-quiz-footer-bar__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  padding: 0.85rem 1.5rem;
  border: 2px solid #e0c097;
  border-radius: 9999px;
  background-color: #4b4f3d !important;
  background-image: none !important;
  color: #e0c097;
  font-family: 'Sen', sans-serif;
  font-weight: 800;
  font-size: 0.95rem;
  letter-spacing: 0.02em;
  text-decoration: none;
  text-transform: uppercase;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

body .wela-quiz-trigger-btn:hover,
body .wela-quiz-footer-bar__btn:hover {
  background-color: #3a3d30 !important;
  color: #e0c097;
  transform: translateY(-1px);
}

/* Solid hex + !important: many themes reset div/header backgrounds and break CSS variables on overlays. */
body .wela-quiz-popup {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 2147483647 !important;
  width: 100%;
  height: 100%;
  min-height: 100vh;
  overflow: auto;
  background-color: #4b4f3d !important;
  background-image: none !important;
  color: #e0c097;
  pointer-events: none;
  font-size: 18px;
  line-height: 1.5;
}

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

body .wela-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;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  min-width: 48px;
  min-height: 48px;
  padding: 0;
  border: 2px solid #e0c097;
  border-radius: 50%;
  background-color: #4b4f3d !important;
  background-image: none !important;
  color: #e0c097;
  font-size: 1.75rem;
  line-height: 1;
  cursor: pointer;
}

body .wela-quiz-close:hover {
  background-color: #3a3d30 !important;
}

body .wela-quiz-popup-inner {
  position: relative;
  width: 100%;
  min-height: 100vh;
  background-color: #4b4f3d !important;
  background-image: none !important;
}

body .wela-landing-screen {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 8rem 2rem 3rem;
  overflow-y: auto;
  background-color: #4b4f3d !important;
  background-image: radial-gradient(circle at 50% 0%, #5c614d 0, #4b4f3d 45%, #3a3d30 100%) !important;
  text-align: center;
}

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

.wela-landing-icon {
  display: block;
  width: 120px;
  max-width: 100%;
  height: auto;
  margin: 0 auto 1.5rem;
}

body .wela-landing-screen h1 {
  max-width: 720px !important;
  margin: 0 0 1rem !important;
  color: #e0c097 !important;
  font-family: 'Sen', sans-serif !important;
  font-size: clamp(1.75rem, 4vw, 2.6rem) !important;
  font-weight: 800 !important;
  line-height: 1.12 !important;
}

.wela-landing-desc {
  max-width: 640px !important;
  margin: 0 0 2rem !important;
  color: #ede4d4 !important;
  font-size: 1rem !important;
  line-height: 1.6 !important;
  text-align: center;
}

.wela-landing-meta-inline {
  color: var(--wela-secondary);
  font-weight: 800;
}

body .wela-btn-start-quiz {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.9rem 1.75rem;
  border: 2px solid #e0c097;
  border-radius: 10px;
  background-color: transparent !important;
  background-image: none !important;
  color: #e0c097;
  font-family: 'Sen', sans-serif;
  font-weight: 800;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
}

body .wela-btn-start-quiz:hover {
  background-color: #e0c097 !important;
  color: #4b4f3d;
}

body .wela-quiz-wrap {
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 1080px;
  min-height: 100vh;
  margin: 0 auto 2rem;
  padding: 80px 15px 0;
  background-color: #4b4f3d !important;
  background-image: none !important;
}

body .wela-quiz-header {
  width: 100%;
  padding: 1rem 0;
  border-bottom: 1px solid rgba(224, 192, 151, 0.35);
  background-color: #4b4f3d !important;
  background-image: none !important;
}

.wela-quiz-logo {
  color: var(--wela-secondary);
  font-size: clamp(1.15rem, 3vw, 1.75rem);
  font-weight: 800;
}

body .wela-progress-wrap {
  width: 100%;
  background-color: #4b4f3d !important;
  background-image: none !important;
}

.wela-progress-inner {
  padding: 0.75rem 0;
}

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

.wela-progress-bar {
  height: 8px;
  overflow: hidden;
  border-radius: 4px;
  background: rgba(224, 192, 151, 0.28);
}

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

body .wela-conversation {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 1.25rem;
  width: 100%;
  margin-top: 1rem;
  padding: 1.5rem 1.25rem 3rem;
  overflow-y: auto;
  border-radius: 16px;
  background: #fff !important;
  color: var(--wela-text);
}

body .wela-conversation.wela-results-visible {
  justify-content: flex-start;
}

.wela-step-content {
  animation: wela-fade-in 0.25s ease;
}

@keyframes wela-fade-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.wela-message-label {
  margin-bottom: 1.5rem;
  color: var(--wela-primary);
  font-size: 0.95rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.wela-message-text {
  margin: 0 0 0.75rem;
  color: var(--wela-text);
  font-size: 1.05rem;
}

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

.wela-choice {
  display: flex;
  align-items: center;
  width: 100%;
  padding: 0.9rem 1rem;
  border: 1px solid var(--wela-primary);
  border-radius: 12px;
  background: #fff;
  color: var(--wela-text);
  font-family: 'Sen', sans-serif;
  font-size: 0.96rem;
  text-align: left;
  cursor: pointer;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.wela-choice:hover {
  box-shadow: 0 3px 10px rgba(75, 79, 61, 0.14);
}

.wela-choice.selected,
.wela-choice:focus {
  border-color: var(--wela-primary);
  background: var(--wela-primary);
  color: var(--wela-secondary);
}

.wela-choice-letter {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  margin-right: 0.75rem;
  flex-shrink: 0;
  border: 2px solid rgba(30, 33, 24, 0.35);
  border-radius: 50%;
  background: #fff;
  color: var(--wela-primary);
  font-weight: 800;
}

.wela-choice.selected .wela-choice-letter {
  border-color: var(--wela-secondary);
  background: var(--wela-secondary);
  color: var(--wela-primary);
}

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

.wela-nav-left,
.wela-nav-right {
  display: flex;
  gap: 0.5rem;
}

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

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

.wela-quiz-btn-primary:hover {
  border-color: var(--wela-primary-dark);
  background: var(--wela-primary-dark);
  color: var(--wela-secondary);
}

.wela-quiz-btn-primary:disabled {
  cursor: not-allowed;
  opacity: 0.7;
}

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

.wela-quiz-btn-back:hover {
  background: rgba(75, 79, 61, 0.08);
  color: var(--wela-primary);
}

.wela-results-screen {
  width: 100%;
  max-width: 100%;
  margin: 0 auto;
  padding: clamp(0.25rem, 2vw, 1rem);
  color: var(--wela-text);
}

.wela-results-eyebrow {
  margin: 0 0 0.35rem;
  color: var(--wela-primary);
  font-size: 0.85rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.wela-results-screen h2 {
  margin: 0 0 1rem;
  color: var(--wela-primary);
  font-family: 'Sen', sans-serif;
  font-size: clamp(1.45rem, 3vw, 2.1rem);
  line-height: 1.15;
}

.wela-results-screen h3 {
  margin: 1.5rem 0 0.5rem;
  color: var(--wela-primary);
  font-size: 1.1rem;
}

.wela-result-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.85rem;
  margin: 1.25rem 0;
}

.wela-result-grid > div {
  min-width: 0;
  padding: 1rem;
  border: 1px solid var(--wela-border);
  border-left: 4px solid var(--wela-secondary);
  border-radius: 12px;
  background: rgba(224, 192, 151, 0.22);
}

.wela-result-grid span,
.wela-result-grid small {
  display: block;
  color: var(--wela-muted);
  font-size: 0.82rem;
  line-height: 1.35;
}

.wela-result-grid strong {
  display: block;
  margin: 0.3rem 0;
  color: var(--wela-text);
  font-size: 1.35rem;
  line-height: 1.25;
}

.wela-summary {
  margin: 1rem 0;
  color: var(--wela-text);
  line-height: 1.6;
}

.wela-benefits {
  font-weight: 600;
}

.wela-resource-teaser {
  margin: 1rem 0 0;
}

.wela-resource-link {
  color: var(--wela-primary);
  font-weight: 800;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.wela-resource-link:hover {
  color: var(--wela-primary-dark);
}

.wela-tie-note {
  margin: 1rem 0;
  color: var(--wela-muted);
  font-size: 0.95rem;
  line-height: 1.55;
}

.wela-disclaimer {
  margin: 1.5rem 0;
  padding: 1rem 1.1rem;
  border-radius: 12px;
  background: rgba(75, 79, 61, 0.06);
  color: var(--wela-text);
  font-size: 0.95rem;
  line-height: 1.55;
}

.wela-results-screen ul {
  list-style: disc !important;
  margin: 0.5rem 0 1.5rem 1.25rem;
  padding: 0;
}

.wela-results-screen li {
  margin-bottom: 0.45rem;
}

.wela-email-panel {
  max-width: 100%;
  margin: 1.25rem 0 0;
  padding: clamp(1.1rem, 3vw, 1.6rem);
  border: 1px solid rgba(75, 79, 61, 0.22);
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(224, 192, 151, 0.28), rgba(255, 255, 255, 0.96));
  box-shadow: 0 10px 26px var(--wela-shadow);
}

.wela-email-panel > p {
  max-width: 760px;
  margin: 0;
  color: var(--wela-text);
  font-size: 0.98rem;
  line-height: 1.55;
}

.wela-inline-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  margin-top: 1.25rem;
}

.wela-form-field {
  min-width: 0;
}

.wela-inline-form label {
  display: block;
  margin-bottom: 0.4rem;
  color: var(--wela-text);
  font-size: 0.86rem;
  font-weight: 800;
  letter-spacing: 0.01em;
}

.wela-inline-form input {
  width: 100%;
  min-height: 48px;
  padding: 0.8rem 0.95rem;
  border: 1px solid rgba(75, 79, 61, 0.28);
  border-radius: 12px;
  background: #fff;
  color: var(--wela-text);
  font: inherit;
  box-shadow: inset 0 1px 2px rgba(30, 33, 24, 0.05);
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.wela-inline-form input:focus {
  outline: none;
  border-color: var(--wela-primary);
  background: #fffdf8;
  box-shadow: 0 0 0 3px rgba(75, 79, 61, 0.14);
}

.wela-form-actions,
.wela-privacy-note,
.wela-save-status {
  grid-column: 1 / -1;
}

.wela-form-actions {
  display: flex;
  align-items: center;
  margin-top: 20px;
}

.wela-form-actions .wela-quiz-btn {
  min-width: 100%;
  padding: 0.85rem 1.5rem;
  box-shadow: 0 8px 18px rgba(75, 79, 61, 0.2);
}

.wela-inline-form .required {
  color: #8b4513;
}

.wela-privacy-note {
  margin: -0.2rem 0 0;
  color: var(--wela-muted);
  font-size: 0.86rem;
}

.wela-save-status {
  margin: -0.2rem 0 0;
  color: var(--wela-primary);
  font-weight: 700;
}

@media (max-width: 900px) {
  .wela-result-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .wela-quiz-footer-bar__inner,
  .wela-step-nav {
    flex-direction: column;
    align-items: stretch;
  }

  .wela-quiz-footer-bar__cta{
    text-align: center;
  }

  .wela-quiz-footer-bar__copy {
    text-align: center;
  }

  .wela-quiz-footer-bar__btn,
  .wela-quiz-trigger-btn {
    width: max-content;
    max-width: 100%;
    margin: 0 auto;
  }

  .wela-result-grid,
  .wela-inline-form {
    grid-template-columns: 1fr;
  }

  .wela-form-actions .wela-quiz-btn {
    width: 100%;
    min-width: 0;
  }

  .wela-quiz-wrap {
    padding-top: 78px;
  }
}

@media (max-width: 480px) {
  body .wela-quiz-popup {
    font-size: 16px;
  }

  body .wela-quiz-close {
    width: 46px;
    height: 46px;
    min-width: 46px;
    min-height: 46px;
    font-size: 1.55rem;
  }

  body .wela-conversation {
    padding: 1.1rem 0.9rem 2rem;
  }

  .wela-quiz-btn {
    padding: 0.7rem 1rem;
  }

  body .wela-landing-screen {
    padding: 6.5rem 1.25rem 2.5rem;
  }
}
