/* Eigenes Anruf-Formular – helles Overlay (GZ-Look) */

.anruf-form-overlay {
  position: fixed;
  inset: 0;
  z-index: 10050;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
  background: rgba(15, 23, 42, 0.42);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 220ms ease, visibility 220ms ease;
}

.anruf-form-overlay.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

body.is-anruf-form-open {
  overflow: hidden;
}

html.is-anruf-form-open {
  overflow: hidden;
}

.anruf-form-card {
  position: relative;
  width: min(1200px, 96vw);
  max-height: min(92vh, 900px);
  overflow-y: auto;
  padding: 28px 28px 24px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.55);
  box-shadow: 0 24px 64px rgba(15, 23, 42, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.65);
  -webkit-backdrop-filter: blur(22px);
  backdrop-filter: blur(22px);
  transform: translateY(8px) scale(0.98);
  opacity: 0;
  transition: transform 220ms cubic-bezier(0.4, 0, 0.2, 1), opacity 220ms ease;
  color: #111827;
  font-family: 'Satoshi', system-ui, -apple-system, sans-serif;
}

.anruf-form-overlay.is-open .anruf-form-card {
  transform: translateY(0) scale(1);
  opacity: 1;
}

.anruf-form-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 34px;
  height: 34px;
  border: none;
  border-radius: 10px;
  background: rgba(20, 60, 102, 0.06);
  color: #143C66;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background 160ms ease, color 160ms ease;
}

.anruf-form-close:hover {
  background: rgba(0, 119, 108, 0.12);
  color: #00776C;
}

.anruf-form-title {
  margin: 0 36px 6px 0;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #143C66;
  line-height: 1.25;
}

.anruf-form-sub {
  margin: 0 0 20px;
  font-size: 14px;
  line-height: 1.5;
  color: #5B6B7C;
}

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

.anruf-form-step--schedule,
.anruf-form-step.is-active {
  display: block;
}

.anruf-form-card.is-contact-step {
  width: min(720px, 96vw);
}

.anruf-form-back {
  position: absolute;
  top: 12px;
  left: 12px;
  width: 34px;
  height: 34px;
  border: none;
  border-radius: 10px;
  background: rgba(20, 60, 102, 0.06);
  color: #143C66;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background 160ms ease, color 160ms ease;
  z-index: 2;
}

.anruf-form-back svg {
  width: 18px;
  height: 18px;
  display: block;
}

.anruf-form-back:hover {
  background: rgba(0, 119, 108, 0.12);
  color: #00776C;
}

.anruf-form-card.is-contact-step .anruf-form-title {
  margin-left: 28px;
}

.anruf-form-booking {
  min-width: 0;
}

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

.anruf-form-row--anrede,
.anruf-form-row--anrede-stadt {
  grid-template-columns: minmax(140px, 1fr) minmax(140px, 1fr);
}

.anruf-avail {
  text-align: left;
}

.anruf-avail-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: 16px;
  margin-top: 10px;
  align-items: stretch;
}

.anruf-avail-cal {
  height: 100%;
  padding: 14px;
  border: 1px solid rgba(20, 60, 102, 0.14);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.8);
  box-sizing: border-box;
}

.anruf-avail-cal-nav {
  display: grid;
  grid-template-columns: 34px 1fr 34px;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}

.anruf-avail-nav {
  width: 34px;
  height: 34px;
  border: 1px solid rgba(20, 60, 102, 0.14);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.9);
  color: #143C66;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease, opacity 0.15s ease;
}

.anruf-avail-nav svg {
  width: 18px;
  height: 18px;
  display: block;
}

.anruf-avail-nav:hover:not(:disabled) {
  background: rgba(0, 119, 108, 0.08);
  border-color: rgba(0, 119, 108, 0.35);
  color: #00776C;
}

.anruf-avail-nav:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.anruf-avail-cal-title {
  text-align: center;
  font-size: 14px;
  font-weight: 700;
  color: #143C66;
  line-height: 1.2;
}

.anruf-avail-weekdays,
.anruf-avail-days {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 4px;
}

.anruf-avail-weekdays {
  margin-bottom: 6px;
}

.anruf-avail-weekdays span {
  text-align: center;
  font-size: 11px;
  font-weight: 600;
  color: #5B6B7C;
}

.anruf-avail-day {
  aspect-ratio: 1;
  min-height: 32px;
  border: none;
  border-radius: 10px;
  background: transparent;
  color: #143C66;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}

.anruf-avail-day.is-empty {
  visibility: hidden;
  pointer-events: none;
}

.anruf-avail-day.is-disabled {
  color: #9AA5B1;
  opacity: 0.45;
  cursor: not-allowed;
}

.anruf-avail-day:not(.is-disabled):hover {
  background: rgba(0, 119, 108, 0.1);
}

.anruf-avail-day.is-selected {
  background: #143C66;
  color: #fff;
}

.anruf-avail-slots {
  height: 100%;
  min-height: 0;
  overflow-y: auto;
  box-sizing: border-box;
  padding: 14px;
  border: 1px solid rgba(20, 60, 102, 0.14);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.8);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.anruf-avail-slot {
  width: 100%;
  flex: 0 0 auto;
  padding: 10px 12px;
  border: 1px solid rgba(20, 60, 102, 0.16);
  border-radius: 10px;
  background: #fff;
  color: #143C66;
  font-size: 13px;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease;
}

.anruf-avail-slot:hover {
  border-color: #00776C;
  background: rgba(0, 119, 108, 0.06);
}

.anruf-avail-slot.is-selected {
  border-color: #143C66;
  background: rgba(20, 60, 102, 0.08);
  box-shadow: inset 0 0 0 1px #143C66;
}

#anrufAvailError {
  margin-top: 10px;
  margin-bottom: 0;
}

@media (max-width: 900px) {
  .anruf-form-card {
    width: min(96vw, 100%);
  }
}

@media (max-width: 640px) {
  .anruf-form-row {
    grid-template-columns: 1fr 1fr;
    gap: 10px 12px;
  }

  .anruf-form-row--anrede,
  .anruf-form-row--anrede-stadt {
    grid-template-columns: 1fr 1fr;
  }

  .anruf-avail-grid {
    grid-template-columns: 1fr;
  }

  .anruf-avail-slots {
    height: auto;
    max-height: 220px;
  }

  .anruf-form-card,
  .anruf-form-card.is-contact-step {
    width: min(96vw, 100%);
  }

  .anruf-form-card.is-contact-step .anruf-form-title {
    margin-left: 0;
    padding-top: 28px;
  }
}

/* Mobile-only booking wizard + scroll lock (phone ≤767px) */
.anruf-avail-mobile-chrome {
  display: none;
}

@media (max-width: 767px) {
  html.is-anruf-form-open,
  body.is-anruf-form-open {
    overflow: hidden !important;
    overscroll-behavior: none;
    touch-action: none;
  }

  body.is-anruf-form-open .anruf-form-card,
  body.is-anruf-form-open .anruf-avail-slots {
    touch-action: pan-y;
  }

  .anruf-form-overlay {
    align-items: stretch;
    justify-content: stretch;
    padding: max(8px, env(safe-area-inset-top, 0px)) 8px max(8px, env(safe-area-inset-bottom, 0px));
  }

  /* GZ-Seite: Logo-Leiste oben freilassen; CTA wird bei offenen Pop-ups ausgeblendet */
  body:has(#gz-mobile-cta-bar) .anruf-form-overlay {
    padding: calc(3.5rem + env(safe-area-inset-top, 0px) + 10px) 8px max(8px, env(safe-area-inset-bottom, 0px) + 8px);
  }
  @media (max-width: 480px) {
    body:has(#gz-mobile-cta-bar) .anruf-form-overlay {
      padding-top: calc(3.25rem + env(safe-area-inset-top, 0px) + 10px);
    }
  }

  .anruf-form-card,
  .anruf-form-card.is-contact-step {
    width: 100%;
    max-width: none;
    max-height: none;
    height: 100%;
    border-radius: 18px;
    padding: 10px 14px 14px;
  }

  .anruf-form-close {
    top: 10px;
    right: 10px;
    width: 36px;
    height: 36px;
    z-index: 12;
  }

  .anruf-form-back {
    top: 10px;
    left: 10px;
    width: 36px;
    height: 36px;
  }

  .anruf-form-view,
  .anruf-form-step.is-active {
    min-height: 0;
  }

  .anruf-avail-mobile-chrome {
    display: none;
    margin: 0 0 14px;
    text-align: left;
    position: relative;
    padding-top: 40px;
  }

  .anruf-avail-mobile-back {
    position: absolute;
    top: 0;
    left: 0;
    width: 36px;
    height: 36px;
    border: none;
    border-radius: 10px;
    background: rgba(20, 60, 102, 0.06);
    color: #143C66;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
  }

  .anruf-avail-mobile-back svg {
    width: 18px;
    height: 18px;
    display: block;
  }

  .anruf-avail-mobile-title {
    margin: 0;
    font-size: clamp(1.05rem, 4.6vw, 1.25rem);
    font-weight: 700;
    line-height: 1.25;
    color: #143C66;
    padding-right: 40px;
  }

  .anruf-avail-mobile-sub {
    margin: 6px 0 0;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.4;
    color: #5B6B7C;
  }

  #anruf-form[data-mobile-booking-phase="date"] .anruf-form-title,
  #anruf-form[data-mobile-booking-phase="date"] .anruf-form-sub,
  #anruf-form[data-mobile-booking-phase="time"] .anruf-form-title,
  #anruf-form[data-mobile-booking-phase="time"] .anruf-form-sub {
    display: none;
  }

  #anruf-form[data-mobile-booking-phase="date"] .anruf-avail-mobile-chrome,
  #anruf-form[data-mobile-booking-phase="time"] .anruf-avail-mobile-chrome {
    display: block;
  }

  #anruf-form[data-mobile-booking-phase="date"] .anruf-avail-slots {
    display: none;
  }

  #anruf-form[data-mobile-booking-phase="date"] .anruf-avail-grid,
  #anruf-form[data-mobile-booking-phase="time"] .anruf-avail-grid {
    grid-template-columns: 1fr;
  }

  #anruf-form[data-mobile-booking-phase="time"] .anruf-avail-cal {
    display: none;
  }

  #anruf-form[data-mobile-booking-phase="time"] .anruf-avail-slots {
    height: auto;
    max-height: none;
    overflow: visible;
  }

  #anruf-form[data-mobile-booking-phase="date"] .anruf-avail-mobile-chrome {
    padding-top: 40px;
  }

  #anruf-form[data-mobile-booking-phase="time"] .anruf-avail-mobile-chrome {
    padding-top: 44px;
  }

  .anruf-form-card.is-contact-step .anruf-form-title {
    margin-left: 40px;
    padding-top: 4px;
  }

  .anruf-form-card.is-contact-step {
    padding-bottom: 18px;
  }

  #anruf-step-contact .anruf-form-submit {
    margin-top: 8px;
    margin-bottom: 6px;
  }

  #anruf-step-contact .anruf-form-field {
    margin-bottom: 10px;
  }
}

.anruf-form-field {
  margin-bottom: 14px;
}

.anruf-form-field--full {
  grid-column: 1 / -1;
}

.anruf-form-label {
  display: block;
  margin-bottom: 6px;
  font-size: 13px;
  font-weight: 600;
  color: #143C66;
}

.anruf-form-label.required::after {
  content: ' *';
  color: #c0392b;
}

.anruf-form-input,
.anruf-form-select,
.anruf-form-textarea {
  width: 100%;
  box-sizing: border-box;
  padding: 12px 14px;
  border-radius: 10px;
  border: 1.5px solid rgba(20, 60, 102, 0.14);
  background: #fff;
  color: #111827;
  font-family: inherit;
  font-size: 15px;
  line-height: 1.4;
  outline: none;
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

.anruf-form-input:focus,
.anruf-form-select:focus,
.anruf-form-textarea:focus {
  border-color: #00776C;
  box-shadow: 0 0 0 3px rgba(0, 119, 108, 0.12);
}

.anruf-form-select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23143C66' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 40px;
  cursor: pointer;
}

.anruf-form-textarea {
  min-height: 72px;
  resize: vertical;
}

.anruf-form-checkbox {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  margin: 4px 0 14px;
}

.anruf-form-checkbox input[type="checkbox"] {
  margin-top: 3px;
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  accent-color: #143C66;
  cursor: pointer;
}

.anruf-form-checkbox-body {
  flex: 1;
  min-width: 0;
}

.anruf-form-checkbox-row {
  display: flex;
  align-items: flex-start;
  gap: 8px;
}

.anruf-form-checkbox-row label {
  font-size: 13.5px;
  line-height: 1.45;
  color: #111827;
  cursor: pointer;
}

.anruf-form-checkbox-row a {
  color: #143C66;
  text-decoration: underline;
}

.anruf-form-consent-toggle {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  margin-top: 1px;
  padding: 0;
  border: none;
  border-radius: 6px;
  background: transparent;
  color: #5B6B7C;
  cursor: pointer;
  transition: color 160ms ease, background 160ms ease;
}

.anruf-form-consent-toggle:hover {
  color: #00776C;
  background: rgba(0, 119, 108, 0.1);
}

.anruf-form-consent-toggle svg {
  transition: transform 180ms ease;
}

.anruf-form-consent-toggle[aria-expanded="true"] svg {
  transform: rotate(180deg);
}

.anruf-form-consent-more {
  display: none;
  margin: 6px 0 0;
  font-size: 12.5px;
  line-height: 1.55;
  color: #5B6B7C;
}

.anruf-form-consent-more.is-open {
  display: block;
}

.anruf-form-hint {
  margin: 0 0 16px;
  font-size: 13px;
  line-height: 1.5;
  color: #c0392b;
  font-weight: 500;
}

.anruf-form-error {
  display: none;
  font-size: 13.5px;
  line-height: 1.5;
  color: #9b1c1c;
  background: rgba(192, 57, 43, 0.08);
  border: 1px solid rgba(192, 57, 43, 0.28);
  border-radius: 10px;
  padding: 10px 14px;
  margin: 0 0 14px;
}

.anruf-form-error.is-visible {
  display: block;
}

.anruf-form-submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 15px 28px;
  border: none;
  border-radius: 10px;
  background: #143C66;
  color: #fff;
  font-family: inherit;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(20, 60, 102, 0.18);
  transition: background 180ms ease, transform 180ms ease, box-shadow 180ms ease;
}

.anruf-form-submit:hover:not(:disabled) {
  background: #0F2F52;
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(20, 60, 102, 0.22);
}

.anruf-form-submit:disabled {
  opacity: 0.7;
  cursor: not-allowed;
  transform: none;
}

.anruf-form-success {
  display: none;
  text-align: center;
  padding: 12px 8px 4px;
}

.anruf-form-success.is-visible {
  display: block;
}

.anruf-form-view[hidden] {
  display: none !important;
}

.anruf-form-success__icon {
  width: 56px;
  height: 56px;
  margin: 0 auto 16px;
  border-radius: 50%;
  background: rgba(0, 119, 108, 0.1);
  color: #00776C;
  display: flex;
  align-items: center;
  justify-content: center;
}

.anruf-form-success__title {
  font-size: 20px;
  font-weight: 700;
  color: #143C66;
  margin: 0 0 10px;
}

.anruf-form-success__text {
  margin: 0;
  font-size: 14.5px;
  line-height: 1.55;
  color: #5B6B7C;
}
