/* Terrassenüberdachung – Step Wizard */

.wizard-launch {
  margin-top: 2rem;
  padding: clamp(2rem, 5vw, 3rem);
  border: 1px solid var(--line);
  background: linear-gradient(135deg, rgba(184, 149, 79, 0.08), transparent 55%), var(--bg-elevated);
  display: grid;
  gap: 1.25rem;
}

.wizard-launch__visual {
  min-height: 220px;
  border-radius: 0.75rem;
  background: center / cover no-repeat;
  border: 1px solid var(--line-light);
}

.wizard-launch h2 {
  margin: 0;
  color: var(--white);
  font-size: clamp(1.5rem, 3vw, 2rem);
}

.wizard-launch p {
  margin: 0;
  color: var(--muted);
  max-width: 38rem;
}

.wizard {
  position: fixed;
  inset: 0;
  z-index: 500;
  display: grid;
  place-items: center;
  padding: 1rem;
}

.wizard[hidden] { display: none !important; }

.wizard__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(4px);
}

.wizard__shell {
  position: relative;
  width: min(1080px, 100%);
  height: min(92vh, 900px);
  max-height: min(92vh, 900px);
  display: grid;
  grid-template-columns: 0.95fr 1.05fr;
  background: #f8f7f4;
  color: #2c2c2c;
  border-radius: 1rem;
  overflow: hidden;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.45);
}

.wizard__visual {
  position: relative;
  min-height: 100%;
  background: center / cover no-repeat;
}

.wizard__visual::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(20, 20, 20, 0.55), transparent 45%);
}

.wizard__visual-copy {
  position: absolute;
  left: 1.5rem;
  right: 1.5rem;
  bottom: 1.5rem;
  z-index: 1;
  color: #fff;
}

.wizard__visual-copy strong {
  display: block;
  font-size: 1.35rem;
  margin-bottom: 0.35rem;
}

.wizard__visual-copy span {
  font-size: 0.95rem;
  opacity: 0.92;
}

.wizard__main {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 0;
  overflow: hidden;
  background: #fff;
}

.wizard__header {
  flex-shrink: 0;
  padding: 1.25rem 1.5rem 0.75rem;
  border-bottom: 1px solid #ece8e0;
}

.wizard__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.85rem;
}

.wizard__top h2 {
  margin: 0;
  font-size: 1.15rem;
  color: #2c2c2c;
}

.wizard__close {
  width: 40px;
  height: 40px;
  border: 1px solid #e4e0d8;
  border-radius: 999px;
  background: #fff;
  color: #5e5e5e;
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
}

.wizard__progress {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 0.35rem;
}

.wizard__progress span {
  height: 4px;
  border-radius: 999px;
  background: #ece8e0;
  transition: background 0.25s;
}

.wizard__progress span.is-active,
.wizard__progress span.is-done {
  background: #b8954f;
}

.wizard__body {
  flex: 1 1 auto;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  padding: 1.5rem;
}

.wizard-step[hidden] { display: none !important; }

.wizard-step h3 {
  margin: 0 0 0.35rem;
  font-size: 1.45rem;
  color: #2c2c2c;
}

.wizard-step__lead {
  margin: 0 0 1.5rem;
  color: #5e5e5e;
  line-height: 1.6;
}

.wizard-fields {
  display: grid;
  gap: 1rem;
}

.wizard-fields--2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.wizard-fields--3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.wizard-field label,
.wizard-field legend {
  display: block;
  margin-bottom: 0.45rem;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #5e5e5e;
}

.wizard-field input[type="text"],
.wizard-field input[type="email"],
.wizard-field input[type="tel"],
.wizard-field input[type="number"],
.wizard-field textarea,
.wizard-field select {
  width: 100%;
  padding: 0.95rem 1rem;
  font: inherit;
  font-size: 1.05rem;
  color: #2c2c2c;
  background: #f8f7f4;
  border: 1px solid #e4e0d8;
  border-radius: 0.65rem;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.wizard-field input:focus,
.wizard-field textarea:focus,
.wizard-field select:focus {
  outline: none;
  border-color: #b8954f;
  box-shadow: 0 0 0 3px rgba(184, 149, 79, 0.15);
}

.wizard-field textarea {
  min-height: 7rem;
  resize: vertical;
}

.wizard-options {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin: 0;
  padding: 0;
  border: 0;
}

.wizard-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.7rem 0.95rem;
  border: 1px solid #e4e0d8;
  border-radius: 999px;
  background: #f8f7f4;
  font-size: 0.95rem;
  color: #2c2c2c;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s, color 0.2s;
}

.wizard-chip:has(input:checked) {
  border-color: #b8954f;
  background: rgba(184, 149, 79, 0.12);
  color: #8a6b2d;
}

.wizard-chip input { accent-color: #b8954f; }

.wizard-summary {
  display: grid;
  gap: 0.75rem;
  padding: 1rem;
  background: #f8f7f4;
  border: 1px solid #e4e0d8;
  border-radius: 0.75rem;
  font-size: 0.95rem;
  color: #5e5e5e;
  max-height: 220px;
  overflow: auto;
}

.wizard-summary strong { color: #2c2c2c; }

.wizard-privacy {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  margin-top: 1rem;
  font-size: 0.9rem;
  color: #5e5e5e;
}

.wizard-privacy a { color: #8a6b2d; }

.wizard__footer {
  flex-shrink: 0;
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 1rem 1.5rem calc(1.25rem + env(safe-area-inset-bottom, 0px));
  border-top: 1px solid #ece8e0;
  background: #fff;
}

.wizard__footer .btn {
  min-width: 120px;
  padding: 0.85rem 1.25rem;
  font-size: 0.95rem;
}

.wizard__footer .btn-ghost {
  background: transparent;
  border: 1px solid #e4e0d8;
  color: #5e5e5e;
}

.wizard__footer .btn-solid {
  background: #2c2c2c;
  border: 1px solid #2c2c2c;
  color: #fff;
}

.wizard__footer .btn-solid:hover {
  background: #b8954f;
  border-color: #b8954f;
}

.wizard__status {
  margin: 0.75rem 0 0;
  font-size: 0.9rem;
}

.wizard__status.is-error { color: #b42318; }
.wizard__status.is-success { color: #1f7a45; }

.wizard-success {
  text-align: center;
  padding: 2rem 1rem;
}

.wizard-success h3 {
  margin: 0 0 0.75rem;
  font-size: 1.6rem;
}

.wizard-success p {
  margin: 0;
  color: #5e5e5e;
}

@media (max-width: 860px) {
  .wizard__shell {
    grid-template-columns: 1fr;
    grid-template-rows: auto minmax(0, 1fr);
    height: min(94vh, 900px);
    max-height: min(94vh, 900px);
  }

  .wizard__main {
    min-height: 0;
    overflow: hidden;
  }

  .wizard__visual {
    min-height: 140px;
    max-height: 140px;
  }

  .wizard-fields--2,
  .wizard-fields--3 {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 520px) {
  .wizard { padding: 0; }

  .wizard__shell {
    width: 100%;
    height: 100dvh;
    max-height: 100dvh;
    border-radius: 0;
    grid-template-rows: auto minmax(0, 1fr);
  }

  .wizard__main {
    min-height: 0;
  }

  .wizard__visual {
    min-height: 120px;
    max-height: 120px;
  }

  .wizard__body { padding: 1rem; }
}
