/* ==========================================================================
   Formulare, Anfrage-Assistent, Dialog, Kontaktseite, Lightbox
   ========================================================================== */

.input {
  width: 100%;
  min-height: 50px;
  padding: 12px 16px;
  border: 1.5px solid var(--line-strong);
  border-radius: 14px;
  background: #fff;
  color: var(--navy-950);
  font-size: 16px;
  transition:
    border-color 0.2s,
    box-shadow 0.2s;
  -webkit-appearance: none;
  appearance: none;
}

textarea.input {
  min-height: 110px;
  resize: vertical;
  line-height: 1.5;
}

.input::placeholder {
  color: #93a3af;
}

.input:hover {
  border-color: var(--navy-200);
}

.input:focus {
  outline: none;
  border-color: var(--navy-600);
  box-shadow: 0 0 0 4px rgba(58, 109, 147, 0.14);
}

.input.is-invalid {
  border-color: var(--red);
  box-shadow: 0 0 0 4px rgba(201, 60, 60, 0.1);
}

.field {
  display: grid;
  gap: 8px;
  margin: 0 0 18px;
  min-width: 0;
}

.field__label {
  font-size: 14px;
  font-weight: 700;
  color: var(--navy-800);
}

.req {
  color: var(--red);
}

.field-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 16px;
}

.field-row--zip {
  grid-template-columns: 110px minmax(0, 1fr);
}

.field-error,
.form-error {
  margin: -6px 0 16px;
  font-size: 14px;
  font-weight: 600;
  color: var(--red);
}

.form-error--banner {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 18px;
  padding: 14px 18px;
  border-radius: 14px;
  background: #fdeeee;
}

.zip-hint {
  margin: -8px 0 16px;
  font-size: 14px;
  font-weight: 600;
}

.zip-hint.is-ok,
.zip-check__result.is-ok {
  color: var(--green);
}

.zip-hint.is-warn,
.zip-check__result.is-warn {
  color: var(--yellow-700);
}

.hp-field {
  position: absolute !important;
  left: -9999px !important;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* Pillen (Radio / Checkbox) */
.pill-group {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.pill {
  position: relative;
}

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

.pill span {
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  padding: 8px 16px;
  border: 1.5px solid var(--line-strong);
  border-radius: var(--pill);
  background: #fff;
  font-size: 14.5px;
  font-weight: 600;
  color: var(--navy-700);
  cursor: pointer;
  user-select: none;
  transition:
    background-color 0.2s,
    color 0.2s,
    border-color 0.2s,
    transform 0.2s var(--ease);
}

.pill span:hover {
  border-color: var(--navy-500);
}

.pill input:checked + span {
  border-color: var(--navy-800);
  background: var(--navy-800);
  color: #fff;
}

.pill input:focus-visible + span {
  outline: 3px solid var(--yellow);
  outline-offset: 2px;
}

.pill input:active + span {
  transform: scale(0.96);
}

/* Auswahlkarten */
.choice-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 10px;
  margin-bottom: 20px;
}

.choice-card {
  position: relative;
}

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

.choice-card__box {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
  height: 100%;
  min-height: 104px;
  padding: 16px;
  border: 1.5px solid var(--line-strong);
  border-radius: 18px;
  background: #fff;
  cursor: pointer;
  user-select: none;
  transition:
    border-color 0.2s,
    background-color 0.2s,
    box-shadow 0.2s,
    transform 0.2s var(--ease);
}

.choice-card__box:hover {
  border-color: var(--navy-500);
  transform: translateY(-2px);
}

.choice-card__icon {
  width: 30px;
  height: 30px;
  padding: 6px;
  border-radius: 10px;
  background: var(--navy-50);
  color: var(--navy-800);
  box-sizing: content-box;
}

.choice-card__label {
  font-size: 14.5px;
  font-weight: 700;
  line-height: 1.3;
  color: var(--navy-900);
}

.choice-card__check {
  position: absolute;
  top: 12px;
  right: 12px;
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border: 1.5px solid var(--line-strong);
  border-radius: 50%;
  color: transparent;
  transition: all 0.2s;
}

.choice-card__check .icon {
  width: 14px;
  height: 14px;
}

.choice-card input:checked + .choice-card__box {
  border-color: var(--navy-800);
  background: var(--navy-50);
  box-shadow: 0 0 0 3px rgba(17, 50, 70, 0.08);
}

.choice-card input:checked + .choice-card__box .choice-card__icon {
  background: var(--yellow);
}

.choice-card input:checked + .choice-card__box .choice-card__check {
  border-color: var(--navy-800);
  background: var(--navy-800);
  color: #fff;
}

.choice-card input:focus-visible + .choice-card__box {
  outline: 3px solid var(--yellow);
  outline-offset: 2px;
}

/* Checkbox */
.check {
  display: grid;
  grid-template-columns: 24px 1fr;
  gap: 12px;
  align-items: start;
  margin: 0 0 14px;
  font-size: 14.5px;
  line-height: 1.5;
  color: var(--text);
  cursor: pointer;
}

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

.check__box {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  margin-top: 1px;
  border: 1.5px solid var(--line-strong);
  border-radius: 7px;
  background: #fff;
  color: transparent;
  transition: all 0.2s;
}

.check__box .icon {
  width: 15px;
  height: 15px;
}

.check input:checked + .check__box {
  border-color: var(--navy-800);
  background: var(--navy-800);
  color: #fff;
}

.check input:focus-visible + .check__box {
  outline: 3px solid var(--yellow);
  outline-offset: 2px;
}

.check.is-invalid .check__box {
  border-color: var(--red);
}

.check a {
  color: var(--navy-600);
}

/* ───────── Anfrage-Assistent ───────── */

.wizard {
  position: relative;
  padding: clamp(24px, 4vw, 40px);
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  background: #fff;
  box-shadow: var(--shadow-md);
}

.wizard__head {
  margin-bottom: 26px;
}

.wizard__head .kicker {
  margin-bottom: 10px;
}

.wizard__title {
  font-family: var(--font-serif);
  font-size: clamp(26px, 2.6vw, 34px);
}

.wizard__progress {
  display: none;
  margin: 22px 0 0;
  padding: 0;
  list-style: none;
  counter-reset: none;
}

.js .wizard__progress {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.wizard__progress li {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  padding-top: 12px;
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
}

.wizard__progress li::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  border-radius: 4px;
  background: var(--line);
  transition: background-color 0.4s var(--ease);
}

.wizard__progress li span {
  display: inline-grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--line);
  font-size: 11.5px;
  font-weight: 700;
  color: var(--navy-700);
  transition: all 0.3s;
}

.wizard__progress li.is-current,
.wizard__progress li.is-done {
  color: var(--navy-900);
}

.wizard__progress li.is-current::before,
.wizard__progress li.is-done::before {
  background: var(--yellow);
}

.wizard__progress li.is-current span,
.wizard__progress li.is-done span {
  background: var(--navy-800);
  color: #fff;
}

.wizard__step {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.js .wizard__step:not(.is-current) {
  display: none;
}

.js .wizard__step.is-current {
  animation: step-in 0.45s var(--ease);
}

@keyframes step-in {
  from {
    opacity: 0;
    transform: translateX(16px);
  }
}

.wizard:not(.is-enhanced) .wizard__step + .wizard__step {
  margin-top: 28px;
  padding-top: 28px;
  border-top: 1px solid var(--line);
}

.wizard__legend {
  display: block;
  margin-bottom: 16px;
  padding: 0;
  font-size: 18px;
  font-weight: 700;
  color: var(--navy-900);
}

.wizard__optional {
  font-size: 14px;
  font-weight: 500;
  color: var(--muted);
}

.wizard__nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 24px;
}

.wizard:not(.is-enhanced) [data-next],
.wizard:not(.is-enhanced) [data-prev] {
  display: none;
}

.wizard__note {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 18px 0 0;
  font-size: 13px;
  color: var(--muted);
}

.wizard__note .icon {
  width: 15px;
  height: 15px;
}

.wizard__success {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 24px 8px;
  text-align: center;
  animation: step-in 0.5s var(--ease);
}

.wizard__success h2,
.wizard__success h3 {
  margin: 0 0 12px;
  font-family: var(--font-serif);
  font-size: clamp(26px, 3vw, 34px);
}

.wizard__success p {
  max-width: 42ch;
  color: var(--muted);
}

.wizard__success-icon {
  display: grid;
  place-items: center;
  width: 84px;
  height: 84px;
  margin-bottom: 22px;
  border-radius: 50%;
  background: var(--yellow);
  color: var(--navy-950);
  box-shadow: 0 0 0 10px var(--yellow-100);
  animation: pop 0.6s var(--ease);
}

.wizard__success-icon .icon {
  width: 40px;
  height: 40px;
}

.wizard__success-script {
  margin: 4px 0 24px;
  font-size: 30px;
  color: var(--navy-800) !important;
}

@keyframes pop {
  0% {
    transform: scale(0.4);
    opacity: 0;
  }
  70% {
    transform: scale(1.08);
  }
}

@media (max-width: 600px) {
  .field-row {
    grid-template-columns: 1fr;
  }

  .field-row--zip {
    grid-template-columns: 100px minmax(0, 1fr);
    gap: 0 12px;
  }

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

  .wizard__progress li {
    font-size: 11.5px;
  }

  .wizard__nav .btn {
    flex: 1;
  }
}

/* ───────── Dialog ───────── */

.inquiry-dialog {
  width: min(760px, calc(100% - 24px));
  max-height: calc(100dvh - 24px);
  margin: auto;
  padding: 0;
  border: 0;
  border-radius: var(--radius-xl);
  background: transparent;
  overflow: visible;
}

.inquiry-dialog::backdrop {
  background: rgba(4, 30, 49, 0.55);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}

.inquiry-dialog[open] {
  animation: dialog-in 0.45s var(--ease);
}

@keyframes dialog-in {
  from {
    opacity: 0;
    transform: translateY(24px) scale(0.98);
  }
}

.inquiry-dialog__panel {
  position: relative;
  max-height: calc(100dvh - 24px);
  overflow-y: auto;
  border-radius: var(--radius-xl);
  overscroll-behavior: contain;
}

.inquiry-dialog .wizard {
  border: 0;
  box-shadow: none;
}

.inquiry-dialog__close {
  position: sticky;
  z-index: 2;
  top: 14px;
  float: right;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  margin: 14px 14px -58px 0;
  border: 0;
  border-radius: 50%;
  background: var(--navy-50);
  color: var(--navy-900);
  cursor: pointer;
  transition:
    background-color 0.2s,
    transform 0.3s var(--ease);
}

.inquiry-dialog__close:hover {
  background: var(--navy-100);
  transform: rotate(90deg);
}

body.dialog-open {
  overflow: hidden;
}

@media (max-width: 600px) {
  .inquiry-dialog {
    width: 100%;
    max-height: 100dvh;
    margin: auto 0 0;
    border-radius: var(--radius-xl) var(--radius-xl) 0 0;
  }

  .inquiry-dialog__panel {
    max-height: 94dvh;
    border-radius: var(--radius-xl) var(--radius-xl) 0 0;
  }

  .inquiry-dialog[open] {
    animation: sheet-in 0.45s var(--ease);
  }

  @keyframes sheet-in {
    from {
      transform: translateY(100%);
    }
  }
}

/* ───────── Kontaktseite ───────── */

.contact {
  padding-top: clamp(24px, 3vw, 40px);
}

.contact__grid {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  align-items: start;
  gap: clamp(24px, 4vw, 48px);
}

.contact__aside {
  display: grid;
  gap: 18px;
}

.contact-cards {
  display: grid;
  gap: 12px;
}

.contact-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  text-decoration: none;
  transition:
    transform 0.3s var(--ease),
    box-shadow 0.3s var(--ease),
    border-color 0.3s;
}

.contact-card:hover {
  border-color: transparent;
  box-shadow: var(--shadow-md);
  transform: translateY(-3px);
}

.contact-card__icon {
  display: grid;
  place-items: center;
  flex: none;
  width: 52px;
  height: 52px;
  border-radius: 16px;
  background: var(--navy-800);
  color: #fff;
}

.contact-card--whatsapp .contact-card__icon {
  background: #25d366;
}

.contact-card__icon .icon {
  width: 24px;
  height: 24px;
}

.contact-card__body {
  display: grid;
  min-width: 0;
}

.contact-card__label {
  font-size: 13px;
  color: var(--muted);
}

.contact-card__body strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--navy-900);
}

.contact-card__arrow {
  width: 20px;
  height: 20px;
  margin-left: auto;
  color: var(--navy-500);
  transition: transform 0.3s var(--ease);
}

.contact-card:hover .contact-card__arrow {
  transform: translateX(4px);
}

.panel {
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--bg-soft);
}

.panel__title {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
  font-family: var(--font-sans);
  font-size: 16px;
  font-weight: 700;
}

.panel__title .icon {
  width: 20px;
  height: 20px;
  color: var(--navy-600);
}

.hours--panel div {
  padding-bottom: 8px;
  border-bottom: 1px dashed var(--line-strong);
}

.hours--panel div:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.hours--panel dd {
  color: var(--navy-900);
}

.panel--area p {
  font-size: 15px;
}

.town-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 12px 0 20px;
  padding: 0;
  list-style: none;
}

.town-chips li {
  padding: 5px 12px;
  border-radius: var(--pill);
  background: #fff;
  border: 1px solid var(--line);
  font-size: 13px;
  font-weight: 600;
  color: var(--navy-700);
}

.zip-check__label {
  display: block;
  margin-bottom: 8px;
  font-size: 14px;
  font-weight: 700;
  color: var(--navy-800);
}

.zip-check__row {
  display: flex;
  gap: 8px;
}

.zip-check__row .input {
  min-height: 46px;
}

.zip-check__result {
  min-height: 1.5em;
  margin: 10px 0 0;
  font-size: 14px;
  font-weight: 600;
}

@media (max-width: 960px) {
  .contact__grid {
    grid-template-columns: 1fr;
  }

  .contact__form {
    order: -1;
  }
}

/* ───────── Lightbox ───────── */

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  grid-template-rows: 1fr auto;
  place-items: center;
  padding: 64px 72px 24px;
  background: rgba(4, 22, 36, 0.94);
  opacity: 0;
  visibility: hidden;
  transition:
    opacity 0.3s,
    visibility 0s linear 0.3s;
}

.lightbox.is-open {
  opacity: 1;
  visibility: visible;
  transition-delay: 0s;
}

.lightbox__img {
  max-width: 100%;
  max-height: calc(100dvh - 150px);
  border-radius: var(--radius);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.5);
  object-fit: contain;
  animation: pop 0.45s var(--ease);
}

.lightbox__caption {
  margin: 18px 0 0;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.85);
  text-align: center;
}

.lightbox__btn {
  position: absolute;
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  cursor: pointer;
  transition: background-color 0.2s;
}

.lightbox__btn:hover {
  background: rgba(255, 255, 255, 0.2);
}

.lightbox__btn .icon {
  width: 24px;
  height: 24px;
}

.lightbox__close {
  top: 16px;
  right: 16px;
}

.lightbox__prev {
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
}

.lightbox__next {
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
}

.lightbox__count {
  position: absolute;
  top: 28px;
  left: 24px;
  font-size: 14px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.7);
}

@media (max-width: 600px) {
  .lightbox {
    padding: 64px 12px 90px;
  }

  .lightbox__prev,
  .lightbox__next {
    top: auto;
    bottom: 20px;
    transform: none;
  }

  .lightbox__prev {
    left: calc(50% - 64px);
  }

  .lightbox__next {
    right: calc(50% - 64px);
  }
}

/* ───────── Anfrage für Unternehmen ───────── */

.input-unit {
  position: relative;
  display: block;
}

.input-unit .input {
  padding-right: 54px;
}

.input-unit > span {
  position: absolute;
  top: 50%;
  right: 18px;
  font-weight: 600;
  color: var(--muted);
  transform: translateY(-50%);
  pointer-events: none;
}

.choice-grid--objects {
  grid-template-columns: repeat(auto-fill, minmax(132px, 1fr));
}

.choice-grid--objects .choice-card__box {
  min-height: 92px;
  padding: 14px;
}

/* Umschalter „Für Zuhause / Für Unternehmen“ über dem Formular (Kontaktseite) */
.form-switch {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
  margin-bottom: 16px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: var(--pill);
  background: #fff;
  box-shadow: var(--shadow-xs);
}

.form-switch__item {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  padding: 8px 14px;
  border-radius: var(--pill);
  font-size: 15px;
  font-weight: 700;
  color: var(--navy-700);
  text-decoration: none;
  transition:
    background-color 0.2s,
    color 0.2s;
}

.form-switch__item:hover {
  background: var(--navy-50);
}

.form-switch__item.is-active {
  background: var(--navy-800);
  color: #fff;
}

.form-switch__item .icon {
  width: 18px;
  height: 18px;
}

@media (max-width: 420px) {
  .form-switch__item {
    font-size: 14px;
  }
}
