@import url(header.css);
@import url(footer.css);
@import url(root.css);

* {
  box-sizing: border-box;
}

a {
  color: inherit;
  text-decoration: none;
}

body {
  margin: 0;
  background: var(--bg);
  font-family: Arial, Helvetica, sans-serif;
}

main {
  padding: 50px 16px 250px 16px;
  line-height: 1.5;
}

/* ========= Form Card (angepasst) ========= */
.card {
  max-width: 1180px;
  margin: 0 auto 48px;
  padding: 28px;
  background: #e8f3fb;
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow);
  margin-top: 200px;
  height: auto;
}

.card h2 {
  margin: 0 0 6px;
  font-size: clamp(20px, 2.6vw, 28px);
}

.card p.lead {
  margin: 0 0 16px;
  color: #1a2940cc;
}

/* Progress */
.progress {
  margin: 16px 0 20px;
}

.track {
  height: 8px;
  border-radius: 8px;
  background: #c9e3f6;
  overflow: hidden;
}

.bar {
  height: 100%;
  width: 14.285%;
  background: #0b84d6;
}

.bullets {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 8px;
  margin-top: 8px;
  font-size: 12px;
  color: #1a2940a8;
}

.bullets .on {
  color: #0b1320;
  font-weight: 700;
}

/* Panels */
.panel {
  display: none;
  background: #fff;
  border: 1px solid #d9e7f5;
  border-radius: var(--radius-lg);
  padding: 20px;
}

.panel h3 {
  margin: 0 0 6px;
  font-size: 18px;
}

.panel .hint {
  color: #1a2940a8;
  font-size: 13px;
}

/* Inputs & Chips */
.grid {
  display: grid;
  gap: 12px;
}

label.input {
  display: grid;
  gap: 6px;
}

label.input span {
  font-size: 14px;
  color: #1a2940b0;
}

input[type="text"],
input[type="email"],
input[type="tel"],
input[type="url"],
input[type="date"],
select,
textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid #cfe3f6;
  border-radius: 8px;
  background: #f8fbff;
  outline: none;
  transition: box-shadow 0.15s ease, border-color 0.15s ease;
}

input:focus,
select:focus,
textarea:focus {
  border-color: #0b84d6;
  box-shadow: 0 0 0 3px #0b84d63a;
}

textarea {
  min-height: 96px;
}

.required::after {
  content: " *";
  color: #e03131;
  font-weight: 700;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 12px 0 4px;
}

.chip {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: 8px;
  background: #eef6fd;
  border: 1px solid #cfe3f6;
  cursor: pointer;
  user-select: none;
}

.chip input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.chip .dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #9fc9eb;
}

.chip .dot-datenschutz {
  width: 40px;
  height: 10px;
  border-radius: 50%;
  background: #9fc9eb;
}

.chip input:checked + .dot {
  background: #0b84d6;
}

.chip input:checked + .dot-datenschutz {
  background: #0b84d6;
}

.controls {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 14px;
}

.btn {
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid #cfe3f6;
  background: #fff;
  font-weight: 700;
  cursor: pointer;
}

.btn-primary {
  background: #0b84d6;
  color: #fff;
  border-color: #0b84d6;
}

.btn-primary:hover {
  background: #0a78c2;
}

/* CSS-Stepper Radios */
.steps input[type="radio"] {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
}

#s1:checked ~ .progress .bar {
  width: 14.285%;
}

#s2:checked ~ .progress .bar {
  width: 28.57%;
}

#s3:checked ~ .progress .bar {
  width: 42.855%;
}

#s4:checked ~ .progress .bar {
  width: 57.14%;
}

#s5:checked ~ .progress .bar {
  width: 71.425%;
}

#s6:checked ~ .progress .bar {
  width: 85.71%;
}

#s7:checked ~ .progress .bar {
  width: 100%;
}

#s1:checked ~ .progress .bullets span:nth-child(1),
#s2:checked ~ .progress .bullets span:nth-child(-n + 2),
#s3:checked ~ .progress .bullets span:nth-child(-n + 3),
#s4:checked ~ .progress .bullets span:nth-child(-n + 4),
#s5:checked ~ .progress .bullets span:nth-child(-n + 5),
#s6:checked ~ .progress .bullets span:nth-child(-n + 6),
#s7:checked ~ .progress .bullets span:nth-child(-n + 7) {
  color: #0b1320;
  font-weight: 700;
}

#s1:checked ~ .panels #p1,
#s2:checked ~ .panels #p2,
#s3:checked ~ .panels #p3,
#s4:checked ~ .panels #p4,
#s5:checked ~ .panels #p5,
#s6:checked ~ .panels #p6,
#s7:checked ~ .panels #p7 {
  display: block;
}

/* ========= Mobile (<= 680px) ========= */
@media (max-width: 980px) {
  /* Basis-Spacing mobil */
  main {
    padding: 0;
    line-height: 1.5;
    z-index: 1000;
  }

  /* Card kompakter */
  .card {
    margin: 74px 0 0 0;
    padding: 88px 14px;
    border-radius: 0px;
  }
  .card h2 {
    font-size: 20px;
  }
  .card p.lead {
    margin-bottom: 12px;
  }

  /* Fortschritt/Stepper */
  .progress {
    margin: 12px 0 16px;
  }
  .track {
    height: 6px;
  }
  .bullets {
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 6px;
    font-size: 11px;
  }

  /* Panel-Inhalte */
  .panel {
    padding: 14px;
    border-radius: 12px;
  }
  .panel h3 {
    font-size: 16px;
    margin-bottom: 4px;
  }
  .panel .hint {
    font-size: 12px;
  }

  /* Form-Grid → 1 Spalte */
  .grid,
  .cols-2 {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
  }

  /* Labels & Inputs */
  label.input span {
    font-size: 13px;
  }
  input[type="text"],
  input[type="email"],
  input[type="tel"],
  input[type="url"],
  input[type="date"],
  select,
  textarea {
    padding: 12px 14px;
    font-size: 16px; /* verhindert iOS-Zoom */
  }
  textarea {
    min-height: 88px;
  }

  /* Chips enger, besser tappbar */
  .chips {
    gap: 8px;
    margin: 10px 0 2px;
  }
  .chip {
    padding: 10px 12px;
    border-radius: 8px;
  }

  /* Navigations-Buttons untereinander, full width */
  .controls {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    margin-top: 12px;
  }
  .btn {
    width: 100%;
    padding: 12px 14px;
    font-size: 16px;
  }
  .btn-primary {
    font-weight: 800;
  }
}

/* ========= Mobile (<= 680px) ========= */
@media (max-width: 720px) {
  .bullets {
    display: grid;
    grid-template-columns: repeat(7, 0.1fr);
    gap: 3px;
    margin-top: 8px;
    font-size: 0.7rem;
  }

  .bullets .on {
    color: #0b1320;
    font-weight: 500;
  }
}
