.at-form-shell {
  font-family: var(--at-font-family, inherit);
  font-size: var(--at-font-size, 16px);
  background: var(--at-background-color, #fff);
  color: inherit;
  border: var(--at-form-border-width, 1px) solid var(--at-border-color, #d6dbe6);
  border-radius: var(--at-border-radius, 10px);
  padding: calc(var(--at-gap, 16px) * 1.5);
  max-width: var(--at-form-max-width, 760px);
  margin: 0 auto;
  box-sizing: border-box;
}
.at-form-shell * { box-sizing: border-box; }
.at-step { display: none; }
.at-step.is-active { display: block; }
.at-step h3 { margin-top: 0; }
.at-form-shell.at-custom-heading-color .at-step > h3 { color: var(--at-heading-color); }
.at-section-description { opacity: .8; margin-bottom: var(--at-gap, 16px); }
.at-form-shell.at-custom-description-color .at-section-description { color: var(--at-section-description-color); opacity: 1; }
/* Optional notice styling; empty settings leave all existing notices untouched. */
.at-form-shell.at-custom-notice-text-color .at-field.at-field-notice .at-notice-text {
  color: var(--at-notice-text-color);
}
.at-form-shell.at-custom-notice-background-color .at-field.at-field-notice {
  background-color: var(--at-notice-background-color);
  padding: var(--at-field-padding, 12px);
}
.at-field { margin-bottom: var(--at-gap, 16px); }
.at-field label, .at-field legend { display: block; font-weight: 600; margin-bottom: 6px; }
.at-form-shell.at-custom-label-color .at-field label, .at-form-shell.at-custom-label-color .at-field legend { color: var(--at-label-color); }
.at-field input[type="text"],
.at-field input[type="email"],
.at-field input[type="tel"],
.at-field input[type="url"],
.at-field input[type="number"],
.at-field input[type="date"],
.at-field textarea,
.at-field select {
  width: 100%;
  max-width: 100%;
  border: 1px solid var(--at-border-color, #d6dbe6);
  border-radius: var(--at-border-radius, 10px);
  padding: var(--at-field-padding, 12px);
  font: inherit;
  background: var(--at-field-background-color, #fff);
}
.at-form-shell.at-custom-field-text-color .at-field :is(input[type="text"], input[type="email"], input[type="tel"], input[type="url"], input[type="number"], input[type="date"], textarea, select) {
  color: var(--at-field-text-color);
}
.at-field textarea { min-height: 130px; resize: vertical; }
.at-options, .at-icon-options { display: flex; flex-wrap: wrap; gap: 14px 22px; }
.at-field-radio fieldset,
.at-field-checkboxes fieldset,
.at-icon-captcha-fieldset { border: 0 !important; padding: 0 !important; margin: 0 !important; min-width: 0; }
.at-field-radio legend,
.at-field-checkboxes legend,
.at-icon-captcha-fieldset legend { display: block; float: none; width: 100%; padding: 0; margin: 0 0 8px; }
.at-option, .at-check-label { display: inline-flex !important; align-items: flex-start; gap: 10px; font-weight: 400 !important; cursor: pointer; margin: 0; }
.at-option input, .at-check-label input { flex: 0 0 auto; margin-top: .25em; }
.at-options .at-option input[type="radio"],
.at-options .at-option input[type="checkbox"] { margin-right: 0; }
.at-check-label span { line-height: inherit; }
.at-icon-option {
  position: relative;
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  width: 72px;
  height: 58px;
  border: 1px solid var(--at-border-color, #d6dbe6);
  border-radius: var(--at-border-radius, 10px);
  cursor: pointer;
  background: var(--at-icon-option-background-color, #fff);
  color: var(--at-icon-option-icon-color, inherit);
}
.at-icon-option input { position: absolute; opacity: 0; }
.at-icon-option:has(input:checked), .at-icon-option.is-selected { border-color: var(--at-primary-color, #0f5fff); box-shadow: 0 0 0 2px color-mix(in srgb, var(--at-primary-color, #0f5fff) 20%, transparent); }
.at-icon-symbol { font-size: 28px; line-height: 1; }
.at-icon-captcha.is-checking { opacity: .75; pointer-events: none; }
.at-required-mark { color: var(--at-required-mark-color, var(--at-error-color, #b42318)); }
.at-field-error { color: var(--at-error-color, #b42318); font-size: .9em; min-height: 1.2em; margin-top: 4px; }
.at-alert { padding: 12px 14px; border-radius: var(--at-border-radius, 10px); margin-bottom: var(--at-gap, 16px); }
.at-alert-success { border: 1px solid var(--at-success-color, #027a48); color: var(--at-success-color, #027a48); }
.at-alert-error { border: 1px solid var(--at-error-color, #b42318); color: var(--at-error-color, #b42318); }
.at-actions { display: flex; gap: 10px; justify-content: space-between; margin-top: calc(var(--at-gap, 16px) * 1.25); }
.at-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: var(--at-button-border-width, 1px) solid var(--at-button-border-color, var(--at-primary-color, #0f5fff));
  background: var(--at-button-background-color, var(--at-primary-color, #0f5fff));
  color: var(--at-button-text-color, #fff);
  border-radius: var(--at-button-border-radius, var(--at-border-radius, 10px));
  padding: var(--at-button-padding, 12px 18px);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
}
.at-button-secondary { background: var(--at-button-secondary-background-color, transparent); color: var(--at-button-secondary-text-color, var(--at-primary-color, #0f5fff)); }
.at-form-shell.at-custom-button-hover .at-button:hover:not(:disabled) {
  background: var(--at-button-hover-color, var(--at-primary-color, #0f5fff));
  color: var(--at-button-hover-text-color, var(--at-button-text-color, #fff));
}
.at-form-shell.at-custom-button-hover .at-button-secondary:hover:not(:disabled) {
  background: var(--at-button-secondary-hover-color, transparent);
  color: var(--at-button-secondary-hover-text-color, var(--at-primary-color, #0f5fff));
}
/* Das WordPress-Theme darf beim Fokussieren keine andere Buttonfarbe einsetzen.
   Ohne explizite Fokusfarben verwenden wir die normale Plugin-Gestaltung.
   Fuer Tastaturbedienung bleibt ein sichtbarer Fokus-Ring erhalten. */
.at-form-shell .at-button:focus {
  background-color: var(--at-button-focus-color, var(--at-button-background-color, var(--at-primary-color, #0f5fff)));
  color: var(--at-button-focus-text-color, var(--at-button-text-color, #fff));
  border-color: var(--at-button-border-color, var(--at-primary-color, #0f5fff));
}
.at-form-shell .at-button-secondary:focus {
  background-color: var(--at-button-focus-color, var(--at-button-secondary-background-color, transparent));
  color: var(--at-button-focus-text-color, var(--at-button-secondary-text-color, var(--at-primary-color, #0f5fff)));
}
.at-form-shell .at-button:focus:not(:focus-visible) { outline: none; }
.at-form-shell .at-button:focus-visible {
  outline: 2px solid var(--at-button-focus-color, var(--at-primary-color, #0f5fff));
  outline-offset: 3px;
}
.at-button[hidden] { display: none; }
.at-progress { margin-bottom: var(--at-gap, 16px); }
.at-progress-bar { height: 8px; background: color-mix(in srgb, var(--at-border-color, #d6dbe6) 70%, transparent); border-radius: 999px; overflow: hidden; }
.at-progress-bar span { display: block; height: 100%; width: 0; background: var(--at-progress-color, var(--at-primary-color, #0f5fff)); transition: width .2s ease; }
.at-progress-text { font-size: .9em; opacity: .75; margin-top: 6px; text-align: right; }
.at-hp { position: absolute; left: -10000px; top: auto; width: 1px; height: 1px; overflow: hidden; }
.at-hidden { display: none !important; }
.at-field.has-error input,
.at-field.has-error textarea,
.at-field.has-error select { border-color: var(--at-error-color, #b42318); }
@media (max-width: 640px) {
  .at-form-shell { padding: var(--at-gap, 16px); }
  .at-actions { flex-direction: column; }
  .at-button { width: 100%; }
  /* Im mobilen Stapel erst Weiter/Senden, danach Zurück. */
  .at-actions [data-at-next],
  .at-actions [data-at-submit] { order: 1; }
  .at-actions [data-at-prev] { order: 2; }
}
.at-local-icon-svg {
  display: block;
  width: 30px;
  height: 30px;
}
.at-icon-option:hover,
.at-icon-option:focus-within {
  color: var(--at-icon-option-icon-color, var(--at-primary-color, #0f5fff));
  background-color: var(--at-icon-option-background-color, #fff);
}

.at-button:disabled,
.at-button[disabled] {
  opacity: .45;
  cursor: not-allowed;
}

/* Datenschutz: die Checkbox bewusst selbst zeichnen, weil manche Themes die
   native Checkbox unsichtbar machen. Die echte Checkbox bleibt für
   Tastatur, Screenreader und Browser-Validierung vorhanden. */
.at-form-shell .at-privacy-label {
  position: relative;
  display: inline-flex !important;
  align-items: flex-start !important;
  gap: 10px;
  cursor: pointer;
  margin: 0;
}
.at-form-shell .at-privacy-label input[type="checkbox"] {
  display: block !important;
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  min-width: 1px !important;
  opacity: 0 !important;
  padding: 0 !important;
  margin: 0 !important;
  border: 0 !important;
  overflow: hidden !important;
  clip-path: inset(50%);
  white-space: nowrap;
}
.at-form-shell .at-privacy-control {
  position: relative;
  display: inline-flex !important;
  flex: 0 0 20px;
  align-self: flex-start;
  width: 20px !important;
  height: 20px !important;
  margin: .15em 0 0 !important;
  padding: 0 !important;
  border: 2px solid #667085 !important;
  border-radius: 3px;
  background: #fff !important;
  box-shadow: none;
  box-sizing: border-box;
  pointer-events: none;
}
.at-form-shell .at-privacy-control::after {
  content: '';
  position: absolute;
  width: 5px;
  height: 9px;
  left: 5px;
  top: 1px;
  border: solid #fff;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
  display: none;
}
.at-form-shell .at-privacy-label input[type="checkbox"]:checked + .at-privacy-control {
  background: var(--at-primary-color, #0f5fff) !important;
  border-color: var(--at-primary-color, #0f5fff) !important;
}
.at-form-shell .at-privacy-label input[type="checkbox"]:checked + .at-privacy-control::after { display: block; }
.at-form-shell .at-privacy-label input[type="checkbox"]:focus-visible + .at-privacy-control {
  outline: 2px solid var(--at-primary-color, #0f5fff);
  outline-offset: 3px;
}
.at-form-shell .at-privacy-label .at-privacy-text {
  display: inline-block;
  flex: 1 1 auto;
  line-height: inherit;
  min-width: 0;
}
/* Für nicht freigegebene Formulare darf das Theme keine Hover-/Fokusfarbe
   auf den deaktivierten Senden-Button anwenden. */
.at-form-shell .at-button[data-at-submit]:disabled,
.at-form-shell .at-button[data-at-submit]:disabled:hover,
.at-form-shell .at-button[data-at-submit]:disabled:focus,
.at-form-shell .at-button[data-at-submit]:disabled:active {
  background: var(--at-button-background-color, var(--at-primary-color, #0f5fff)) !important;
  color: var(--at-button-text-color, #fff) !important;
  border-color: var(--at-button-border-color, var(--at-primary-color, #0f5fff)) !important;
  opacity: .45;
  cursor: not-allowed;
  box-shadow: none !important;
  outline: none !important;
}

/* v0.3.0 – Unverbindlicher Preiskonfigurator: nur bei Preis-Feldtypen aktiv. */
.at-form-shell .at-price-fieldset { border: 0 !important; padding: 0 !important; margin: 0 !important; min-width: 0; }
.at-form-shell .at-price-fieldset > legend { display: block; float: none; width: 100%; padding: 0; margin: 0 0 12px; font-weight: 600; }
.at-price-options { display: grid; grid-template-columns: 1fr; gap: 10px; }
.at-form-shell .at-price-option {
  display: flex !important;
  align-items: flex-start;
  gap: 12px;
  width: 100%;
  min-width: 0;
  margin: 0;
  padding: 14px;
  font-weight: 400;
  cursor: pointer;
  border: 1px solid var(--at-price-card-border, var(--at-border-color, #d6dbe6));
  border-radius: var(--at-border-radius, 10px);
  background: var(--at-price-card-background, var(--at-background-color, #fff));
}
.at-form-shell .at-price-option:is(:hover, :focus-within) { border-color: var(--at-primary-color, #0f5fff); }
.at-form-shell .at-price-option.is-selected,
.at-form-shell .at-price-option:has(input:checked) {
  border-color: var(--at-primary-color, #0f5fff);
  background: var(--at-price-card-selected, var(--at-price-card-background, var(--at-background-color, #fff)));
}
.at-form-shell .at-price-option input[type="radio"],
.at-form-shell .at-price-option input[type="checkbox"] {
  width: 18px !important;
  height: 18px !important;
  min-width: 18px !important;
  flex: 0 0 18px;
  margin: 2px 0 0 !important;
  opacity: 1;
  position: static;
  accent-color: var(--at-primary-color, #0f5fff);
}
.at-form-shell .at-price-option-body { display: flex; flex: 1 1 auto; flex-direction: column; gap: 4px; min-width: 0; }
.at-form-shell .at-price-option-title { font-weight: 650; overflow-wrap: anywhere; }
.at-form-shell .at-price-option-body small { font-size: .88em; line-height: 1.4; font-weight: 400; opacity: .8; }
.at-form-shell .at-price-option-amount { flex: 0 0 auto; white-space: nowrap; font-weight: 700; }
/* v0.3.1 – schlanke Summe nur direkt unter aktiven Leistungsschritten. */
.at-form-shell .at-pricing-step-total {
  margin: 14px 0 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--at-heading-color, inherit);
  font-size: 1.16em;
  line-height: 1.5;
  text-align: left;
}
.at-form-shell .at-pricing-step-total strong { font-weight: 700; }
.at-form-shell .at-pricing-step-total[hidden] { display: none !important; }
/* Auf der Abschlussseite erscheint die kurze Übersicht VOR Datenschutz/Captcha. */
.at-form-shell .at-pricing-review {
  margin: 0 0 calc(var(--at-gap, 16px) * 1.5);
  padding: 0 0 calc(var(--at-gap, 16px) * 1.25);
  border: 0;
  border-bottom: 1px solid var(--at-border-color, #d6dbe6);
  background: transparent;
}
.at-form-shell .at-pricing-review[hidden] { display: none !important; }
.at-form-shell .at-pricing-review > h3 { margin: 0 0 12px; color: var(--at-heading-color, inherit); }
.at-pricing-group-title { display: block; margin: 12px 0 5px; font-size: .97em; }
.at-pricing-line { display: flex; justify-content: space-between; gap: 14px; padding: 5px 0; font-size: .95em; }
.at-pricing-line span:last-child { white-space: nowrap; font-variant-numeric: tabular-nums; }
.at-form-shell .at-pricing-review-total {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  color: var(--at-heading-color, inherit);
  font-size: 1.12em;
  margin: 12px 0 0;
  padding-top: 12px;
  border-top: 1px solid var(--at-border-color, #d6dbe6);
}
.at-pricing-review-total strong:last-child { white-space: nowrap; font-variant-numeric: tabular-nums; }
.at-pricing-note { font-size: .85em; line-height: 1.45; opacity: .85; margin: 10px 0 0; }
@media (max-width: 640px) {
  .at-form-shell .at-price-option { flex-wrap: wrap; }
  .at-form-shell .at-price-option-amount { margin-left: auto; }
}

/* v0.3.2 – getrennte Text-/Preisfarben; leere Optionen behalten alle Altwerte. */
.at-form-shell .at-price-option-title,
.at-form-shell .at-price-option-body small,
.at-form-shell .at-pricing-group-title,
.at-form-shell .at-pricing-line span:first-child {
  color: var(--at-price-label-color, inherit);
}
.at-form-shell .at-price-option-amount,
.at-form-shell .at-pricing-line span:last-child,
.at-form-shell .at-pricing-review-total strong:last-child,
.at-form-shell .at-pricing-step-total .at-pricing-total-amount {
  color: var(--at-price-amount-color, inherit);
}
.at-form-shell .at-pricing-review-total strong:first-child,
.at-form-shell .at-pricing-step-total .at-pricing-total-label {
  color: var(--at-price-label-color, inherit);
}

.at-form-shell [data-at-success] { scroll-margin-top: 24px; }

/* v0.3.3 – Schriftfarben für Preishinweis und Fortschrittsanzeige. */
.at-form-shell .at-pricing-note {
  color: var(--at-price-label-color, inherit);
}
.at-form-shell .at-progress-text {
  color: var(--at-progress-text-color, inherit);
}
