@import url('https://fonts.googleapis.com/css2?family=EB+Garamond:ital,wght@0,400;0,600;0,700;1,400&family=Inter:wght@300;400;500;600;700&family=Playfair+Display:wght@400;600;700&family=Merriweather:wght@400;700&display=swap');

/* ── ROOT DEFAULTS ── */
.est-wrapper {
  --est-primary: #3F5F4A;
  --est-accent: #E3B23C;
  --est-bg: #ffffff;
  --est-card: #ffffff;
  --est-qfont: 'EB Garamond', Georgia, serif;
  --est-bfont: 'Inter', sans-serif;
  --est-qsize: 20px;
  --est-osize: 15px;
  --est-light: #e8f0e8;
  --est-muted: #6a8070;
  --est-border: #dce8dc;
  --est-radius: 16px;
}

/* ── WRAPPER ── */
.est-wrapper {
  max-width: 640px;
  margin: 32px auto;
  font-family: var(--est-bfont);
}

/* ── CARD ── */
.est-wrapper .est-card-shell {
  background: var(--est-card);
  border-radius: var(--est-radius);
  box-shadow: 0 2px 8px rgba(63,95,74,0.07), 0 8px 32px rgba(63,95,74,0.08);
  overflow: visible;
  position: relative;
}

/* ── SCREEN CONTROL — scoped to wrapper to avoid WP conflicts ── */
.est-wrapper .est-screen  { display: none !important; }
.est-wrapper .est-screen.est-active { display: block !important; animation: estIn 0.45s cubic-bezier(0.22,1,0.36,1) both; }
@keyframes estIn { from { opacity:0; transform:translateY(16px); } to { opacity:1; transform:translateY(0); } }
.est-wrapper .est-hidden  { display: none !important; }

/* ── WELCOME SCREEN — New Design ── */
.est-wrapper .est-s-welcome { padding: 0; }

.est-wrapper .est-welcome-full {
  background: #EAF3E8;
  position: relative;
  overflow: hidden;
  border-radius: var(--est-radius);
}

/* Decorative blobs — inside card, cropped at edges like reference */
.est-wrapper .est-blob {
  position: absolute;
  border-radius: 50%;
  background: #F5EFE6;
  pointer-events: none;
  z-index: 0;
}
.est-wrapper .est-blob-tl {
  width: 200px; height: 200px;
  top: -70px; right: -60px;
  opacity: 0.9;
  animation: estBlobFloat 6s ease-in-out infinite;
}
.est-wrapper .est-blob-br {
  width: 170px; height: 170px;
  bottom: 30px; left: -55px;
  opacity: 0.85;
  animation: estBlobFloat 7s ease-in-out infinite reverse;
}
@keyframes estBlobFloat {
  0%,100% { transform: scale(1); }
  50%      { transform: scale(1.05); }
}

/* Content area */
.est-wrapper .est-welcome-content {
  padding: 52px 44px 36px;
  text-align: center;
  position: relative; z-index: 1;
}

/* Head icon */
.est-wrapper .est-head-icon {
  width: 88px; height: 88px;
  margin: 0 auto 28px;
  animation: estIconFloat 3s ease-in-out infinite;
  filter: drop-shadow(0 4px 12px rgba(63,95,74,0.15));
}
.est-wrapper .est-head-icon svg { width: 100%; height: 100%; }
@keyframes estIconFloat {
  0%,100% { transform: translateY(0); }
  50%      { transform: translateY(-7px); }
}

.est-wrapper .est-welcome-title {
  font-family: var(--est-qfont);
  font-size: 32px;
  font-weight: 700;
  color: #3F5F4A;
  margin: 0 0 14px;
  line-height: 1.2;
}
.est-wrapper .est-welcome-desc {
  font-size: 15px;
  color: #5a7a65;
  line-height: 1.7;
  margin: 0 0 28px;
  max-width: 420px;
  margin-left: auto; margin-right: auto;
}

/* Pill-style meta */
.est-wrapper .est-meta-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}
.est-wrapper .est-meta-pill {
  display: flex; align-items: center; gap: 6px;
  font-size: 13px; font-weight: 500;
  color: #3F5F4A;
  background: rgba(255,255,255,0.75);
  padding: 8px 16px;
  border-radius: 50px;
  border: 1px solid rgba(63,95,74,0.18);
}
.est-wrapper .est-meta-pill svg { stroke: #3F5F4A; flex-shrink: 0; }
.est-wrapper .est-meta-dot { color: #a0c4a8; font-size: 16px; font-weight: 300; }

/* Brand tagline */
.est-wrapper .est-brand-tag {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.14em;
  color: #E3B23C;
  text-align: center;
}

/* CTA area */
.est-wrapper .est-welcome-cta {
  background: #ffffff;
  padding: 28px 44px 32px;
  text-align: center;
  position: relative; z-index: 1;
  border-top: 1px solid rgba(63,95,74,0.08);
}

/* Button gradient animation */
.est-wrapper .est-btn-wrap {
  position: relative;
  display: inline-block;
  width: 100%;
  margin-bottom: 4px;
}

.est-wrapper .est-start-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: linear-gradient(135deg, #3F5F4A, #2d4636, #4a7a5a, #E3B23C, #3F5F4A);
  background-size: 300% 300%;
  animation: estGradientMove 4s ease infinite;
  color: #ffffff;
  font-family: var(--est-bfont);
  font-size: 16px;
  font-weight: 600;
  padding: 16px 48px;
  border-radius: 50px;
  border: none;
  cursor: pointer;
  margin: 0 auto;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  letter-spacing: 0.01em;
  width: 100%;
  justify-content: center;
  position: relative;
  z-index: 1;
}

@keyframes estGradientMove {
  0%   { background-position: 0% 50%; }
  50%  { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

.est-wrapper .est-start-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(63,95,74,0.4);
}
.est-wrapper .est-start-btn svg { stroke: #ffffff; transition: transform 0.2s; }
.est-wrapper .est-start-btn:hover svg { transform: translateX(5px); }
.est-wrapper .est-disclaimer {
  font-size: 11px; color: #b0b8b0;
  margin-top: 14px; font-style: italic; line-height: 1.5;
}

/* ── QUIZ SCREEN ── */
.est-wrapper .est-s-quiz { padding: 32px 40px 36px; }
.est-wrapper .est-progress-area { margin-bottom: 28px; }
.est-wrapper .est-progress-track {
  height: 5px; background: #eef0ee; border-radius: 3px; overflow: hidden;
}
.est-wrapper .est-progress-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--est-primary), var(--est-accent));
  border-radius: 3px;
  width: 10%;
  transition: width 0.6s cubic-bezier(0.4,0,0.2,1);
}
.est-wrapper .est-progress-labels {
  display: flex; justify-content: space-between;
  margin-top: 8px; font-size: 12px; color: #999;
}
.est-wrapper .est-pct-label { font-weight: 700; color: var(--est-primary); }

/* ── QUESTION SLIDES ── */
.est-wrapper .est-questions-area { min-height: 320px; position: relative; }
.est-wrapper .est-q-slide { display: none; }
.est-wrapper .est-q-slide.est-q-active {
  display: block;
  animation: estIn 0.38s cubic-bezier(0.22,1,0.36,1) both;
}
.est-wrapper .est-q-label {
  font-size: 11px; font-weight: 700; color: var(--est-accent);
  letter-spacing: 0.12em; text-transform: uppercase;
  margin-bottom: 10px;
  display: flex; align-items: center; gap: 8px;
}
.est-wrapper .est-q-type-tag {
  font-size: 9px; font-weight: 700; padding: 2px 7px; border-radius: 8px;
  text-transform: uppercase; letter-spacing: 0.08em;
}
.est-wrapper .est-q-type-tag.regular { background: #e8eef5; color: #1e3a6a; }
.est-wrapper .est-q-type-tag.reverse { background: #f0e8f8; color: #6030a0; }
.est-wrapper .est-q-text {
  font-family: var(--est-qfont);
  font-size: var(--est-qsize);
  font-weight: 600;
  color: var(--est-primary);
  line-height: 1.45;
  margin: 0 0 24px;
}

/* ── OPTIONS ── */
.est-wrapper .est-options-list { display: flex; flex-direction: column; gap: 9px; }
.est-wrapper .est-opt {
  display: flex; align-items: center; gap: 12px;
  padding: 13px 16px;
  border-radius: 10px;
  border: 1.5px solid var(--est-border);
  background: #fafcfa;
  cursor: pointer;
  transition: all 0.22s ease;
  text-align: left; width: 100%;
  font-family: var(--est-bfont);
}
.est-wrapper .est-opt:hover {
  border-color: var(--est-primary);
  background: var(--est-light);
  transform: translateX(3px);
}
.est-wrapper .est-opt.selected {
  border-color: var(--est-primary);
  background: var(--est-light);
  box-shadow: 0 0 0 3px rgba(63,95,74,0.12);
}
.est-wrapper .est-opt-radio {
  width: 18px; height: 18px; border-radius: 50%;
  border: 2px solid #c0d4c0; flex-shrink: 0;
  position: relative; transition: all 0.2s;
  background: white;
}
.est-wrapper .est-opt.selected .est-opt-radio {
  background: var(--est-primary);
  border-color: var(--est-primary);
}
.est-wrapper .est-opt.selected .est-opt-radio::after {
  content: '';
  position: absolute; top:50%; left:50%;
  transform: translate(-50%,-50%);
  width: 6px; height: 6px; border-radius: 50%;
  background: white;
}
.est-wrapper .est-opt-text {
  font-size: var(--est-osize);
  color: #2c3e30;
  font-weight: 500;
}
.est-wrapper .est-opt.selected .est-opt-text { color: var(--est-primary); font-weight: 600; }

/* ── HALFWAY BADGE ── */
.est-wrapper .est-halfway {
  display: none; align-items: center; gap: 7px;
  background: #fdf3dd; color: #8a6010;
  font-size: 12px; font-weight: 600;
  padding: 7px 14px; border-radius: 20px;
  width: fit-content; margin-top: 16px;
}
.est-wrapper .est-halfway.show {
  display: flex;
  animation: estPop 0.5s cubic-bezier(0.175,0.885,0.32,1.275) both;
}
@keyframes estPop { from {opacity:0;transform:scale(0.6);} to {opacity:1;transform:scale(1);} }

/* ── QUIZ NAV ── */
.est-wrapper .est-quiz-nav {
  display: flex; justify-content: space-between; align-items: center;
  margin-top: 24px; padding-top: 20px;
  border-top: 1px solid #f0f0ee;
}
.est-wrapper .est-nav-btn {
  display: inline-flex; align-items: center; gap: 7px;
  font-family: var(--est-bfont); font-size: 14px; font-weight: 600;
  padding: 11px 22px; border-radius: 9px; cursor: pointer;
  transition: all 0.2s; border: none;
}
.est-wrapper .est-nav-back {
  background: #f5f7f5; color: var(--est-muted);
  border: 1.5px solid var(--est-border);
}
.est-wrapper .est-nav-back:hover:not(:disabled) { background: var(--est-light); color: var(--est-primary); }
.est-wrapper .est-nav-next {
  background: var(--est-accent); color: var(--est-primary);
}
.est-wrapper .est-nav-next:hover:not(:disabled) {
  background: #d4a030;
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(227,178,60,0.35);
}
.est-wrapper .est-nav-btn:disabled { opacity: 0.4; cursor: not-allowed; }

/* ── CALCULATING ── */
.est-wrapper .est-s-calc { padding: 64px 40px; }
.est-wrapper .est-calc-wrap { text-align: center; }
.est-wrapper .est-pulse-rings {
  position: relative; width: 80px; height: 80px; margin: 0 auto 8px;
}
.est-wrapper .est-pulse-rings span {
  position: absolute; inset: 0;
  border-radius: 50%;
  border: 2px solid var(--est-primary);
  opacity: 0;
  animation: estPulse 2s ease-out infinite;
}
.est-wrapper .est-pulse-rings span:nth-child(2) { animation-delay: 0.6s; }
.est-wrapper .est-pulse-rings span:nth-child(3) { animation-delay: 1.2s; }
@keyframes estPulse {
  0%   { transform: scale(0.4); opacity: 0.6; }
  100% { transform: scale(1.8); opacity: 0; }
}
.est-wrapper .est-calc-icon {
  width: 64px; height: 64px; margin: -72px auto 0;
  position: relative; z-index: 1;
  animation: estIconPulse 1.8s ease-in-out infinite;
}
@keyframes estIconPulse {
  0%,100% { transform: scale(1); opacity: 1; }
  50%      { transform: scale(1.08); opacity: 0.85; }
}
.est-wrapper .est-calc-icon svg { width: 100%; height: 100%; }
.est-wrapper .est-calc-title {
  font-family: var(--est-qfont);
  font-size: 20px; color: var(--est-primary);
  margin: 20px 0 20px; font-weight: 600;
}
.est-wrapper .est-calc-bar-wrap {
  width: 220px; height: 4px; background: #e8f0e8;
  border-radius: 2px; margin: 0 auto; overflow: hidden;
}
.est-wrapper .est-calc-bar {
  height: 100%; width: 0%;
  background: linear-gradient(90deg, var(--est-primary), var(--est-accent));
  border-radius: 2px;
  transition: width 1.8s ease;
}

/* ── DETAILS SCREEN ── */
.est-wrapper .est-s-details { padding: 40px 40px 36px; }
.est-wrapper .est-details-head { text-align: center; margin-bottom: 28px; }
.est-wrapper .est-details-icon-wrap {
  width: 52px; height: 52px; border-radius: 50%;
  background: var(--est-light);
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 14px;
}
.est-wrapper .est-details-title {
  font-family: var(--est-qfont); font-size: 24px; font-weight: 700;
  color: var(--est-primary); margin: 0 0 7px;
}
.est-wrapper .est-details-sub {
  font-size: 13px; color: var(--est-muted); line-height: 1.6; margin: 0;
}
.est-wrapper .est-fields { display: flex; flex-direction: column; gap: 14px; margin-bottom: 22px; }
.est-wrapper .est-field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.est-wrapper .est-field { display: flex; flex-direction: column; gap: 5px; }
.est-wrapper .est-field label {
  font-size: 11px; font-weight: 700; color: var(--est-primary);
  text-transform: uppercase; letter-spacing: 0.07em;
}
.est-wrapper .est-field input,
.est-wrapper .est-field select {
  padding: 10px 13px; border-radius: 9px;
  border: 1.5px solid var(--est-border);
  font-size: 14px; font-family: var(--est-bfont); color: #2c3e30;
  background: #fafcfa; transition: border-color 0.2s;
  width: 100%;
}
.est-wrapper .est-field input:focus,
.est-wrapper .est-field select:focus { outline: none; border-color: var(--est-primary); background: white; }
.est-wrapper .est-field .req { color: #c8440a; }
.est-wrapper .est-webinar-label {
  display: flex; align-items: center; gap: 10px;
  cursor: pointer; font-size: 13px; color: var(--est-muted); font-weight: 500;
}
.est-wrapper .est-webinar-label input[type="checkbox"] { display: none; }
.est-wrapper .est-check {
  width: 18px; height: 18px; border-radius: 5px;
  border: 2px solid #c0d4c0; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  transition: all 0.2s;
}
.est-wrapper .est-webinar-label input:checked ~ .est-check {
  background: var(--est-primary); border-color: var(--est-primary);
}
.est-wrapper .est-webinar-label input:checked ~ .est-check::after {
  content:'✓'; color:white; font-size:11px; font-weight:700;
}
.est-wrapper .est-submit-btn {
  width: 100%; display: flex; align-items: center; justify-content: center; gap: 9px;
  background: var(--est-primary); color: white;
  font-family: var(--est-bfont); font-size: 15px; font-weight: 600;
  padding: 15px; border-radius: 10px; border: none; cursor: pointer;
  transition: all 0.25s;
}
.est-wrapper .est-submit-btn:hover { background: #2d4636; transform: translateY(-1px); box-shadow: 0 6px 20px rgba(63,95,74,0.25); }
.est-wrapper .est-submit-btn:disabled { background: #a0b8a0; cursor: not-allowed; transform: none; box-shadow: none; }
.est-wrapper .est-privacy-note { font-size: 11px; color: #bbb; text-align: center; margin-top: 10px; }

/* ── RESULT SCREEN ── */
.est-wrapper .est-s-result { padding: 0; position: relative; }
.est-wrapper .est-confetti-canvas {
  position: absolute; top: 0; left: 0; width: 100%; height: 100%;
  pointer-events: none; z-index: 0; border-radius: var(--est-radius);
}
.est-wrapper .est-result-body {
  position: relative; z-index: 1;
  padding: 44px 40px 40px; text-align: center;
}
.est-wrapper .est-result-badge {
  display: inline-flex; align-items: center;
  padding: 5px 16px; border-radius: 20px;
  font-size: 11px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase;
  margin-bottom: 12px;
}
.est-wrapper .est-result-badge.low  { background: var(--est-light); color: var(--est-primary); }
.est-wrapper .est-result-badge.moderate { background: #fdf3dd; color: #8a6010; }
.est-wrapper .est-result-badge.high { background: #fce8e0; color: #8a3010; }
.est-wrapper .est-result-heading {
  font-family: var(--est-qfont); font-size: 26px; font-weight: 700;
  color: var(--est-primary); margin: 0 0 28px; line-height: 1.3;
}
.est-wrapper .est-score-block {
  display: flex; align-items: center; gap: 28px;
  justify-content: center; margin-bottom: 24px; flex-wrap: wrap;
}
.est-wrapper .est-score-ring { position: relative; width: 120px; height: 120px; flex-shrink: 0; }
.est-wrapper .est-ring-svg { width: 120px; height: 120px; }
.est-wrapper .est-ring-inner {
  position: absolute; inset: 0;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
}
.est-wrapper .est-ring-num {
  font-family: var(--est-qfont); font-size: 36px; font-weight: 700;
  color: var(--est-primary); line-height: 1;
}
.est-wrapper .est-ring-out { font-size: 13px; color: #aaa; margin-top: 2px; }
.est-wrapper .est-score-scale-wrap { flex: 1; min-width: 180px; max-width: 240px; }
.est-wrapper .est-scale-track {
  height: 10px; border-radius: 5px;
  background: linear-gradient(90deg, #3F5F4A 0%, #E3B23C 45%, #c8440a 100%);
  position: relative; margin-bottom: 7px;
}
.est-wrapper .est-scale-pin {
  position: absolute; top: -5px;
  width: 20px; height: 20px; border-radius: 50%;
  background: white; border: 3px solid var(--est-primary);
  transform: translateX(-50%);
  transition: left 1.2s cubic-bezier(0.4,0,0.2,1);
  left: 0%;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}
.est-wrapper .est-scale-labs {
  display: flex; justify-content: space-between;
  font-size: 11px; font-weight: 600; color: #888;
}
.est-wrapper .est-result-msg {
  font-size: 14px; color: var(--est-muted); line-height: 1.75;
  max-width: 460px; margin: 0 auto 24px;
}
.est-wrapper .est-result-cta-box {
  background: var(--est-light); border-radius: 12px;
  padding: 22px 24px; margin-bottom: 16px;
}
.est-wrapper .est-result-cta-text {
  font-size: 13px; color: var(--est-muted); line-height: 1.7;
  font-style: italic; margin: 0 0 14px;
}
.est-wrapper .est-cta-link {
  display: inline-flex; align-items: center; gap: 7px;
  background: var(--est-accent); color: var(--est-primary);
  font-family: var(--est-bfont); font-size: 14px; font-weight: 700;
  padding: 12px 24px; border-radius: 8px; text-decoration: none;
  transition: all 0.2s;
}
.est-wrapper .est-cta-link:hover { background: #d4a030; transform: translateY(-1px); }
.est-wrapper .est-retake {
  background: none; border: none; color: #a0b0a0;
  font-size: 13px; cursor: pointer; text-decoration: underline;
  font-family: var(--est-bfont); margin-top: 4px;
}
.est-wrapper .est-retake:hover { color: var(--est-muted); }

/* ── RESPONSIVE ── */
@media (max-width: 580px) {
  .est-wrapper .est-welcome-top,
  .est-wrapper .est-welcome-bottom,
  .est-wrapper .est-s-quiz,
  .est-wrapper .est-s-details,
  .est-wrapper .est-result-body { padding-left: 22px; padding-right: 22px; }
  .est-wrapper .est-field-row { grid-template-columns: 1fr; }
  .est-wrapper .est-score-block { flex-direction: column; gap: 16px; }
  .est-wrapper .est-welcome-title { font-size: 24px; }
  .est-wrapper .est-q-text { font-size: 18px; }
}
