/*
 * Lead-Funnel – mehrstufiges Anfrageformular (1:1-Nachbau des früheren FunnelForms-Embeds).
 * Farben kommen aus public/js/lead-funnel-config.js und werden als CSS-Variablen gesetzt.
 * Alle Regeln sind auf .lf-embed begrenzt, damit sich Webflow-CSS und Funnel nicht beeinflussen.
 */

/* Inter (nur Stärke 400 – genau wie im Original geladen). Eigener Name, damit andere Seitenbereiche,
   die "Inter" anfordern (z. B. der Abschnitt „So einfach geht's“), wie bisher die Ersatzschrift nutzen. */
@font-face {
  font-family: 'Lead Funnel Inter';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(/fonts/inter-latin-ext-400.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Lead Funnel Inter';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(/fonts/inter-latin-400.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* Rahmen: verhält sich im Seitenfluss wie das frühere iframe (inline, 100vw breit) */
.lf-embed {
  display: inline-block;
  vertical-align: baseline;
  width: 100vw;
  height: 500px;
  border-radius: 8px;
  overflow: hidden;
  background: transparent;
  color: rgb(2, 8, 23);
  font-family: ui-sans-serif, system-ui, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol', 'Noto Color Emoji';
  font-size: 16px;
  font-weight: 400;
  font-style: normal;
  line-height: 1.5;
  letter-spacing: normal;
  text-align: left;
  text-transform: none;
  text-indent: 0;
  word-spacing: normal;
  -webkit-text-size-adjust: 100%;
  tab-size: 4;
  will-change: transform;
}

/* Basis-Reset innerhalb des Funnels */
.lf-embed *,
.lf-embed *::before,
.lf-embed *::after {
  box-sizing: border-box;
  border: 0 solid rgb(226, 232, 240);
  margin: 0;
  padding: 0;
}
.lf-embed h1,
.lf-embed h2,
.lf-embed h3,
.lf-embed p,
.lf-embed ul,
.lf-embed li,
.lf-embed label,
.lf-embed form {
  font-family: inherit;
  font-style: inherit;
  font-size: inherit;
  font-weight: inherit;
  line-height: inherit;
  letter-spacing: inherit;
  color: inherit;
  text-transform: none;
  max-width: none;
}
.lf-embed ul {
  list-style: none;
}
.lf-embed label {
  display: inline;
  cursor: default;
}
.lf-embed button,
.lf-embed input {
  font-family: inherit;
  font-size: 100%;
  font-weight: inherit;
  line-height: inherit;
  letter-spacing: inherit;
  color: inherit;
  text-transform: none;
  background-color: transparent;
  background-image: none;
  border-radius: 0;
  box-shadow: none;
  outline: none;
}
.lf-embed button,
.lf-embed .lf-check,
.lf-embed .lf-range {
  -webkit-appearance: none;
  appearance: none;
}
.lf-embed button {
  cursor: pointer;
}
.lf-embed img,
.lf-embed svg {
  display: block;
  vertical-align: middle;
}
.lf-embed img {
  max-width: 100%;
  height: auto;
}

/* Aufbau */
.lf-embed .lf-wrap {
  max-width: 1152px;
  margin: 0 auto;
  padding: 8px 16px;
  border-radius: 8px;
}
.lf-embed .lf-root {
  position: relative;
  background-color: #fff;
}
.lf-embed .lf-pad {
  position: relative;
  padding: 32px;
}
.lf-embed .lf-title {
  display: block;
  margin-bottom: 12px;
  text-align: center;
  font-family: 'Lead Funnel Inter', sans-serif;
  font-size: 24px;
  font-weight: 500;
  line-height: 1.3;
  color: var(--lf-heading);
}
.lf-embed .lf-desc {
  margin-bottom: 18px;
  text-align: center;
  font-family: 'Lead Funnel Inter', sans-serif;
  font-size: 16px;
  line-height: 1.5;
  color: var(--lf-description);
  white-space: pre-line;
}
.lf-embed .lf-fields {
  margin-top: 48px;
}
.lf-embed .lf-field {
  margin-bottom: 24px;
  font-family: 'Lead Funnel Inter', sans-serif;
}

/* Fehlerhinweis bei Auswahlschritten */
.lf-embed .lf-alert {
  max-width: 900px;
  margin: 0 auto 30px;
  padding: 16px;
  border-radius: 6px;
  background-color: rgb(254, 242, 242);
}
.lf-embed .lf-alert-row {
  display: flex;
}
.lf-embed .lf-alert-icon {
  flex-shrink: 0;
}
.lf-embed .lf-alert-icon svg {
  width: 20px;
  height: 20px;
  color: rgb(248, 113, 113);
}
.lf-embed .lf-alert-body {
  margin-left: 12px;
}
.lf-embed .lf-alert-title {
  display: block;
  font-size: 14px;
  font-weight: 500;
  line-height: 20px;
  color: rgb(153, 27, 27);
}
.lf-embed .lf-alert-list {
  margin-top: 8px;
  padding-left: 20px;
  list-style: disc;
  font-size: 14px;
  line-height: 20px;
  color: rgb(185, 28, 28);
}
.lf-embed .lf-alert-list li {
  display: list-item;
}
.lf-embed .lf-alert-list li + li {
  margin-top: 4px;
}

/* Antwort-Kacheln */
.lf-embed .lf-grid {
  display: grid;
  width: 100%;
  gap: 16px;
  grid-template-columns: repeat(var(--lf-cols, 4), minmax(0, 1fr));
}
.lf-embed .lf-card {
  position: relative;
  height: 144px;
  padding: 6px 16px;
  cursor: pointer;
  border: 1px solid rgb(229, 231, 235);
  border-radius: 8px;
  background-color: var(--lf-card-bg);
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}
.lf-embed .lf-card:hover {
  border-color: var(--lf-primary-50);
}
.lf-embed .lf-card.is-selected {
  border-color: var(--lf-primary);
  background-color: var(--lf-primary-10);
}
.lf-embed .lf-card--large {
  height: 192px;
  padding: 8px 20px;
}
.lf-embed .lf-card--image {
  height: 208px;
  padding: 0;
  overflow: hidden;
}
.lf-embed .lf-card-inner {
  display: flex;
  width: 100%;
  height: 100%;
  align-items: center;
  justify-content: center;
  text-align: center;
}
.lf-embed .lf-card--image .lf-card-inner {
  flex-direction: column;
}
.lf-embed .lf-card-content {
  display: flex;
  flex-direction: column;
  align-items: center;
}
.lf-embed .lf-card-icon-wrap {
  margin-bottom: 8px;
}
.lf-embed .lf-card-icon {
  width: 48px;
  height: 48px;
  margin: 0 auto 6px;
  overflow: visible;
}
.lf-embed .lf-card--large .lf-card-icon {
  width: 64px;
  height: 64px;
  margin-bottom: 8px;
}
.lf-embed .lf-card-icon svg {
  width: 100%;
  height: 100%;
  color: var(--lf-icon);
}
.lf-embed .lf-card-label {
  flex: 1 1 0%;
  text-align: center;
  font-size: 14px;
  font-weight: 500;
  color: var(--lf-text);
  white-space: pre-line;
}
.lf-embed .lf-card-media {
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 100%;
}
.lf-embed .lf-card-image {
  width: 100%;
  height: 100%;
  overflow: hidden;
  border-top-left-radius: 8px;
  border-top-right-radius: 8px;
}
.lf-embed .lf-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.lf-embed .lf-card--image .lf-card-label {
  padding: 16px;
}

/* Betrags-Schieberegler */
.lf-embed .lf-slider {
  max-width: 768px;
  margin: 32px auto 0;
}
.lf-embed .lf-slider-value {
  text-align: center;
}
.lf-embed .lf-slider-value span {
  font-size: 32px;
  font-weight: 600;
  line-height: 1.5;
  color: rgb(2, 8, 23);
}
.lf-embed .lf-slider-body {
  margin-top: 24px;
  padding-top: 32px;
}
.lf-embed .lf-slider-labels {
  display: flex;
  justify-content: space-between;
  margin-bottom: 4px;
  padding: 0 4px;
}
.lf-embed .lf-slider-labels span {
  font-size: 14px;
  line-height: 20px;
  color: rgb(107, 114, 128);
}
.lf-embed .lf-slider-track {
  margin-top: 8px;
}
.lf-embed .lf-range {
  display: block;
  width: 100%;
  height: 28px;
  margin: 0;
  background: transparent;
  cursor: pointer;
  touch-action: none;
}
.lf-embed .lf-range::-webkit-slider-runnable-track {
  height: 8px;
  border-radius: 9999px;
  background: linear-gradient(to right, var(--lf-primary) 0, var(--lf-primary) var(--lf-pct, 0%), rgb(241, 245, 249) var(--lf-pct, 0%), rgb(241, 245, 249) 100%);
}
.lf-embed .lf-range::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 20px;
  height: 20px;
  margin-top: -6px;
  border: 2px solid var(--lf-primary);
  border-radius: 9999px;
  background: #fff;
  transition: color 0.15s cubic-bezier(0.4, 0, 0.2, 1), background-color 0.15s cubic-bezier(0.4, 0, 0.2, 1), border-color 0.15s cubic-bezier(0.4, 0, 0.2, 1);
}
.lf-embed .lf-range::-moz-range-track {
  height: 8px;
  border-radius: 9999px;
  background: rgb(241, 245, 249);
}
.lf-embed .lf-range::-moz-range-progress {
  height: 8px;
  border-radius: 9999px;
  background: var(--lf-primary);
}
.lf-embed .lf-range::-moz-range-thumb {
  box-sizing: border-box;
  width: 20px;
  height: 20px;
  border: 2px solid var(--lf-primary);
  border-radius: 9999px;
  background: #fff;
}
.lf-embed .lf-slider-manual {
  margin-top: 8px;
  text-align: center;
}
.lf-embed .lf-slider-input {
  display: inline-block;
  height: 40px;
  max-width: 320px;
  padding: 8px 12px;
  border: 1px solid rgb(226, 232, 240);
  border-radius: 6px;
  background-color: #fff;
  color: rgb(2, 8, 23);
  font-size: 14px;
  line-height: 20px;
  text-align: center;
}
.lf-embed .lf-slider-input:focus-visible {
  border-color: var(--lf-primary);
  box-shadow: 0 0 0 1px var(--lf-primary);
}

/* Ladebildschirm */
.lf-embed .lf-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px 16px;
}
.lf-embed .lf-loading-inner {
  width: 100%;
  max-width: 448px;
}
.lf-embed .lf-loading-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
}
.lf-embed .lf-loading-barwrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
}
.lf-embed .lf-loading-bar {
  position: relative;
  width: 100%;
  height: 24px;
  overflow: hidden;
  border-radius: 9999px;
  background-color: rgb(244, 244, 245);
}
.lf-embed .lf-loading-fill {
  width: 100%;
  height: 100%;
  background-color: var(--lf-primary);
  transform: translateX(-100%);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.lf-embed .lf-loading-text {
  text-align: center;
  font-weight: 400;
  color: rgb(107, 114, 128);
}

/* Kontaktdaten */
.lf-embed .lf-contact {
  width: 100%;
  max-width: 500px;
  margin: 0 auto;
}
.lf-embed .lf-contact-alert {
  margin-bottom: 16px;
  padding: 12px;
  border: 1px solid rgb(254, 202, 202);
  border-radius: 6px;
  background-color: rgb(254, 242, 242);
}
.lf-embed .lf-contact-alert p {
  font-size: 14px;
  line-height: 20px;
  color: rgb(220, 38, 38);
}
.lf-embed .lf-contact-alert .lf-contact-alert-title {
  font-weight: 500;
}
.lf-embed .lf-row {
  margin-bottom: 16px;
}
.lf-embed .lf-label {
  display: block;
  margin-bottom: 4px;
  font-size: 16px;
  font-weight: 500;
  line-height: 24px;
  color: rgb(55, 65, 81);
}
.lf-embed .lf-req {
  color: rgb(239, 68, 68);
}
.lf-embed .lf-input {
  display: flex;
  width: 100%;
  height: 54px;
  padding: 8px 12px;
  border: 1px solid rgb(226, 232, 240);
  border-radius: 8px;
  background-color: #fff;
  box-shadow: rgba(0, 0, 0, 0.1) 0 4px 6px 0;
  color: rgb(2, 8, 23);
  font-size: 16px;
  line-height: 1.5;
}
.lf-embed .lf-input::placeholder {
  color: rgb(100, 116, 139);
  opacity: 1;
}
.lf-embed .lf-check-row {
  display: flex;
  align-items: flex-start;
  margin-bottom: 16px;
}
.lf-embed .lf-check {
  flex-shrink: 0;
  width: 16px;
  height: 16px;
  margin: 0;
  border: 1px solid var(--lf-primary);
  border-radius: 4px;
  cursor: pointer;
}
.lf-embed .lf-check:checked {
  background: var(--lf-primary) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E") center / 16px 16px no-repeat;
}
.lf-embed .lf-check:focus-visible {
  box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--lf-primary);
}
.lf-embed .lf-check-label {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: 8px;
  font-size: 16px;
  font-weight: 500;
  line-height: 1.25;
  color: rgb(55, 65, 81);
}
.lf-embed .lf-submit-row {
  display: flex;
  justify-content: center;
  margin-top: 24px;
}
.lf-embed .lf-submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 40px;
  padding: 8px 24px;
  border-radius: 8px;
  background-color: var(--lf-primary);
  box-shadow: rgba(0, 0, 0, 0.1) 0 4px 6px 0;
  color: #fff;
  font-size: 14px;
  font-weight: 500;
  line-height: 20px;
  white-space: nowrap;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}
.lf-embed .lf-submit:hover {
  opacity: 0.9;
}
.lf-embed .lf-submit:disabled {
  pointer-events: none;
  opacity: 0.5;
}
.lf-embed .lf-submit svg {
  flex-shrink: 0;
  width: 16px;
  height: 16px;
  margin-left: 8px;
  pointer-events: none;
}
.lf-embed .lf-hp {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* Danke-Seite */
.lf-embed .lf-thanks {
  width: 100%;
  max-width: 600px;
  margin: 0 auto;
  text-align: center;
}
.lf-embed .lf-thanks-icon {
  display: flex;
  justify-content: center;
  margin-bottom: 24px;
  animation: lf-bounce 1s infinite;
}
.lf-embed .lf-thanks-icon svg {
  width: 64px;
  height: 64px;
  color: var(--lf-primary);
}
.lf-embed .lf-thanks-title {
  margin-bottom: 16px;
  font-size: 24px;
  font-weight: 700;
  line-height: 32px;
  color: var(--lf-primary);
}
.lf-embed .lf-thanks-text {
  max-width: 65ch;
  margin: 0 auto 32px;
  color: rgb(55, 65, 81);
  line-height: 1.75;
}
.lf-embed .lf-thanks-text p {
  margin: 1.25em 0;
}

/* Fortschritt und Navigation */
.lf-embed .lf-footer {
  margin-top: 48px;
}
.lf-embed .lf-progress {
  margin-bottom: 32px;
}
.lf-embed .lf-bar {
  position: relative;
  width: 100%;
  height: 8px;
  overflow: hidden;
  border-radius: 9999px;
  background-color: var(--lf-progress-bg);
}
.lf-embed .lf-bar-fill {
  width: 100%;
  height: 100%;
  background-color: var(--lf-progress-fill);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.lf-embed .lf-progress-text {
  display: flex;
  justify-content: space-between;
  margin-top: 8px;
  font-size: 12px;
  line-height: 16px;
  color: var(--lf-progress-text);
}
.lf-embed .lf-num {
  display: inline-block;
  animation: lf-number-change 1s ease-in-out;
}
.lf-embed .lf-nav {
  display: flex;
  justify-content: flex-end;
  margin-top: 16px;
}
.lf-embed .lf-nav.is-between {
  justify-content: space-between;
}
.lf-embed .lf-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px 16px;
  border-radius: 8px;
  font-family: 'Lead Funnel Inter', sans-serif;
  font-size: 16px;
  line-height: 24px;
  transition: color 0.15s cubic-bezier(0.4, 0, 0.2, 1), background-color 0.15s cubic-bezier(0.4, 0, 0.2, 1), border-color 0.15s cubic-bezier(0.4, 0, 0.2, 1);
}
.lf-embed .lf-btn svg {
  width: 16px;
  height: 16px;
}
.lf-embed .lf-btn-next {
  background-color: var(--lf-next-bg);
  color: var(--lf-next-text);
}
.lf-embed .lf-btn-next svg {
  margin-left: 8px;
}
.lf-embed .lf-btn-back {
  border: 1px solid rgb(226, 232, 240);
  background-color: var(--lf-back-bg);
  color: var(--lf-back-text);
}
.lf-embed .lf-btn-back svg {
  margin-right: 8px;
}
.lf-embed .lf-hidden {
  display: none;
}

@keyframes lf-number-change {
  0%,
  100% {
    transform: scale(1);
    opacity: 1;
  }
  50% {
    transform: scale(1.5);
    opacity: 0.8;
  }
}
@keyframes lf-bounce {
  0%,
  100% {
    transform: translateY(-25%);
    animation-timing-function: cubic-bezier(0.8, 0, 1, 1);
  }
  50% {
    transform: none;
    animation-timing-function: cubic-bezier(0, 0, 0.2, 1);
  }
}

/* Breakpoints wie FunnelForms (768 / 640 / 540 / 480 px) */
@media (min-width: 768px) {
  .lf-embed .lf-thanks-title {
    font-size: 30px;
    line-height: 36px;
  }
}
@media (max-width: 639px) {
  .lf-embed .lf-submit {
    width: 100%;
  }
}
@media (max-width: 539px) {
  .lf-embed .lf-title {
    font-size: 20px;
  }
  .lf-embed .lf-desc {
    font-size: 14px;
  }
  .lf-embed .lf-grid {
    grid-template-columns: repeat(var(--lf-cols-mobile, 2), minmax(0, 1fr));
  }
  .lf-embed .lf-card-label {
    font-size: 12px;
  }
  .lf-embed .lf-input {
    font-size: 14px;
  }
}
@media (max-width: 479px) {
  .lf-embed .lf-pad {
    padding: 16px;
  }
}
