/* =========================
   Base / Theme
========================= */
:root{
  --bg: #eef6f5;               /* pale blue/green page bg */
  --card: #ffffff;             /* white cards */
  --text: #0f172a;             /* dark heading */
  --muted: #6b7280;            /* secondary text */
  --border: #e5e7eb;           /* light gray borders */
  --progress: #16a34a;         /* green bar */
  --progress-dark: #0e7a37;
  --accent: #22c55e;           /* green buttons */
  --accent-hover: #16a34a;
  --danger: #ef4444;
  --info: #2563eb;             /* blue link highlight */
  --soft: #f3f4f6;             /* soft gray fills */
  --success-bg: #e9f9ef;       /* pale green banner */
}

*{ box-sizing: border-box; }
html,body{ height:100%; }
body{
  margin:0;
  background: var(--bg);
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Inter, "Helvetica Neue", Arial, "Noto Sans", "Liberation Sans", sans-serif;
  color: var(--text);
}

/* =========================
   App Container (center card)
========================= */
.app-container{
  width: min(820px, 92vw);
  margin: 42px auto;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 18px;
  box-shadow: 0 12px 30px rgba(2,8,23,.06);
  padding: 24px 26px 28px;
}

/* Hide all steps by default; show .active */
.step{ display:none; }
.step.active{ display:block; }

/* =========================
   Step Header: "Question X of 5" + progress right
========================= */
.step-header{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:18px;
  margin-bottom: 16px;
}
.step-count{
  font-weight:600;
  color:#0a7a4a;
  font-size:14px;
}
.progress-container{
  display:flex;
  align-items:center;
  gap:12px;
  width:60%;
}
.progress-text{
  font-size:13px;
  color: var(--muted);
  white-space:nowrap;
}
.progress-bar{
  height:8px;
  background:#e7edf0;
  border-radius:999px;
  overflow:hidden;
  flex:1;
  box-shadow: inset 0 1px 0 rgba(0,0,0,.03);
}
.progress-bar.big{ height:10px; }
.progress{
  height:100%;
  width:0%;
  background: var(--progress);
  transition: width .35s ease;
}

/* =========================
   Headings / Subtitle
========================= */
h2{
  margin: 10px 0 6px;
  font-size: 22px;
  line-height: 1.25;
}
.step-subtitle{
  color: var(--muted);
  margin-bottom: 18px;
  font-size: 14px;
}

/* =========================
   Options Grid (cards)
========================= */
.options-grid{
  display:grid;
  grid-template-columns: 1fr 1fr;
  gap:14px 16px;
  margin-top: 6px;
}
.option-card{
  display:flex;
  align-items:center;
  gap:14px;
  padding:14px;
  border:2px solid #e6eaee;
  border-radius:12px;
  cursor:pointer;
  user-select:none;
  transition: border-color .18s ease, box-shadow .18s ease, background .18s ease;
  background: #fff;
}
.option-card:hover{
  border-color: var(--progress);
  background: #f6fdf7;
  box-shadow: 0 5px 14px rgba(2,8,23,.05);
}
.option-card.selected{
  border-color: var(--progress);
  background: #eefdF4;
  box-shadow: 0 0 0 3px rgba(22,163,74,.15);
}
.option-card img{
  width:42px; height:42px; object-fit:contain;
}
.option-content h3{
  margin:0 0 4px;
  font-size:16px;
}
.option-content p{
  margin:0;
  color: var(--muted);
  font-size:13px;
}

/* =========================
   Inputs
========================= */
.input-wrap{ margin: 8px 0 6px; }
input[type="text"],
input[type="email"],
input[type="tel"],
input[type="number"]{
  width:100%;
  padding:12px 14px;
  font-size:15px;
  color: var(--text);
  background:#fff;
  border:1.8px solid #cfd8dd;
  border-radius:10px;
  outline:none;
  transition: border-color .18s ease, box-shadow .18s ease, background .2s ease;
}
input:focus{
  border-color: var(--progress);
  box-shadow: 0 0 0 4px rgba(22,163,74,.15);
}
.postal-label{
  font-size: 12.5px;
  color: var(--muted);
  margin: 6px 0 2px;
}

/* =========================
   Navigation buttons
========================= */
.form-navigation{
  display:flex;
  justify-content: space-between;
  align-items:center;
  gap:12px;
  margin-top: 14px;
}
button{
  border:0;
  border-radius:10px;
  padding:11px 18px;
  font-weight:600;
  cursor:pointer;
  transition: transform .04s ease, background .18s ease, opacity .18s ease;
}
.next-btn{
  background: var(--accent);
  color:#fff;
}
.next-btn:hover{ background: var(--accent-hover); }
.prev-btn{
  background: transparent;
  color:#111827;
  border: 1px solid #cfd8dd;
}
.prev-btn:hover{ background:#f5f7f9; }
button:active{ transform: translateY(1px); }

/* =========================
   Loading / Calculating (Step 5)
========================= */
.loading-wrapper{
  text-align:center;
  padding: 20px 10px 8px;
}
.loading-icon{
  width:66px; height:66px;
  margin: 6px auto 8px;
  border-radius:50%;
  background: #e6f7ed;
  color:#0ea44a;
  display:grid; place-items:center;
  font-size: 28px;
}
.status-line{
  display:flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  margin: 10px 0 12px;
  color:#0f8a3b;
  font-size:14px;
}
.status-icon{ font-size:18px; }
.dots-indicator{
  display:flex; gap:8px; justify-content:center; margin-top:10px;
}
.dots-indicator .dot{
  width:8px; height:8px; border-radius:999px; background: var(--progress);
  opacity:.25; animation: pulse 1.4s infinite;
}
.dots-indicator .dot:nth-child(2){ animation-delay: .2s; }
.dots-indicator .dot:nth-child(3){ animation-delay: .4s; }
@keyframes pulse{
  0%,100%{ opacity:.25; transform: scale(.9);}
  50%{ opacity:1; transform: scale(1);}
}

/* Big progress bar in Step 5 reused .progress-bar.big */

/* =========================
   Offer Summary (Step 6)
========================= */
.offer-card{
  background:#fff;
  border:1px solid var(--border);
  border-radius:14px;
  box-shadow: 0 10px 24px rgba(2,8,23,.06);
  padding: 18px 18px 10px;
}
.offer-header{
  display:flex; justify-content:space-between; align-items:flex-start; gap:10px;
  margin-bottom: 12px;
}
.offer-header h2{ margin:0; font-size:20px; }
.offer-meta{
  margin:0; text-align:right; color: var(--muted); font-size:12.5px;
}
.offer-details{
  background:#f7fafb;
  border:1px solid #e6eaee;
  border-radius:10px;
  padding:12px;
  margin: 10px 0 12px;
}
.offer-details h3{
  margin:0 0 8px; font-size:15px;
}
.offer-details ul{
  margin:0; padding-left: 16px; color:#374151; font-size:14px;
}
.offer-stats p{
  margin: 10px 0;
  padding: 10px 0;
  border-top: 1px solid #e6eaee;
  display:flex; justify-content:space-between; gap:10px;
}
.highlight-green{ color: #0ea44a; font-weight:700; }
.highlight-blue{ color: var(--info); font-weight:700; }
.offer-summary{
  margin-top: 10px;
}
.return-box{
  border: 2px solid #c7f2d6;
  background: #e9f9ef;
  color:#065f46;
  border-radius:10px;
  padding: 12px;
  display:flex; align-items:center; justify-content:space-between;
}
.return-percent{ font-size: 20px; font-weight: 800; }
.return-text{ font-size: 14px; }

/* =========================
   "Offer Ready" banner + Contact form (Step 7)
========================= */
.offer-ready-box{
  border: 2px solid #c7f2d6;
  background: var(--success-bg);
  border-radius: 10px;
  padding: 12px 14px;
  margin-bottom: 14px;
}
.offer-ready-title{
  margin:0 0 2px;
  font-weight:700;
  color:#0f8a3b;
}
.offer-ready-subtitle{
  margin:0;
  color: var(--muted);
  font-size: 14px;
}
.contact-form input{
  margin-bottom: 12px;
}
.checkbox{
  display:flex; align-items:flex-start; gap:8px;
  font-size: 13px; color: #374151;
  margin: 6px 0 10px;
}
.checkbox input{ margin-top: 3px; }
.checkbox a{ color: var(--info); text-decoration: underline; }

/* =========================
   Thank You (Step 8)
========================= */
.thankyou-card{
  background:#f1fcf5;
  border: 1px solid #d3f0dd;
  border-radius: 14px;
  padding: 22px 20px;
}
.check-icon{
  width:56px; height:56px; border-radius:999px;
  background:#dbfde8; color:#22c55e; display:grid; place-items:center;
  margin: 4px auto 12px; font-size: 28px;
}
.thankyou-text{
  color: #374151; text-align:center; margin: 8px 0 16px;
}
.next-steps h3{ margin: 6px 0 10px; }
.next-steps ul{ list-style:none; padding:0; margin:0 0 16px; display:grid; gap:10px; }
.next-steps li{ display:flex; gap:10px; align-items:flex-start; }
.next-steps .num{
  width:26px; height:26px; border-radius:999px; background:#b6f0c6; color:#065f46; display:grid; place-items:center; font-weight:700;
}
.user-summary{
  background:#e9f3fb;
  border: 1px solid #d7e6f7;
  color:#0f172a;
  border-radius: 10px;
  padding: 12px;
  margin-bottom: 14px;
}
.user-summary h4{ margin:0 0 8px; }
.user-summary p{ margin: 6px 0; font-size: 14px; }
.thankyou-footer{ text-align:center; }
.thankyou-footer a{
  color:#0b5bd3; text-decoration:none; font-weight:600;
}
.footer-buttons{
  display:flex; justify-content:center; align-items:center; gap:10px; margin-top: 12px;
}
.footer-buttons .prev-btn{ border-color:#b7c5d2; }
.restart-btn{
  background:#0ea5e9; color:#fff;
}
.restart-btn:hover{ background:#0284c7; }

/* =========================
   Utilities / Responsive
========================= */
a{ color:#0b5bd3; }
@media (max-width: 700px){
  .app-container{ padding: 18px 16px 22px; }
  .options-grid{ grid-template-columns: 1fr; }
  .progress-container{ width: 55%; }
  .offer-header{ flex-direction:column; align-items:flex-start; }
  .footer-buttons{ flex-direction:column; }
}

/* Small helper for disabled buttons if needed */
button[disabled]{ opacity:.5; cursor:not-allowed; }
