/* ============================================================
   Dakwerken Calculator – Component Styles
   ============================================================ */

/* ── Progress Bar ────────────────────────────────────────── */
.progress-wrap {
  background: var(--white);
  border-bottom: 1px solid var(--gray-mid);
  padding: 12px 20px 10px;
  display: none;
}

.progress-wrap.visible {
  display: block;
}

.progress-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.progress-label {
  font-size: 0.78rem;
  font-weight: 400;
  color: var(--dark-2);
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

.progress-pct {
  font-size: 0.78rem;
  font-weight: 400;
  color: var(--orange);
}

.progress-bar {
  height: 5px;
  background: var(--gray-mid);
  border-radius: 4px;
  position: relative;
  overflow: hidden;
}

.progress-bar::after {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  height: 100%;
  background: var(--orange);
  border-radius: 4px;
  width: var(--progress, 0%);
  transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ── Main layout ─────────────────────────────────────────── */
.calc-main {
  width: 100%;
  margin: 0 auto;
  padding: 0;
}

/* ── Card ────────────────────────────────────────────────── */
.calc-card {
  background: var(--white);
  overflow: hidden;
  position: relative;
}

/* ── Steps ───────────────────────────────────────────────── */
.step {
  display: none;
  padding: 24px 20px 8px;
  animation: fadeSlide 0.3s ease;
}

.step.active {
  display: block;
}

@keyframes fadeSlide {
  from {
    opacity: 0;
    transform: translateX(20px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes fadeSlideBack {
  from {
    opacity: 0;
    transform: translateX(-20px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.step.going-back {
  animation: fadeSlideBack 0.3s ease;
}

/* ── Step typography ─────────────────────────────────────── */
.step-question {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--dark);
  margin-bottom: 8px;
  line-height: 1.3;
}

.step-sub {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 18px;
  line-height: 1.5;
}

.accent {
  color: var(--orange);
}

/* ── Landing step ────────────────────────────────────────── */
.step-landing {
  text-align: center;
  padding: 4px 0;
}

.landing-img {
  width: 100%;
  max-width: 340px;
  height: auto;
  margin-bottom: 16px;
  display: block;
  margin-left: auto;
  margin-right: auto;
}

.step-landing h1 {
  font-size: 1.6rem;
  margin-bottom: 12px;
  color: var(--dark);
}

.landing-sub {
  color: var(--text-muted);
  font-size: 0.9rem;
  max-width: 420px;
  margin: 0 auto 18px;
  line-height: 1.5;
}

.landing-bullets {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 24px;
  text-align: left;
  max-width: 300px;
  margin-left: auto;
  margin-right: auto;
}

.landing-bullets li {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 400;
  color: var(--dark-2);
}

.bullet-icon {
  width: 22px;
  height: 22px;
  background: var(--orange);
  color: white;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 0.7rem;
  font-weight: 400;
  flex-shrink: 0;
}

/* ── Photo cards (step 1 dak type) ──────────────────────── */
.photo-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 4px;
}

.photo-card {
  border: 2px solid var(--gray-mid);
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
  background: var(--gray-light);
  text-align: left;
  font-family: inherit;
  padding: 0;
  position: relative;
  transition: border-color var(--transition), box-shadow var(--transition), transform var(--transition);
}

.photo-card:hover {
  border-color: var(--orange);
  transform: translateY(-2px);
  box-shadow: var(--shadow-hover);
}

.photo-card.selected {
  border-color: var(--orange);
  box-shadow: 0 0 0 3px rgba(240,131,0,0.2);
}

.photo-card img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  display: block;
}

.photo-card-footer {
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.photo-card-label {
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--dark);
  line-height: 1.2;
}

.photo-card-desc {
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* Checkmark on selected photo card */
.photo-card.selected::after {
  content: '✓';
  position: absolute;
  top: 8px;
  right: 8px;
  width: 22px;
  height: 22px;
  background: var(--orange);
  color: white;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 0.72rem;
  font-weight: 400;
  line-height: 1;
}

/* ── Option rows ─────────────────────────────────────────── */
.option-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 4px;
}

.option-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  border: 2px solid var(--gray-mid);
  border-radius: var(--radius);
  cursor: pointer;
  background: var(--gray-light);
  text-align: left;
  width: 100%;
  font-family: inherit;
  transition: border-color var(--transition), background var(--transition), box-shadow var(--transition);
}

.option-row:hover {
  border-color: var(--orange);
  background: var(--orange-light);
}

.option-row.selected {
  border-color: var(--orange);
  background: var(--orange-light);
  box-shadow: 0 0 0 3px rgba(240,131,0,0.12);
}

.option-row-icon {
  flex-shrink: 0;
  width: 34px;
  display: grid;
  place-items: center;
  color: var(--orange);
}

.option-row-icon svg {
  width: 22px;
  height: 22px;
}

.option-row-thumb {
  width: 56px;
  height: 48px;
  object-fit: cover;
  border-radius: 6px;
  flex-shrink: 0;
}

.option-row-text {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.option-row-label {
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--dark);
  line-height: 1.2;
}

.option-row-desc {
  font-size: 0.78rem;
  color: var(--text-muted);
  line-height: 1.3;
}

.option-row-radio {
  width: 20px;
  height: 20px;
  border: 2px solid var(--gray);
  border-radius: 50%;
  flex-shrink: 0;
  transition: border-color var(--transition), background var(--transition);
  position: relative;
}

.option-row.selected .option-row-radio {
  border-color: var(--orange);
  background: var(--orange);
}

.option-row.selected .option-row-radio::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 7px;
  height: 7px;
  background: white;
  border-radius: 50%;
}

/* ── Slider ──────────────────────────────────────────────── */
.slider-wrap {
  padding: 12px 0 8px;
}

.slider-value-display {
  text-align: center;
  margin-bottom: 16px;
}

.slider-value-display span:first-child,
.slider-value-display #sliderVal {
  font-size: 2.8rem;
  font-weight: 700;
  color: var(--orange);
  line-height: 1;
}

.slider-approx {
  font-size: 1.6rem !important;
  font-weight: 400 !important;
  color: var(--text-muted) !important;
  margin-right: 2px;
  vertical-align: middle;
}

.slider-category {
  text-align: center;
  font-size: 0.82rem;
  font-weight: 400;
  color: var(--orange);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-top: 2px;
  margin-bottom: 16px;
  min-height: 1.2em;
}

.slider-unit {
  font-size: 1.5rem !important;
  font-weight: 400 !important;
  color: var(--dark-2) !important;
  margin-left: 4px;
}

.slider-labels {
  display: flex;
  justify-content: space-between;
  margin-top: 10px;
  font-size: 0.8rem;
  color: var(--text-muted);
  font-weight: 400;
}

/* +/− controls row */
.slider-controls {
  display: flex;
  align-items: center;
  gap: 10px;
}

.slider-controls input[type="range"] {
  flex: 1;
}

.slider-btn {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 2px solid var(--orange);
  background: transparent;
  color: var(--orange);
  font-size: 1.4rem;
  font-weight: 400;
  cursor: pointer;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  line-height: 1;
  font-family: inherit;
  transition: background var(--transition), color var(--transition), transform var(--transition);
}

.slider-btn:hover:not(:disabled) {
  background: var(--orange);
  color: white;
}

.slider-btn:active:not(:disabled) {
  transform: scale(0.92);
}

.slider-btn:disabled {
  opacity: 0.25;
  cursor: not-allowed;
}

.slider-hint {
  margin-top: 20px;
  padding: 12px 16px;
  background: var(--orange-light);
  border-radius: var(--radius);
  font-size: 0.85rem;
  color: var(--orange-dark);
  font-weight: 400;
  display: flex;
  align-items: flex-start;
  gap: 8px;
  line-height: 1.5;
}

/* ── Sub-step (isolatie type) ────────────────────────────── */
.sub-step {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 2px dashed var(--gray-mid);
}

.sub-step-label {
  font-weight: 400;
  color: var(--dark-2);
  margin-bottom: 14px;
  font-size: 1rem;
}

/* ── Info box ────────────────────────────────────────────── */
.info-box {
  margin-top: 20px;
  padding: 14px 18px;
  background: #e8f4fd;
  border: 1px solid #b8d9f0;
  border-radius: var(--radius);
  font-size: 0.88rem;
  color: #1e5c8a;
  line-height: 1.5;
}

/* ── Contact form ────────────────────────────────────────── */
.contact-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.form-row-adres {
  grid-template-columns: 3fr 1fr;
}

.optional {
  color: var(--text-muted);
  font-weight: 400;
  font-size: 0.82rem;
}

.form-privacy {
  font-size: 0.78rem;
  color: var(--text-muted);
  line-height: 1.5;
  text-align: center;
  padding: 0 8px;
}

/* ── Veld validatie error ────────────────────────────────── */
.field-error {
  font-size: 0.78rem;
  color: #c0392b;
  font-weight: 400;
  margin-top: 5px;
  display: flex;
  align-items: center;
  gap: 4px;
}

input.input-error {
  border-color: #c0392b !important;
  box-shadow: 0 0 0 3px rgba(192, 57, 43, 0.12) !important;
}

/* ── Adres autocomplete dropdown ────────────────────────── */
.address-dropdown {
  position: absolute;
  top: calc(100% + 3px);
  left: 0;
  right: 0;
  background: var(--white);
  border: 2px solid var(--orange);
  border-radius: var(--radius);
  box-shadow: 0 8px 24px rgba(0,0,0,0.12);
  z-index: 200;
  max-height: 260px;
  overflow-y: auto;
}

.address-option {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 14px;
  cursor: pointer;
  font-size: 0.88rem;
  border-bottom: 1px solid var(--gray-mid);
  transition: background var(--transition);
}

.address-option:last-child {
  border-bottom: none;
}

.address-option:hover,
.address-option.active {
  background: var(--orange-light);
}

.address-option-pin {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  color: var(--orange);
}

.address-option-text {
  flex: 1;
  color: var(--dark);
  line-height: 1.3;
}

/* ── Prijsindicatie ──────────────────────────────────────── */
.prijs-indicatie {
  margin-top: 20px;
  border: 2px solid var(--orange);
  border-radius: var(--radius-lg);
  overflow: hidden;
  animation: fadeSlide 0.35s ease;
}

.prijs-indicatie-header {
  display: flex;
  align-items: center;
  gap: 7px;
  background: var(--orange);
  color: white;
  font-weight: 600;
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 9px 16px;
}

.prijs-indicatie-header svg {
  width: 15px;
  height: 15px;
  flex-shrink: 0;
}

.prijs-indicatie-range {
  text-align: center;
  font-size: 1.9rem;
  font-weight: 700;
  color: var(--dark);
  padding: 14px 16px 2px;
  line-height: 1;
}

.prijs-indicatie-btw {
  text-align: center;
  font-size: 0.75rem;
  font-weight: 400;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.4px;
  padding-bottom: 14px;
}

.prijs-indicatie-disclaimer {
  margin: 0;
  padding: 12px 16px;
  font-size: 0.76rem;
  color: var(--text-muted);
  line-height: 1.5;
  border-top: 1px solid var(--gray-mid);
  background: var(--gray-light);
}

.btn-wide {
  width: 100%;
  justify-content: center;
}

/* ── Spinner ─────────────────────────────────────────────── */
.spinner {
  width: 18px;
  height: 18px;
  border: 3px solid rgba(255,255,255,0.4);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  display: inline-block;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ── Thank you ───────────────────────────────────────────── */
.thank-you {
  text-align: center;
  padding: 8px 0;
}

.ty-icon {
  margin-bottom: 12px;
  color: var(--orange);
}

.ty-icon svg {
  width: 52px;
  height: 52px;
}

.thank-you h2 {
  font-size: 1.5rem;
  margin-bottom: 10px;
  color: var(--dark);
}

.ty-sub {
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.5;
  max-width: 400px;
  margin: 0 auto 18px;
}

.ty-summary {
  background: var(--gray-light);
  border-radius: var(--radius-lg);
  padding: 20px 24px;
  text-align: left;
  max-width: 400px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.ty-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 0.9rem;
}

.ty-row .ty-label {
  color: var(--text-muted);
  font-weight: 400;
}

.ty-row .ty-val {
  color: var(--dark);
  font-weight: 600;
  text-align: right;
}

/* ── Navigation ──────────────────────────────────────────── */
.calc-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 20px 20px;
  gap: 12px;
  border-top: 1px solid var(--gray-mid);
  margin-top: 4px;
}

.calc-nav.hidden {
  display: none;
}

#btnBack {
  min-width: 90px;
}

#btnNext {
  flex: 1;
  justify-content: center;
  max-width: 260px;
  margin-left: auto;
}

/* ── Responsive ──────────────────────────────────────────── */
@media (max-width: 480px) {
  .step {
    padding: 20px 14px 6px;
  }

  .step-question {
    font-size: 1.15rem;
  }

  .form-row {
    grid-template-columns: 1fr;
  }

  .calc-nav {
    padding: 10px 14px 16px;
  }
}

@media (max-width: 360px) {
  .option-row {
    padding: 12px 12px;
    gap: 10px;
  }

  .slider-value-display span:first-child {
    font-size: 2.2rem;
  }
}
