/* SGH – Realitätscheck E-Rechnung, Version 1.7.0 */
/* Der Footer verwendet helle Schrift und benötigt auch auf dieser Vorlage einen dunklen Grund. */
.sgh-erc-layout > .page-footer {
  background-color: var(--color-port-gore, #1d1b3c);
  color: #fff;
}

.sgh-erc-wrap {
  --sgh-dark-one: #1D1E23;
  --sgh-dark-two: #3b3678;
  --sgh-accent: #2CBE9A;
  --sgh-accent-two: #8E9ED1;
  --sgh-warn: #C0473B;
  --sgh-light: #EEEFFF;
  --sgh-card: #FFFFFF;
  --sgh-line: rgba(142,158,209,0.32);
  --sgh-line-strong: rgba(142,158,209,0.55);
  --color-form-placeholder: var(--sgh-dark-two);

  max-width: 640px;
  margin: 0 auto;
  padding: 40px 20px 64px;
  box-sizing: border-box;
  font-family: 'Open Sans', Arial, sans-serif;
  line-height: 1.5;
  color: var(--sgh-dark-one);
}
.sgh-erc-wrap *, .sgh-erc-wrap *::before, .sgh-erc-wrap *::after { box-sizing: border-box; }
.sgh-erc-wrap [hidden] { display: none !important; }

.sgh-erc-card {
  background: var(--sgh-card);
  box-shadow: none;
  border: 1px solid var(--sgh-line);
  border-radius: 16px;
  padding: 36px 32px;
  min-height: 320px;
  display: flex;
  flex-direction: column;
}
@media (max-width: 480px) {
  .sgh-erc-card { padding: 28px 20px; min-height: 0; }
}

.sgh-erc-eyebrow {
  font-weight: 600;
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--sgh-dark-two);
  margin: 0 0 12px;
}
.sgh-erc-lead-heading {
  font-weight: 700;
  font-size: 26px;
  line-height: 1.3;
  color: var(--sgh-dark-two);
  margin: 0 0 14px;
}
.sgh-erc-lead {
  color: var(--sgh-dark-one);
  opacity: 0.75;
  font-size: 15px;
  line-height: 1.6;
  margin: 0 0 26px;
  font-weight: 400;
}

.sgh-erc-start-btn,
.sgh-erc-gate-btn,
.sgh-erc-result-cta {
  align-self: flex-start;
  background: var(--sgh-accent);
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 13px 24px;
  font-size: 14.5px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: filter 0.15s ease;
}
.sgh-erc-start-btn:hover,
.sgh-erc-gate-btn:hover,
.sgh-erc-result-cta:hover { filter: brightness(0.92); }
.sgh-erc-start-btn:focus-visible,
.sgh-erc-gate-btn:focus-visible,
.sgh-erc-result-cta:focus-visible,
.sgh-erc-privacy a:focus-visible,
.sgh-erc-back-btn:focus-visible,
.sgh-erc-opt-btn:focus-visible {
  outline: 2px solid var(--sgh-dark-two);
  outline-offset: 2px;
}

.sgh-erc-back-btn {
  align-self: flex-start;
  margin-top: 18px;
  background: none;
  border: none;
  color: var(--sgh-accent-two);
  font-size: 13.5px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  padding: 4px 0;
}
.sgh-erc-back-btn:hover { color: var(--sgh-dark-two); }
.sgh-erc-back-btn[hidden] { display: none; }

.sgh-erc-progress-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 22px;
}
.sgh-erc-progress-track {
  flex: 1;
  height: 6px;
  background: var(--sgh-light);
  border-radius: 3px;
  overflow: hidden;
}
.sgh-erc-progress-fill {
  height: 100%;
  background: var(--sgh-accent);
  border-radius: 3px;
  transition: width 0.3s ease;
}
.sgh-erc-progress-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--sgh-dark-two);
  white-space: nowrap;
}

.sgh-erc-q-text {
  font-weight: 700;
  font-size: 19px;
  line-height: 1.4;
  color: var(--sgh-dark-two);
  margin: 0 0 24px;
  flex: 1;
}
.sgh-erc-options {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.sgh-erc-opt-btn {
  text-align: left;
  padding: 14px 16px;
  border: 1.5px solid var(--sgh-line-strong);
  border-radius: 9px;
  background: var(--sgh-card);
  font-family: inherit;
  font-size: 14.5px;
  font-weight: 400;
  color: var(--sgh-dark-one);
  cursor: pointer;
  transition: border-color 0.12s ease, background 0.12s ease;
}
.sgh-erc-opt-btn:hover {
  border-color: var(--sgh-accent);
  background: rgba(44,190,154,0.07);
}
.sgh-erc-opt-btn .sgh-erc-pts {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--sgh-accent-two);
  margin-left: 6px;
}

.sgh-erc-screen { display: none; flex: 1; flex-direction: column; }
.sgh-erc-screen.sgh-erc-active { display: flex; }

.sgh-erc-result-eyebrow {
  font-weight: 600;
  font-size: 12px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--sgh-dark-two);
  margin: 0 0 8px;
}
.sgh-erc-result-score {
  font-weight: 700;
  font-size: 42px;
  line-height: 1;
  color: var(--sgh-dark-two);
  margin: 0 0 4px;
}
.sgh-erc-result-score .sgh-erc-of { font-size: 16px; color: var(--sgh-dark-one); opacity: 0.6; font-weight: 400; margin-left: 6px; }
.sgh-erc-result-band {
  font-size: 16px;
  font-weight: 700;
  margin: 4px 0 14px;
}
.sgh-erc-result-text {
  font-size: 14.5px;
  font-weight: 400;
  line-height: 1.6;
  color: var(--sgh-dark-one);
  margin: 0 0 22px;
}
.sgh-erc-result-cta,
.sgh-erc-result-cta:visited,
.sgh-erc-result-cta:hover,
.sgh-erc-result-cta:focus {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  max-width: 100%;
  min-height: 44px;
  line-height: 1.4;
  color: #fff;
  text-decoration: none;
  text-align: center;
  white-space: normal;
  overflow-wrap: anywhere;
}
/* Die Theme-Regel für normale Textlinks gilt nicht für den Termin-Button. */
.sgh-erc-wrap .sgh-erc-result-content a.sgh-erc-result-cta { text-decoration: none; }

/* Formular und Ergebnis stehen im normalen Dokumentfluss, ohne Überlagerung. */
.sgh-erc-gate-box {
  border: 1px solid var(--sgh-line);
  border-radius: 12px;
  padding: 22px 20px;
  background: var(--sgh-card);
  min-width: 0;
  box-shadow: none;
}

.sgh-erc-gate-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--sgh-dark-two);
  margin: 0 0 14px;
}
.sgh-erc-gate-form { display: flex; flex-direction: column; gap: 10px; margin: 0; }
.sgh-erc-gate-form input:not([type="hidden"]):not([type="checkbox"]),
.sgh-erc-gate-form select {
  --color-form-placeholder: var(--sgh-dark-two);
  height: auto;
  min-height: 44px;
  min-width: 0;
  border-radius: 8px;
  border: 1.5px solid var(--sgh-line-strong);
  background: var(--sgh-light);
  padding: 10px 13px;
  font-size: 16px;
  line-height: 1.4;
  font-family: inherit;
  color: var(--sgh-dark-one);
  width: 100%;
}
.sgh-erc-gate-form input::placeholder {
  color: #8b8e98;
  opacity: 1;
}
.sgh-erc-gate-form input:focus,
.sgh-erc-gate-form select:focus { outline: none; border-color: var(--sgh-accent); }
.sgh-erc-gate-form select { cursor: pointer; }
.sgh-erc-gate-form select.sgh-erc-is-empty { color: #8b8e98; }
.sgh-erc-gate-form select option { color: var(--sgh-dark-one); }
.sgh-erc-field-hint,
.sgh-erc-privacy {
  font-size: 12.5px;
  font-weight: 400;
  line-height: 1.55;
  color: var(--sgh-dark-one);
  opacity: 0.88;
  overflow-wrap: anywhere;
}
.sgh-erc-field-hint { margin: -2px 0 4px; }
.sgh-erc-privacy { margin-top: 4px; }
.sgh-erc-privacy p { font: inherit; color: inherit; margin: 0 0 8px; }
.sgh-erc-privacy a { color: var(--sgh-dark-two); text-decoration: underline; }
.sgh-erc-privacy .sgh-erc-objection {
  border-left: 3px solid var(--sgh-accent-two);
  padding-left: 10px;
  margin: 10px 0;
}
.sgh-erc-gate-btn {
  align-self: stretch;
  width: 100%;
  max-width: 100%;
  margin-top: 4px;
  min-height: 44px;
  height: auto;
  line-height: 1.4;
  white-space: normal;
}
.sgh-erc-gate-btn:disabled { cursor: wait; opacity: 0.7; }
.sgh-erc-gate-error {
  color: var(--sgh-warn);
  font-size: 12.5px;
  margin: 2px 0 0;
  overflow-wrap: anywhere;
}
.sgh-erc-gate-error[hidden] { display: none; }

@media (max-width: 480px) {
  .sgh-erc-gate-box { padding: 18px 16px; }
}
@media (max-width: 360px) {
  .sgh-erc-wrap { padding-left: 12px; padding-right: 12px; }
  .sgh-erc-card { padding-left: 16px; padding-right: 16px; }
  .sgh-erc-gate-box { padding-left: 12px; padding-right: 12px; }
}

.sgh-erc-footnote {
  margin-top: 22px;
  font-size: 11.5px;
  font-weight: 400;
  color: var(--sgh-dark-one);
  opacity: 0.6;
  line-height: 1.5;
}

@media (prefers-reduced-motion: reduce) {
  .sgh-erc-progress-fill { transition: none; }
}

/* Native Formularfelder: Theme-Ersatzdropdown und ausgelagerte Positionierung neutralisieren. */
#sgh-erc-card .sgh-erc-gate-form .dynamic-select { display: none !important; }
#sgh-erc-card select[data-el="position"] {
  display: block !important; visibility: visible !important; opacity: 1 !important;
  position: static !important; inset: auto !important;
  appearance: auto !important; width: 100% !important; max-width: 100% !important;
  height: auto !important; min-height: 44px; text-indent: 0 !important;
  padding: 10px 13px !important; border: 1.5px solid var(--sgh-line-strong) !important;
  border-radius: 8px; background: var(--sgh-light) !important;
  color: var(--sgh-dark-one) !important; -webkit-text-fill-color: currentColor !important;
}
#sgh-erc-card .sgh-erc-gate-form input:not([type="hidden"]):not([type="checkbox"]),
#sgh-erc-card .sgh-erc-gate-form select {
  font-family: 'Open Sans', Arial, sans-serif !important;
  font-size: 16px !important; font-weight: 400 !important; font-style: normal !important;
  line-height: 1.4 !important; letter-spacing: normal !important;
}
#sgh-erc-card select[data-el="position"].sgh-erc-is-empty { color: #8b8e98 !important; }
#sgh-erc-card select[data-el="position"] option { color: var(--sgh-dark-one); background: white; }
#sgh-erc-card select[data-el="position"]:focus-visible,
#sgh-erc-card .sgh-erc-gate-form input:focus-visible {
  outline: 2px solid var(--sgh-dark-two); outline-offset: 2px;
}
#sgh-erc-card .sgh-erc-checkbox-row {
  display: flex !important; align-items: flex-start; gap: 10px;
  margin: 6px 0 12px; padding: 0; cursor: pointer;
  font: 400 12.5px/1.55 'Open Sans', Arial, sans-serif;
  color: var(--sgh-dark-one); text-transform: none; letter-spacing: normal;
}
#sgh-erc-card .sgh-erc-checkbox-row::before,
#sgh-erc-card .sgh-erc-checkbox-row::after { content: none !important; }
#sgh-erc-card .sgh-erc-checkbox-row input[type="checkbox"] {
  appearance: auto !important; display: inline-block !important;
  position: static !important; inset: auto !important; opacity: 1 !important;
  visibility: visible !important; transform: none !important; clip: auto !important;
  clip-path: none !important; width: 18px !important; height: 18px !important;
  min-width: 18px; min-height: 18px; flex: 0 0 18px;
  margin: 2px 0 0 !important; padding: 0 !important; accent-color: var(--sgh-dark-two);
}
#sgh-erc-card .sgh-erc-checkbox-row input:focus-visible { outline: 2px solid var(--sgh-dark-two); outline-offset: 3px; }
#sgh-erc-card .sgh-erc-checkbox-row span { flex: 1; min-width: 0; }
#sgh-erc-card .sgh-erc-checkbox-row a,
#sgh-erc-card .sgh-erc-field-hint a { color: var(--sgh-dark-two); text-decoration: underline; }
.sgh-erc-intro-privacy { margin: 0 0 10px; }
.sgh-erc-captcha-area { min-width: 0; margin: 4px 0; }
.sgh-erc-captcha-area > div { max-width: 100%; }
.sgh-erc-start-btn:disabled { opacity: .7; cursor: wait; }

/* E-Mail-Bestätigung und bedingte Freigabe */
.sgh-erc-gate-btn:disabled,
.sgh-erc-back-btn:disabled { cursor: not-allowed; opacity: 0.5; }
.sgh-erc-result-content .sgh-erc-back-btn { display: block; }
.sgh-erc-gate-box .sgh-erc-back-btn { white-space: normal; text-align: left; }

/* Ausführliche Ergebnisse: Absätze und vier klar lesbare Handlungsschritte. */
#sgh-erc-card .sgh-erc-result-text > p { margin: 0 0 18px; font: inherit; color: inherit; }
#sgh-erc-card .sgh-erc-result-text > h3 {
  margin: 26px 0 16px; font: 700 16px/1.4 'Open Sans', Arial, sans-serif;
  color: var(--sgh-dark-two); letter-spacing: normal; text-transform: none;
}
#sgh-erc-card .sgh-erc-result-steps { margin: 0; padding: 0 0 0 21px; list-style: disc outside; }
#sgh-erc-card .sgh-erc-result-steps > li { margin: 0 0 18px; padding: 0 0 0 3px; font: inherit; }
#sgh-erc-card .sgh-erc-result-steps > li::before { content: none; }
#sgh-erc-card .sgh-erc-result-steps > li::marker { color: var(--sgh-accent); }
#sgh-erc-card .sgh-erc-result-steps strong { display: block; margin: 0 0 4px; color: var(--sgh-dark-two); font-weight: 700; }
#sgh-erc-card .sgh-erc-result-steps p { margin: 0; font: inherit; color: inherit; }
/* Fokusziel für die Ergebnisansage; Bedienelemente behalten ihre eigenen Fokusringe. */
#sgh-erc-card .sgh-erc-result-content:focus { outline: none; }
#sgh-erc-card .sgh-erc-result-content .sgh-erc-back-btn { color: var(--sgh-dark-two); text-align: left; }

/* Die drei Aktionen unter dem Bestätigungshinweis jeweils in einer eigenen Zeile. */
#sgh-erc-card [data-el="pendingBox"] > .sgh-erc-back-btn {
  display: block;
  width: fit-content;
  max-width: 100%;
  margin-top: 12px;
  text-align: left;
}
#sgh-erc-card .sgh-erc-captcha-area .sgh-erc-checkbox-row { margin-bottom: 8px; }
#sgh-erc-card .sgh-erc-checkbox-row input:disabled { cursor: not-allowed; }
