/* styles/estimator.css */
/* Inherits design tokens from style.css */

/* ── Page shell ─────────────────────────────────────────────────────────────── */
.est-page {
  min-height: 100vh;
  background: var(--warm-white, #fdfbf8);
  font-family: var(--sans, 'Raleway', sans-serif);
  padding-right: 0;
}

.est-header {
  background: var(--bg-dark, #0f1f35);
  padding: 1rem 1.5rem;
  display: flex;
  align-items: center;
  gap: 1rem;
}

.est-header a {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: #fff;
}

.est-header img {
  height: 36px;
  width: auto;
}

.est-header-title {
  font-size: 0.875rem;
  font-weight: 500;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--gold, #e69138);
}

/* ── Progress bar ───────────────────────────────────────────────────────────── */
.est-progress {
  background: #fff;
  border-bottom: 1px solid #e5dfd6;
  padding: 0.75rem 1.5rem;
}

.est-progress-inner {
  max-width: 680px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.est-progress-step {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.75rem;
  color: #9e9082;
}

.est-progress-step.active { color: var(--text-dark, #151515); font-weight: 600; }
.est-progress-step.done   { color: var(--gold, #e69138); }

.est-progress-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: #d6cfc4;
  flex-shrink: 0;
}
.est-progress-step.active .est-progress-dot { background: var(--text-dark, #151515); }
.est-progress-step.done   .est-progress-dot { background: var(--gold, #e69138); }

.est-progress-line {
  flex: 1;
  height: 1px;
  background: #d6cfc4;
}

/* ── Container ──────────────────────────────────────────────────────────────── */
.est-container {
  max-width: 680px;
  margin: 0 auto;
  padding: 2.5rem 1.5rem 4rem;
}

/* ── Screens ────────────────────────────────────────────────────────────────── */
.est-screen { display: none; }
[x-cloak] { display: none !important; }

/* ── Headings ───────────────────────────────────────────────────────────────── */
.est-eyebrow {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--gold, #e69138);
  margin-bottom: 0.5rem;
}

.est-h1 {
  font-family: var(--serif, 'Playfair Display', serif);
  font-size: 2rem;
  font-weight: 700;
  color: var(--text-dark, #151515);
  margin-bottom: 0.5rem;
  line-height: 1.2;
}

.est-lead {
  font-size: 1rem;
  color: #5a5248;
  margin-bottom: 2rem;
  line-height: 1.6;
}

.est-section-title {
  font-family: var(--serif, 'Playfair Display', serif);
  font-size: 1.375rem;
  font-weight: 700;
  color: var(--text-dark, #151515);
  margin-bottom: 0.5rem;
}

/* ── Choice screen cards ────────────────────────────────────────────────────── */
.est-choice-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-top: 1.5rem;
}

.est-choice-card {
  background: #fff;
  border: 2px solid #e5dfd6;
  border-radius: 4px;
  padding: 2rem 1.5rem;
  cursor: pointer;
  transition: border-color 0.15s, box-shadow 0.15s;
  text-align: left;
}

.est-choice-card:hover {
  border-color: var(--gold, #e69138);
  box-shadow: 0 2px 12px rgba(0,0,0,0.06);
}

.est-choice-icon {
  width: 44px; height: 44px;
  margin-bottom: 1rem;
}

.est-choice-card h2 {
  font-family: var(--serif, 'Playfair Display', serif);
  font-size: 1.125rem;
  color: var(--text-dark, #151515);
  margin-bottom: 0.5rem;
}

.est-choice-card p {
  font-size: 0.875rem;
  color: #5a5248;
  line-height: 1.5;
  margin-bottom: 1.25rem;
}

.est-choice-card .est-btn {
  width: 100%;
  text-align: center;
}

.est-choice-note {
  font-size: 0.8125rem;
  color: #9e9082;
  text-align: center;
  margin-top: 1rem;
}

/* ── Form elements ──────────────────────────────────────────────────────────── */
.est-field {
  margin-bottom: 1.25rem;
}

.est-label {
  display: block;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--text-dark, #151515);
  margin-bottom: 0.375rem;
}

.est-label-hint {
  font-weight: 400;
  color: #9e9082;
  font-size: 0.75rem;
  margin-left: 0.25rem;
}

.est-input,
.est-select {
  display: block;
  width: 100%;
  padding: 0.75rem 1rem;
  font-family: var(--sans, 'Raleway', sans-serif);
  font-size: 1rem;
  color: var(--text-dark, #151515);
  background: #fff;
  border: 1.5px solid #d6cfc4;
  border-radius: 3px;
  min-height: 44px;
  box-sizing: border-box;
  appearance: none;
  transition: border-color 0.15s;
}

.est-input:focus,
.est-select:focus {
  outline: none;
  border-color: var(--gold, #e69138);
}

.est-select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16'%3E%3Cpath fill='%239e9082' d='M4 6l4 4 4-4'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  padding-right: 2.5rem;
}

.est-field-error {
  font-size: 0.75rem;
  color: #c0392b;
  margin-top: 0.25rem;
}

.est-field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

/* ── Checkbox ───────────────────────────────────────────────────────────────── */
.est-checkbox-label {
  display: flex;
  align-items: flex-start;
  gap: 0.625rem;
  font-size: 0.875rem;
  color: #5a5248;
  cursor: pointer;
  line-height: 1.5;
}

.est-checkbox-label input[type="checkbox"] {
  width: 18px; height: 18px;
  flex-shrink: 0;
  margin-top: 2px;
  accent-color: var(--brand-charcoal, #1a1a1a);
  cursor: pointer;
}

/* ── Checkboxes group ───────────────────────────────────────────────────────── */
.est-checks-group {
  display: flex;
  flex-wrap: wrap;
  gap: 0.625rem;
  margin-top: 0.5rem;
}

.est-check-pill {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.875rem;
  border: 1.5px solid #d6cfc4;
  border-radius: 999px;
  cursor: pointer;
  font-size: 0.8125rem;
  color: #5a5248;
  background: #fff;
  transition: border-color 0.15s, background 0.15s;
  user-select: none;
}

.est-check-pill:has(input:checked) {
  border-color: var(--bg-dark, #0f1f35);
  background: var(--bg-dark, #0f1f35);
  color: #fff;
}

.est-check-pill input[type="checkbox"] {
  display: none;
}

/* ── Config block ───────────────────────────────────────────────────────────── */
.est-config-block {
  background: #fff;
  border: 1.5px solid #e5dfd6;
  border-radius: 4px;
  padding: 1.25rem;
  margin-bottom: 1rem;
  position: relative;
}

.est-config-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.est-config-num {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--gold, #e69138);
}

.est-config-remove {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 0.8125rem;
  color: #9e9082;
  padding: 0.25rem 0.5rem;
  min-height: 44px;
}

.est-config-remove:hover { color: #c0392b; }

.est-config-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.875rem;
}

.est-config-full { grid-column: 1 / -1; }

.est-qty-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.est-qty-btn {
  width: 44px; height: 44px;
  background: #f0ece6;
  border: 1.5px solid #d6cfc4;
  border-radius: 3px;
  font-size: 1.25rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.est-qty-btn:hover { background: #e5dfd6; }

.est-qty-val {
  font-size: 1.125rem;
  font-weight: 500;
  color: var(--text-dark, #151515);
  min-width: 2rem;
  text-align: center;
}

.est-price-at-visit-note {
  font-size: 0.8125rem;
  color: var(--gold, #e69138);
  background: #fdf8ee;
  border: 1px solid #f0e4b8;
  border-radius: 3px;
  padding: 0.5rem 0.75rem;
  margin-top: 0.5rem;
}

.est-add-config-btn {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: none;
  border: 1.5px dashed #d6cfc4;
  border-radius: 4px;
  padding: 0.875rem 1.25rem;
  font-size: 0.875rem;
  color: #5a5248;
  cursor: pointer;
  width: 100%;
  min-height: 44px;
  margin-bottom: 1.5rem;
  transition: border-color 0.15s;
}

.est-add-config-btn:hover { border-color: var(--gold, #e69138); color: var(--text-dark, #151515); }

/* ── Buttons ────────────────────────────────────────────────────────────────── */
.est-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.875rem 1.75rem;
  font-family: 'Raleway', sans-serif;
  font-size: 0.9375rem;
  font-weight: 500;
  border-radius: 3px;
  cursor: pointer;
  text-decoration: none;
  min-height: 44px;
  transition: background 0.15s, opacity 0.15s;
  border: none;
}

.est-btn-primary {
  background: var(--bg-dark, #0f1f35);
  color: #fff;
}
.est-btn-primary:hover { opacity: 0.88; }

.est-btn-gold {
  background: var(--gold, #e69138);
  color: #fff;
}
.est-btn-gold:hover { opacity: 0.88; }

.est-btn-outline {
  background: transparent;
  border: 1.5px solid #d6cfc4;
  color: var(--text-dark, #151515);
}
.est-btn-outline:hover { border-color: var(--text-dark, #151515); }

.est-nav {
  display: flex;
  gap: 0.75rem;
  margin-top: 2rem;
}

/* ── Result screen ──────────────────────────────────────────────────────────── */
.est-result-intro {
  margin-bottom: 2rem;
}

.est-tiers-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1rem;
  margin-bottom: 2rem;
}

.est-tier-card {
  background: #fff;
  border: 2px solid #e5dfd6;
  border-radius: 4px;
  padding: 1.5rem;
  position: relative;
}

.est-tier-card--popular {
  border-color: var(--gold, #e69138);
}

.est-tier-badge {
  position: absolute;
  top: -1px;
  right: 1rem;
  background: var(--gold, #e69138);
  color: #fff;
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 0.25rem 0.625rem;
  border-radius: 0 0 4px 4px;
}

.est-tier-name {
  font-family: var(--serif, 'Playfair Display', serif);
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--text-dark, #151515);
  margin-bottom: 0.25rem;
}

.est-tier-tagline {
  font-size: 0.8125rem;
  color: #5a5248;
  margin-bottom: 1rem;
  line-height: 1.4;
}

.est-tier-price {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-dark, #151515);
  margin-bottom: 0.75rem;
  line-height: 1.1;
}

.est-tier-price-label {
  font-size: 0.75rem;
  font-weight: 400;
  color: #9e9082;
  display: block;
  margin-bottom: 0.25rem;
}

.est-tier-includes {
  font-size: 0.75rem;
  color: #5a5248;
  line-height: 1.6;
  border-top: 1px solid #e5dfd6;
  padding-top: 0.75rem;
  margin-top: 0.75rem;
}

.est-result-cta {
  background: var(--bg-dark, #0f1f35);
  color: #fff;
  border-radius: 4px;
  padding: 2rem 1.5rem;
  margin-bottom: 1.5rem;
  text-align: center;
}

.est-result-cta h3 {
  font-family: var(--serif, 'Playfair Display', serif);
  font-size: 1.25rem;
  margin-bottom: 0.5rem;
}

.est-result-cta p {
  font-size: 0.875rem;
  color: #c5bdb4;
  margin-bottom: 1.25rem;
}

.est-result-cta .est-btn-gold {
  font-size: 1rem;
}

.est-zero-tier-box {
  background: #fff;
  border: 2px solid #e5dfd6;
  border-radius: 4px;
  padding: 2rem;
  text-align: center;
  margin-bottom: 2rem;
}

.est-zero-tier-box p {
  font-size: 1rem;
  color: #5a5248;
  line-height: 1.6;
}

.est-pav-box {
  background: #fdf8ee;
  border: 1px solid #f0e4b8;
  border-radius: 4px;
  padding: 1rem 1.25rem;
  font-size: 0.875rem;
  color: #5a5248;
  margin-bottom: 1rem;
  line-height: 1.5;
}

.est-disclaimers {
  font-size: 0.75rem;
  color: #9e9082;
  line-height: 1.6;
  border-top: 1px solid #e5dfd6;
  padding-top: 1rem;
  margin-top: 1.5rem;
}

.est-disclaimers p { margin-bottom: 0.375rem; }

.est-both-failed {
  background: #fff3f3;
  border: 1px solid #f5c6c6;
  border-radius: 3px;
  padding: 0.875rem 1rem;
  font-size: 0.875rem;
  color: #6b2020;
  margin-top: 1rem;
  line-height: 1.5;
}

/* ── Door confirmation / out-of-area ────────────────────────────────────────── */
.est-confirm-box {
  background: #fff;
  border: 2px solid #e5dfd6;
  border-radius: 4px;
  padding: 2rem;
  margin-bottom: 1.5rem;
}

.est-confirm-box h2 {
  font-family: var(--serif, 'Playfair Display', serif);
  font-size: 1.5rem;
  color: var(--text-dark, #151515);
  margin-bottom: 0.75rem;
}

.est-confirm-box p {
  font-size: 0.9375rem;
  color: #5a5248;
  line-height: 1.6;
  margin-bottom: 0.75rem;
}

.est-confirm-contact {
  font-size: 0.875rem;
  color: #9e9082;
  border-top: 1px solid #e5dfd6;
  padding-top: 1rem;
  margin-top: 1rem;
}

.est-confirm-contact a {
  color: var(--gold, #e69138);
  text-decoration: none;
}

/* ── Door pricing explanation ───────────────────────────────────────────────── */
.est-door-explainer {
  background: #fff;
  border: 1.5px solid #e5dfd6;
  border-radius: 4px;
  padding: 1.5rem;
  margin-bottom: 2rem;
}

.est-door-explainer p {
  font-size: 0.9375rem;
  color: #5a5248;
  line-height: 1.65;
  margin-bottom: 0.75rem;
}

.est-door-explainer p:last-child { margin-bottom: 0; }

/* ── Honeypot ───────────────────────────────────────────────────────────────── */
.est-honeypot {
  position: absolute;
  left: -9999px;
  opacity: 0;
  pointer-events: none;
}

/* ── Responsive ─────────────────────────────────────────────────────────────── */
@media (max-width: 600px) {
  .est-choice-grid { grid-template-columns: 1fr; }
  .est-field-row   { grid-template-columns: 1fr; }
  .est-config-grid { grid-template-columns: 1fr; }
  .est-tiers-grid  { grid-template-columns: 1fr; }
  .est-h1          { font-size: 1.625rem; }
  .est-container   { padding: 1.5rem 1rem 3rem; }
}
