/* ════════════════════════════════════════════════════════════════
   ESTIMATING TOOL — multi-step wizard styles
   Extends the site's existing CSS (colors, buttons, container).
   ════════════════════════════════════════════════════════════════ */

/* ── Service picker ── */
.est-picker-grid {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px;
}
.est-picker-card {
  display: flex; gap: 20px; align-items: flex-start;
  background: #fff; border: 1px solid #e5e7eb; border-radius: 14px;
  padding: 24px; text-decoration: none; color: inherit;
  transition: all 0.2s;
}
.est-picker-card:hover {
  border-color: #16a34a; transform: translateY(-3px);
  box-shadow: 0 10px 30px -12px rgba(0,0,0,0.15);
}
.est-picker-icon {
  flex-shrink: 0; width: 52px; height: 52px; border-radius: 12px;
  background: rgba(22, 163, 74, 0.12); color: #16a34a;
  display: flex; align-items: center; justify-content: center;
}
.est-picker-icon svg { width: 28px; height: 28px; }
.est-picker-card h3 { font-size: 18px; font-weight: 600; margin-bottom: 6px; color: #0f172a; }
.est-picker-card p { font-size: 14px; color: #6b7280; margin-bottom: 12px; line-height: 1.55; }
.est-picker-cta { color: #16a34a; font-weight: 600; font-size: 14px; }
.est-picker-card-soon { opacity: 0.55; cursor: not-allowed; }
.est-picker-card-soon:hover { transform: none; border-color: #e5e7eb; box-shadow: none; }
.est-picker-soon { color: #6b7280; font-weight: 500; font-size: 13px; font-style: italic; }
@media (max-width: 700px) { .est-picker-grid { grid-template-columns: 1fr; } }

/* ── Wizard shell ── */
.est-wrap { padding: 48px 0 64px; }
.est-header { max-width: 900px; margin: 0 auto 24px; text-align: center; }

.est-shell {
  max-width: 820px; margin: 0 auto;
  background: #fff; border: 1px solid #e5e7eb; border-radius: 18px;
  padding: 36px 40px; box-shadow: 0 20px 60px -30px rgba(0,0,0,0.15);
}

/* ── Progress bar ── */
.est-progress {
  display: flex; align-items: center; gap: 0;
  margin: 0 0 32px; padding: 0 4px;
}
.est-progress-step {
  flex: 1; display: flex; flex-direction: column; align-items: center; gap: 8px;
  position: relative;
}
.est-progress-dot {
  width: 34px; height: 34px; border-radius: 50%;
  background: #f3f4f6; color: #9ca3af;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 14px;
  transition: all 0.3s; z-index: 2; position: relative;
  border: 2px solid #e5e7eb;
}
.est-progress-step.done .est-progress-dot { background: #16a34a; color: #fff; border-color: #16a34a; }
.est-progress-step.current .est-progress-dot { background: #0f172a; color: #fff; border-color: #0f172a; }
.est-progress-label {
  font-size: 12px; font-weight: 500; color: #6b7280;
  text-align: center; max-width: 100px;
}
.est-progress-step.current .est-progress-label { color: #0f172a; font-weight: 600; }
.est-progress-line {
  position: absolute; top: 16px; left: 55%; right: -45%;
  height: 2px; background: #e5e7eb; z-index: 1;
}
.est-progress-step.done .est-progress-line { background: #16a34a; }
.est-progress-step:last-child .est-progress-line { display: none; }
@media (max-width: 640px) {
  .est-progress-label { display: none; }
  .est-progress-line { top: 14px; }
  .est-progress-dot { width: 28px; height: 28px; font-size: 12px; }
}

/* ── Step content ── */
.est-step { display: none; }
.est-step.active { display: block; animation: est-fade 0.25s ease; }
@keyframes est-fade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

.est-step-title { font-size: 22px; font-weight: 500; color: #0f172a; margin-bottom: 6px; letter-spacing: -0.005em; }
.est-step-subtitle { color: #6b7280; font-size: 15px; line-height: 1.65; margin-bottom: 28px; }

/* Questions */
.est-question { margin-bottom: 24px; }
.est-question-label {
  display: block; font-weight: 600; color: #0f172a; font-size: 15px;
  margin-bottom: 6px;
}
.est-question-hint { color: #6b7280; font-size: 13px; margin-bottom: 12px; line-height: 1.5; }
.est-question-required { color: #dc2626; margin-left: 3px; }

/* Choice buttons */
.est-choices { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 8px; }
.est-choice {
  padding: 14px 16px; background: #fff; border: 1.5px solid #e5e7eb; border-radius: 10px;
  text-align: left; cursor: pointer; font-family: inherit; font-size: 14px; font-weight: 500;
  color: #374151; transition: all 0.15s; line-height: 1.4;
}
.est-choice:hover { border-color: #16a34a; background: #f0fdf4; }
.est-choice.selected {
  border-color: #16a34a; background: #16a34a; color: #fff;
  box-shadow: 0 4px 12px -3px rgba(22, 163, 74, 0.45);
}

/* Text inputs */
.est-input, .est-textarea {
  width: 100%; padding: 12px 14px;
  background: #fff; border: 1.5px solid #e5e7eb; border-radius: 10px;
  font-family: inherit; font-size: 15px; color: #0f172a;
  transition: border 0.15s, box-shadow 0.15s;
}
.est-input:focus, .est-textarea:focus {
  outline: none; border-color: #16a34a;
  box-shadow: 0 0 0 4px rgba(22, 163, 74, 0.1);
}
.est-textarea { resize: vertical; min-height: 80px; }

/* Photo uploads */
.est-upload-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.est-upload {
  border: 2px dashed #e5e7eb; border-radius: 12px;
  aspect-ratio: 4/3; position: relative; overflow: hidden;
  background: #f9fafb; cursor: pointer; transition: all 0.15s;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 8px; text-align: center; padding: 20px;
}
.est-upload:hover { border-color: #16a34a; background: #f0fdf4; }
.est-upload.has-file { border-style: solid; border-color: #16a34a; padding: 0; background: #000; }
.est-upload input[type="file"] {
  position: absolute; inset: 0; opacity: 0; cursor: pointer;
}
.est-upload-icon {
  width: 40px; height: 40px; border-radius: 50%;
  background: rgba(22, 163, 74, 0.1); color: #16a34a;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.est-upload.has-file .est-upload-icon { display: none; }
.est-upload-label { font-weight: 600; font-size: 14px; color: #0f172a; }
.est-upload-hint { font-size: 12px; color: #6b7280; line-height: 1.4; }
.est-upload.has-file .est-upload-label, .est-upload.has-file .est-upload-hint { display: none; }
.est-upload-preview { width: 100%; height: 100%; object-fit: cover; display: none; }
.est-upload.has-file .est-upload-preview { display: block; }
.est-upload-check {
  position: absolute; top: 10px; right: 10px;
  background: #16a34a; color: #fff; border-radius: 50%;
  width: 28px; height: 28px; display: none;
  align-items: center; justify-content: center; font-weight: 700;
  box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}
.est-upload.has-file .est-upload-check { display: flex; }
.est-upload-remove {
  position: absolute; top: 10px; left: 10px;
  background: rgba(0,0,0,0.6); color: #fff; border: 0;
  border-radius: 50%; width: 24px; height: 24px;
  display: none; cursor: pointer; font-size: 14px;
  align-items: center; justify-content: center;
}
.est-upload.has-file .est-upload-remove { display: flex; }
@media (max-width: 640px) { .est-upload-grid { grid-template-columns: 1fr; } }

/* ── Nav ── */
.est-nav {
  display: flex; justify-content: space-between; align-items: center;
  margin-top: 32px; padding-top: 24px; border-top: 1px solid #f3f4f6;
  gap: 12px;
}
.est-nav .btn { min-width: 140px; }
.est-nav .btn-primary { margin-left: auto; }

/* ── Results panel ── */
.est-result {
  background: linear-gradient(135deg, #f0fdf4 0%, #ecfdf5 100%);
  border: 1px solid #bbf7d0; border-radius: 14px;
  padding: 32px; margin-bottom: 24px; text-align: center;
}
.est-result-label {
  color: #16a34a; font-weight: 700; font-size: 12px; letter-spacing: 0.15em;
  text-transform: uppercase; margin-bottom: 12px;
}
.est-result-price {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: clamp(36px, 5vw, 52px); font-weight: 700;
  color: #0f172a; line-height: 1.1; letter-spacing: -0.02em;
}
.est-result-vat { color: #6b7280; font-size: 16px; margin-top: 8px; font-weight: 500; }
.est-result-explain { color: #4b5563; font-size: 14px; margin-top: 14px; line-height: 1.6; max-width: 480px; margin-left: auto; margin-right: auto; }

.est-panels {
  display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-bottom: 28px;
}
.est-panel {
  background: #fff; border: 1px solid #e5e7eb; border-radius: 12px; padding: 24px;
}
.est-panel-title {
  font-size: 12px; font-weight: 700; color: #16a34a; letter-spacing: 0.14em;
  text-transform: uppercase; margin-bottom: 14px;
}
.est-panel-list { list-style: none; padding: 0; display: grid; gap: 10px; }
.est-panel-list li {
  color: #374151; font-size: 14px; line-height: 1.55;
  padding-left: 24px; position: relative;
}
.est-panel-list li::before {
  content: '✓'; position: absolute; left: 0; top: 0;
  color: #16a34a; font-weight: 700;
}
.est-panel-assumptions .est-panel-list li::before { content: 'ℹ'; color: #0369a1; }
@media (max-width: 640px) { .est-panels { grid-template-columns: 1fr; } }

/* Success screen after submit */
.est-success {
  text-align: center; padding: 40px 20px;
}
.est-success-tick {
  width: 72px; height: 72px; border-radius: 50%;
  background: #16a34a; color: #fff;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 20px; font-size: 40px; font-weight: 700;
  box-shadow: 0 12px 30px -8px rgba(22, 163, 74, 0.5);
}
.est-success h2 { font-size: 26px; font-weight: 500; color: #0f172a; margin-bottom: 10px; }
.est-success p { color: #6b7280; font-size: 16px; max-width: 480px; margin: 0 auto 12px; line-height: 1.7; }
.est-success-ref {
  background: #f9fafb; border: 1px solid #e5e7eb; border-radius: 10px;
  padding: 14px 20px; margin: 20px auto 0;
  display: inline-block; font-family: monospace; font-size: 15px; color: #0f172a;
}

.est-error {
  background: #fef2f2; border: 1px solid #fecaca;
  color: #b91c1c; padding: 12px 16px; border-radius: 8px;
  font-size: 14px; margin-bottom: 20px;
}

/* Small tweaks */
@media (max-width: 640px) {
  .est-shell { padding: 24px 20px; border-radius: 14px; }
  .est-nav .btn { min-width: 0; flex: 1; }
}
