/* Austria Energy Group – Anfragestrecken im Gesprächsformat.
   Aufbau, Maße, Schrift und Abläufe folgen Frage für Frage der Vorlage der
   Quell-Website (WPForms Conversational Forms, Farbschema „hell“): Titelseite
   über die volle Höhe, danach eine Frage nach der anderen mit Buchstaben-
   tasten für die Antworten und einer festen Fortschrittsleiste unten.

   Zwei bewusste Abweichungen von der Vorlage:
   – Knöpfe tragen das Markenblau statt des Vorlagenblaus.
   – Gedämpfte Texte sind so weit abgedunkelt, dass sie den Kontrast von
     4,5:1 erreichen; die Vorlage bleibt dort unter dem Mindestwert. */

/* ---------- Schrift der Vorlage, lokal ausgeliefert -------------------- */
@font-face {
  font-family: "Lato";
  src: url("/fonts/lato-300.woff2") format("woff2");
  font-weight: 300;
  font-style: normal;
  font-display: optional;
}

@font-face {
  font-family: "Lato";
  src: url("/fonts/lato-400.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: optional;
}

@font-face {
  font-family: "Lato";
  src: url("/fonts/lato-700.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: optional;
}

/* Metrisch angeglichener Ersatz – verhindert Versprünge im Ausnahmefall. */
@font-face {
  font-family: "Lato Fallback";
  src: local("Arial"), local("Helvetica Neue"), local("Liberation Sans");
  size-adjust: 97.7%;
  ascent-override: 101%;
  descent-override: 21.8%;
  line-gap-override: 0%;
}

/* ---------- Seitengerüst ---------------------------------------------- */
body.funnel-body {
  background-color: #ebebeb;
}

.cf-page {
  --cf-bg: #ebebeb;
  --cf-text: #333;
  --cf-muted: rgba(51, 51, 51, 0.72);
  --cf-line: rgba(51, 51, 51, 0.1);
  --cf-line-strong: rgba(51, 51, 51, 0.5);
  --cf-tint: rgba(51, 51, 51, 0.025);
  --cf-tint-hover: rgba(51, 51, 51, 0.05);
  --cf-error: #b23744;
  --cf-accent: var(--color-primary-600);
  --cf-accent-hover: var(--color-primary-700);
  --cf-accent-active: var(--color-primary-800);

  box-sizing: border-box;
  min-height: 100vh;
  font-family: "Lato", "Lato Fallback", system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.5;
  color: var(--cf-text);
  background-color: var(--cf-bg);
  background-image: radial-gradient(ellipse at center, #fff 0%, rgba(255, 255, 255, 0) 100%);
  background-attachment: fixed;
  counter-reset: cf-fields;
  word-break: break-word;
  hyphens: auto;
}

.cf-page *,
.cf-page *::before,
.cf-page *::after {
  box-sizing: inherit;
}

.cf-page [hidden] {
  display: none;
}

.cf-wrap {
  max-width: 880px;
  margin-inline: auto;
  padding: 0 40px;
}

@media (min-width: 501px) and (max-width: 768px) {
  .cf-wrap {
    padding: 0 60px;
  }
}

/* ---------- Titelseite mit Startknopf ---------------------------------- */
.cf-header {
  display: flex;
  flex-direction: column;
  justify-content: center;
  margin-bottom: 35px;
  padding: 40px 0;
  text-align: center;
}

.cf-page.is-start .cf-header {
  min-height: 100vh;
}

/* Wie in der Vorlage trägt die Titelseite nur Titel, Vorspann und Startknopf –
   Fragen und Seitenfuß erscheinen erst nach dem Start. */
.cf-page.is-start .cf-form,
.cf-page.is-start .cf-pagefoot {
  display: none;
}

/* Der Startknopf blendet sich auf der Titelseite ein und mit dem Start wieder
   aus. Ohne Schrittsteuerung bleibt er durchgehend sichtbar. */
.cf-page.is-enhanced .cf-header .cf-btn-row {
  opacity: 0;
  transition: opacity 0.5s ease-in-out;
}

.cf-page.is-enhanced.is-start.is-start-ready .cf-header .cf-btn-row {
  opacity: 1;
}

.cf-title {
  margin: 0 0 14px;
  font-size: 50px;
  font-weight: 300;
  line-height: 1.15;
  color: var(--cf-text);
}

.cf-description {
  margin: 0;
  font-size: 21px;
  font-weight: 400;
  white-space: pre-wrap;
}

.cf-description strong {
  font-weight: 700;
}

.cf-description a {
  color: var(--cf-text);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.cf-legal {
  margin: 0;
  font-size: 13px;
  color: var(--cf-muted);
}

.cf-legal a {
  color: var(--cf-muted);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.cf-legal a:hover {
  color: var(--cf-text);
}

@media (max-width: 500px) {
  .cf-title {
    font-size: 30px;
    line-height: 1.2;
  }

  .cf-description {
    font-size: 16px;
  }
}

/* ---------- Knöpfe ----------------------------------------------------- */
.cf-btn {
  display: inline-block;
  text-align: center;
  text-decoration: none;
  font-family: inherit;
  font-size: 19px;
  font-weight: 700;
  line-height: 1.3;
  padding: 12px 31px;
  border: 0;
  border-radius: 3px;
  background-color: var(--cf-accent);
  color: #fff;
  box-shadow: 0 3px 10px 0 rgba(0, 0, 0, 0.15);
  cursor: pointer;
  transition: background-color 0.15s ease, box-shadow 0.15s ease;
}

.cf-btn:hover {
  background-color: var(--cf-accent-hover);
  box-shadow: 0 2px 5px 0 rgba(0, 0, 0, 0.15);
}

.cf-btn:active {
  background-color: var(--cf-accent-active);
  box-shadow: none;
}

.cf-btn:focus-visible {
  outline: 3px solid var(--cf-text);
  outline-offset: 3px;
}

.cf-btn[disabled] {
  opacity: 0.5;
  box-shadow: none;
  cursor: default;
}

.cf-btn-row {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-top: 48px;
}

.cf-btn-desc {
  margin-inline-start: 30px;
  font-size: 18px;
  color: var(--cf-muted);
}

.cf-btn-desc strong {
  font-weight: 700;
}

@media (max-width: 500px) {
  .cf-btn-row {
    margin-top: 30px;
  }

  .cf-btn-desc {
    display: none;
  }
}

/* ---------- Fragen ------------------------------------------------------ */
.cf-form {
  margin: 0;
}

.cf-field {
  margin: 0 0 75px;
}

/* Wird nur vom Skript angesprungen – ohne sichtbaren Rahmen. */
.cf-field:focus {
  outline: none;
}

/* Wie in der Vorlage tritt nur die aktive Frage hervor; alle übrigen bleiben
   an ihrem Platz stehen und treten weit zurück. Nur die aktive Frage zeigt
   ihre Hinweiszeile. */
.cf-form.is-enhanced .cf-field {
  opacity: 0.2;
  transition: opacity 0.25s ease-in-out;
}

.cf-form.is-enhanced .cf-field.is-active {
  opacity: 1;
}

/* Wer weniger Transparenz oder mehr Kontrast eingestellt hat, sieht alle
   Fragen voll ausgeschrieben. */
@media (prefers-reduced-transparency: reduce), (prefers-contrast: more) {
  .cf-form.is-enhanced .cf-field {
    opacity: 1;
  }
}

.cf-form.is-enhanced .cf-field.is-active .cf-field-info {
  display: block;
}

.cf-field-info {
  display: none;
  margin: 12px 0 0;
  font-size: 16px;
  color: var(--cf-muted);
  text-align: left;
}

/* Auf Geräten ohne Maus blendet die Vorlage die Tastaturhinweise aus. */
@media (hover: none) and (pointer: coarse) {
  .cf-form.is-enhanced .cf-field.is-active .cf-field-info {
    display: none;
  }
}

.cf-field-info strong {
  font-weight: 700;
}

.cf-field fieldset {
  border: 0;
  margin: 0;
  padding: 0;
  min-width: 0;
}

.cf-field-label {
  position: relative;
  display: block;
  width: 100%;
  margin: 0 0 11px;
  padding: 0;
  font-size: 23px;
  font-weight: 400;
  line-height: 1.35;
  color: var(--cf-text);
  counter-increment: cf-fields;
}

.cf-field-label::before {
  content: counter(cf-fields) ".";
  position: absolute;
  left: -36px;
  font-weight: 300;
}

.cf-required {
  color: var(--cf-error);
}

@media (max-width: 500px) {
  .cf-field-label::before {
    position: static;
    margin-right: 5px;
  }
}

/* ---------- Antwortmöglichkeiten mit Buchstabentaste ------------------- */
.cf-choices {
  list-style: none;
  margin: 0;
  padding: 0;
  counter-reset: cf-choice;
}

.cf-choices li {
  display: block;
  margin: 0 0 15px;
}

.cf-choices li:last-child {
  margin-bottom: 0;
}

.cf-choices input {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.cf-choice {
  position: relative;
  display: block;
  min-height: 52px;
  padding: 9px 9px 9px 50px;
  border: 1px solid var(--cf-line);
  border-radius: 4px;
  background-color: var(--cf-tint);
  font-size: 18px;
  line-height: 33px;
  cursor: pointer;
}

.cf-choice::before {
  counter-increment: cf-choice;
  content: counter(cf-choice, upper-alpha);
  position: absolute;
  top: 9px;
  left: 10px;
  width: 33px;
  height: 33px;
  border: 1px solid var(--cf-line-strong);
  border-radius: 3px;
  line-height: 30px;
  text-align: center;
  background-color: transparent;
  color: var(--cf-text);
}

.cf-choices li.is-selected .cf-choice {
  border-color: var(--cf-line-strong);
}

.cf-choices li.is-selected .cf-choice::before {
  border-color: var(--cf-text);
  background-color: var(--cf-text);
  color: #fff;
}

.cf-choices input:focus-visible + .cf-choice {
  outline: 3px solid var(--cf-accent);
  outline-offset: 2px;
}

@media (min-width: 769px) {
  .cf-choices--2col {
    display: flex;
    flex-wrap: wrap;
  }

  .cf-choices--2col li {
    width: 50%;
    padding-right: 15px;
  }

  .cf-choices--2col li:nth-child(2n) {
    padding-right: 0;
  }

  .cf-choices li:not(.is-selected) .cf-choice:hover,
  .cf-choices li.is-highlighted:not(.is-selected) .cf-choice {
    background-color: var(--cf-tint-hover);
  }

  /* Unter dem Mauszeiger und bei Tastaturauswahl nennt das Feld die Taste,
     mit der sich die Antwort wählen lässt – wie in der Vorlage. */
  .cf-choices li:not(.is-selected) .cf-choice:hover::before,
  .cf-choices li.is-highlighted:not(.is-selected) .cf-choice::before {
    content: "Taste " counter(cf-choice, upper-alpha);
    width: 67px;
    left: -24px;
    border-color: var(--cf-text);
    background-color: #ececec;
  }
}

/* Auf schmalen Geräten treten an die Stelle der Buchstaben die gewohnten
   Auswahlfelder – wie in der Vorlage. */
@media (max-width: 768px) {
  .cf-choice::before {
    content: "";
  }

  .cf-choices--single .cf-choice::before {
    border-radius: 50%;
  }

  .cf-choices--single li.is-selected .cf-choice::before {
    background-color: var(--cf-text);
    background-image: radial-gradient(circle at center, #fff 0 5.5px, transparent 5.5px);
  }

  .cf-choices--multi li.is-selected .cf-choice::before {
    background-color: var(--cf-text);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m5 13 4 4L19 7'/%3E%3C/svg%3E");
    background-position: center;
    background-repeat: no-repeat;
    background-size: 19px 19px;
  }
}

/* Einwilligung: der Text steht wie in der Vorlage als eigener Absatz unter
   der Antwortkarte „Zustimmen“. */
.cf-consent-text {
  margin-top: 30px;
  font-size: 16px;
  line-height: 24px;
  color: var(--cf-text);
  hyphens: auto;
  overflow-wrap: break-word;
}

.cf-consent-text a {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.cf-consent-text a:hover {
  text-decoration-thickness: 2px;
}

/* ---------- Eingabefelder ---------------------------------------------- */
.cf-input,
.cf-textarea {
  display: block;
  width: 100%;
  max-width: 100%;
  height: 66px;
  padding: 10px 0;
  font-family: inherit;
  font-size: 30px;
  font-weight: 400;
  line-height: normal;
  color: var(--cf-text);
  background-color: transparent;
  border: 0;
  border-bottom: 1px solid var(--cf-line);
  border-radius: 0;
}

.cf-textarea {
  height: auto;
  min-height: 132px;
  line-height: 1.35;
  resize: none;
  overflow: auto;
}

.cf-input::placeholder,
.cf-textarea::placeholder {
  color: var(--cf-muted);
  opacity: 1;
}

.cf-input:focus-visible,
.cf-textarea:focus-visible {
  outline: none;
  border-bottom-color: var(--cf-accent);
  box-shadow: 0 2px 0 0 var(--cf-accent);
}

.cf-input[aria-invalid="true"],
.cf-textarea[aria-invalid="true"] {
  border-bottom-color: var(--cf-error);
}

@media (max-width: 500px) {
  .cf-input,
  .cf-textarea {
    font-size: 24px;
  }
}

/* ---------- Meldungen --------------------------------------------------- */
.cf-error {
  display: block;
  min-height: 0;
  margin: 10px 0 0;
  font-size: 16px;
  font-weight: 400;
  line-height: 1.3;
  color: var(--cf-error);
}

.cf-error:empty {
  display: none;
}

.cf-note {
  margin: 0 0 30px;
  font-size: 16px;
  border-radius: 4px;
  padding: 14px 18px;
}

.cf-note.form-note--error {
  background: #fff;
  border: 1px solid var(--cf-error);
  color: var(--cf-error);
}

.cf-note.form-note--ok {
  background: #fff;
  border: 1px solid var(--cf-line-strong);
  color: var(--cf-text);
}

/* ---------- Absenden ---------------------------------------------------- */
.cf-submit {
  min-height: 75vh;
  padding: 30px 0 0;
}

.cf-submit .cf-btn-row {
  justify-content: flex-start;
  margin-top: 0;
}

/* Erläuterung zur Pflichtkennzeichnung – für Vorlesewerkzeuge, ohne das
   Erscheinungsbild der Vorlage zu verändern. */
.cf-sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* ---------- Fußzeile der Strecke ---------------------------------------- */
/* Steht am Seitenende; der untere Abstand hält die feste Leiste frei. */
.cf-pagefoot {
  padding: 22px 0 78px;
  border-top: 1px solid var(--cf-line);
  text-align: center;
}

/* ---------- Fortschrittsleiste ------------------------------------------ */
.cf-footer {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 60px;
  overflow: hidden;
  font-size: 13px;
  background-color: #fff;
  color: var(--cf-text);
  border-top: 1px solid var(--cf-line);
  transition: height 0.25s ease-in-out;
  z-index: 60;
}

.cf-page.is-start .cf-footer {
  height: 0;
  border-top: 0;
  transition: none;
}

.cf-footer-wrap {
  display: flex;
  justify-content: space-between;
  align-items: stretch;
  flex-wrap: wrap;
  max-width: 830px;
  margin: auto;
  padding: 15px;
}

.cf-progress-status {
  margin: 0 0 8px;
  line-height: 1;
  color: var(--cf-muted);
}

.cf-progress-bar {
  position: relative;
  width: 237px;
  height: 10px;
  border-radius: 10px;
  background-color: rgba(0, 0, 0, 0.251);
}

.cf-progress-fill {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  width: 0;
  border-radius: 10px;
  background-color: var(--cf-text);
  transition: width 0.3s ease;
}

.cf-footer-right {
  display: flex;
  align-items: stretch;
  margin-left: auto;
}

.cf-switch {
  display: flex;
  justify-content: space-between;
  width: 77px;
  margin-left: 20px;
}

.cf-switch button {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 31px;
  height: 31px;
  padding: 0;
  border: 2px solid var(--cf-text);
  border-radius: 50%;
  background: transparent;
  color: var(--cf-text);
  cursor: pointer;
}

.cf-switch button:hover {
  background-color: rgba(51, 51, 51, 0.08);
}

.cf-switch button:focus-visible {
  outline: 3px solid var(--cf-accent);
  outline-offset: 2px;
}

.cf-switch svg {
  width: 15px;
  height: 15px;
}

@media (max-width: 768px) {
  .cf-switch {
    width: 96px;
    margin-top: -5px;
    margin-left: 15px;
  }

  .cf-switch button {
    width: 44px;
    height: 44px;
  }

  .cf-switch svg {
    width: 20px;
    height: 20px;
  }
}

@media (max-width: 500px) {
  .cf-progress-bar {
    width: 140px;
  }
}

@media (max-width: 420px) {
  .cf-progress-bar {
    width: 110px;
  }

  .cf-switch {
    width: 88px;
  }
}

/* Die Auswahl muss die Übergänge der Regeln oben überstimmen, deshalb dieselbe
   oder eine höhere Gewichtung. */
@media (prefers-reduced-motion: reduce) {
  .cf-form.is-enhanced .cf-field,
  .cf-page .cf-footer,
  .cf-page .cf-progress-fill,
  .cf-page .cf-btn,
  .cf-page.is-enhanced .cf-header .cf-btn-row {
    transition: none;
  }
}

/* ---------- Bestätigungstext auf der Danke-Seite ----------------------- */
.confirmation-text p + p {
  margin-top: 0.85rem;
}

.confirmation-text a {
  text-decoration: underline;
  text-underline-offset: 3px;
}
