/* Angebotsformular */

.angebot-formular {
  padding-block: clamp(24px, 6vw, 80px);
  /* background: #f5f5f5; */
  font-family: "NeueHaasUnicaPro-Regular";
  padding-left: 0;
  padding-right: 0;
  max-width: 1056px;
  margin-left: auto;
  margin-right: auto;
}

.angebot-formular__top {
  align-items: flex-start;
}

.angebot-formular__intro {
  display:flex;
  flex-direction: column;
  margin-bottom:60px;
}
.angebot-formular__intro h2 {
  max-width:400px;
  font-size:28px;
  line-height:1.2;
  margin-bottom:20px;
}
.angebot-formular__intro p {
  max-width:500px;
}

.angebot-formular__hinweis {
  grid-column: 1 / -1;
}

.upload-toggle {
  margin-top: 6px;
  font-size: 0.85rem;
  color: #000;
}
.upload-toggle span {
  font-family: "NeueHaasUnicaPro-Regular";
}

.upload-toggle input {
  margin-right: 6px;
}

@media (min-width: 950px) {
  .angebot-formular__hinweis {
    grid-column: 1 / -1;
  }
  .angebot-formular__intro {
    display:flex;
    flex-direction: row;
    justify-content: space-between;
    margin-bottom:60px;
    gap:20px;
  }
  .angebot-formular__intro h2 {
    margin-bottom:0px;
  }
}

form#angebotForm {
  width: 100%;
}

/* Blöcke */

.form-block {
  border: none;
  border-radius: 8px;
  margin-bottom: 60px;
  padding:125px clamp(16px, 3vw, 48px);
  position: relative;
  padding-bottom: var(--footer-space, 80px);
}

label {
  font-family: "NeueHaasUnicaPro-Bold";
}

input[type=text], input[type=email], input[type=number], textarea {
  border-radius:4px;
  border:none;
  font-size:20px !important;
}

.form-block legend {
  font-weight: 700;
  margin-bottom: 8px;
  font-family: "NeueHaasUnicaPro-Bold";
  position: absolute;
  right: 48px;
  top:48px;
  font-size:24px;
  padding-left:16px;
}

.form-block--blue {
  background: #e3edf7;
}

.form-block--beige {
  background: #f7f2e3;
}

.form-block--white {
  background: #fff;
}

.form-block__footer-hinweis {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  border-radius: 0 0 8px 8px;
  margin: 0;
  padding: 20px 24px;
  font-family: "NeueHaasUnicaPro-Regular";
  font-size: 18px;
  line-height: 1.4;
  color: #000000;
  background: #7E98AA;          /* oder dein Blau aus dem Screenshot */
  text-align: center;
}

.form-block__footer-hinweis p {
  max-width:600px;
  margin-left:auto;
  margin-right:auto;
}

/* Felder */

.field-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  margin-bottom: 36px;
}

.js-block-anlagen .field-row, .js-block-geraete .field-row {
  margin-bottom: 48px;
}

/* Nur für die Datenschutz-Zeile, nicht für alle Checkboxen */
.field-row--checkbox .checkbox {
  display: flex;
  align-items: flex-start;
  gap: 8px;              /* Abstand zwischen Box und Text */
}

/* Checkbox selbst minimal nach unten, damit sie optisch mittig sitzt */
.field-row--checkbox .checkbox input[type="checkbox"] {
  margin-top: 8px;
  flex: 0 0 auto;
}

/* Einheitliche, schöne Radio-Labels */
.radio-inline {
  display: flex;
  align-items: flex-start;
  gap: 8px;              /* Abstand zwischen Punkt und Text */
  line-height: 1.4;
}

/* Radio-Button minimal runtersetzen, damit er optisch schöner sitzt */
.radio-inline input[type="radio"] {
  margin-top: 2px;
  flex: 0 0 auto;
}

/* Falls du irgendwo längere Beschreibungen unter Radios hast */
.radio-inline span,
.radio-inline p,
.radio-inline br {
  flex: 1 1 auto;
}


.field-row--2col {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.field-row--3col {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.field-row--checkbox {
  align-items: center;
}

@media (max-width: 700px) {
  .field-row--2col,
  .field-row--3col {
    grid-template-columns: 1fr;
  }
}

.field-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.field-group label {
  font-size: 20px;
}

.field-label {
  font-weight: 600;
  margin-bottom: 4px;
  font-family: "NeueHaasUnicaPro-Bold";
  font-size:20px;
}

.field-help {
  font-size: 0.9rem;
  margin: 4px 0px 0px 30px;
  max-width:700px;
}

.field-group input[type="text"],
.field-group input[type="email"],
.field-group input[type="number"],
.field-group select,
.field-group textarea {
  padding: 8px 10px;
  border-radius: 4px;
  border: none;
  font: inherit;
  font-size:20px;
}

.field-group input[type="file"] {
  font-size: 0.9rem;
}

.radio,
.checkbox {
  display: block;
  font-size: 0.95rem;
}

.radio-inline,
.checkbox-inline {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-right: 18px;
  font-size: 0.95rem;
  font-family: "NeueHaasUnicaPro-Regular";
}

.radio-inline input,
.checkbox-inline input,
.radio input,
.checkbox input {
  margin-right: 6px;
}

/* Fehlerzustände */

.field-group--error label,
.field-group--error .field-label {
  color: #000;
}

.field-group--error input[type="text"],
.field-group--error input[type="email"],
.field-group--error input[type="number"],
.field-group--error select,
.field-group--error textarea {
  border-color: #c00;
  background-color: #E91E1E;
}

.field-group--error .radio-inline,
.field-group--error .checkbox {
  color: #c00;
}

/* Buttons */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 22px;
  border-radius: 3px;
  border: none;
  font: inherit;
  cursor: pointer;
}

.formular-button {
  background: #e91e1e;
  color: #fff;
  font-family: "NeueHaasUnicaPro-Bold";
  border-radius: 4px;
  width:200px;
  margin-top:48px;
  width:200px;
}

.formular-button:hover {
  filter: brightness(0.95);
}

.btn--secondary {
  background: #eee;
}

/* Kleingedrucktes */

.form-hinweis-kleingedruckt {
  font-family: "NeueHaasUnicaPro-Italic";
  font-size: 20px;
  line-height: 1.4;
  margin-top: 0px;
}

/* Modal */

.form-modal {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 999;
}

.form-modal--open {
  display: flex;
}

.form-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
}

.form-modal__dialog {
  position: relative;
  max-width: 480px;
  width: 90%;
  background: #fff;
  padding: 24px 20px 20px;
  border-radius: 4px;
  box-shadow: 0 10px 35px rgba(0, 0, 0, 0.3);
  z-index: 1000;
}

.form-modal__dialog h3 {
  margin-top: 0;
  margin-bottom: 8px;
}

.form-modal__errorlist {
  margin: 0 0 16px;
  padding-left: 18px;
  font-size: 0.9rem;
}

/* Floating Placeholder im Feld ------------------------------------- */

.float-placeholder {
  position: relative;
  margin-top:12px;
}

/* Input bekommt etwas mehr Platz oben, damit das geschrumpfte Label nicht gequetscht wirkt */
.float-placeholder input {
  width: 100%;
  padding: 12px 10px 6px;
}

/* nativen Placeholder optisch ausblenden, wir nutzen unser eigenes Element */
.float-placeholder input::placeholder {
  color: transparent;
}

.float-placeholder__text {
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 20px;
  color: #777;
  pointer-events: none;
  transition: 0.15s ease;
  background: transparent;
}

/* aktiv = Fokus oder Inhalt → Text klein nach oben links */
.float-placeholder--active .float-placeholder__text {
  top: 2px;
  transform: none;
  font-size: 0.65rem;
  color: #bbb8b8;
  background: transparent; /* wirkt wie aufliegend auf der Inputkante */
  padding: 0;
}

/* Fehlerzustand mit übernehmen */

.field-group--error .float-placeholder input {
  border-color: #c00;
  background-color: #E91E1E;
}

.field-group--error .float-placeholder__text {
  color: #000;
}


/* Upload-Feld -------------------------------------------------------- */

.upload-box {
  margin-top: 8px;
  position: relative;
}

.upload-input {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none; /* Klick läuft über Label */
}

.upload-label {
  border: 2px dashed #c4c4c4;
  background: #fafafa;
  padding: 20px 20px 12px;
  border-radius: 6px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  text-align: center;
  transition: 0.2s ease;
}

.upload-label:hover {
  background: #f3f3f3;
  transform: translateY(-1px);
}

/* Dragover-Zustand bleibt wie gehabt */
.upload-label--dragover {
  border-color: #c8102e;
  background: #fbeff1;
  box-shadow: 0 0 0 1px #c8102e;
}

/* Icon & Texte */

.upload-icon {
  width: 48px;
  height: auto;
  opacity: 0.8;
}

.upload-text {
  font-size: 0.9rem;
  color: #555;
}

.upload-subtext {
  font-size: 0.8rem;
  color: #888;
}

/* Dateiname-Bereich IN der Box */

.upload-filename {
  margin-top: 10px;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 0.85rem;
  padding: 6px 10px;
  border-radius: 999px;
  background: #f0f0f0;
  color: #555;
}

/* Placeholder-Text, wenn keine Datei gewählt ist */
.upload-filename::before {
  content: attr(data-placeholder);
  color: #999;
}

/* Wenn Datei vorhanden ist, Placeholder ausblenden */
.upload-box.has-file .upload-filename::before {
  content: "";
}

.upload-filename__icon {
  font-size: 0.9rem;
}

/* Dateiname selbst */

.upload-filename__text {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 180px;
}

/* Entfernen-Button – jetzt wie kleiner Link-Button in der Box */

.upload-remove {
  display: none;
  border: none;
  background: transparent;
  font-size: 0.8rem;
  text-decoration: underline;
  color: #555;
  cursor: pointer;
  padding: 0;
}

.upload-box.has-file .upload-remove {
  display: inline;
}

/* Fehlerzustände mit übernehmen */

.field-group--error .upload-label {
  border-color: #c00;
  background-color: #ffecec;
}

.field-group--error .upload-filename {
  color: #c00;
}

.hp-field {
  position: absolute;
  left: -9999px;
  top: -9999px;
  height: 0;
  overflow: hidden;
}
/* Feedback-Box für Serverantwort */
.form-feedback {
  margin-top: 16px;
  font-size: 0.9rem;
  padding: 12px;
  border-radius: 4px;
  display: none;
}

.form-feedback--success {
  display: block;
  background: #e6f4ea;
  color: #155724;
  border: 1px solid #c3e6cb;
}

.form-feedback--error {
  display: block;
  background: #f8d7da;
  color: #721c24;
  border: 1px solid #f5c6cb;
}

/* Vollbild-Overlay beim Senden -------------------------------------- */

.form-overlay {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

.form-overlay--visible {
  display: flex;
}

.form-overlay__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.35);
}

.form-overlay__content {
  position: relative;
  z-index: 1;
  background: #ffffff;
  padding: 24px 28px;
  border-radius: 6px;
  box-shadow: 0 10px 35px rgba(0, 0, 0, 0.3);
  min-width: 260px;
  max-width: 400px;
  text-align: center;
  font-size: 0.95rem;
}

.form-overlay__content p {
  margin: 12px 0 16px;
}

/* Spinner */

.form-overlay__spinner {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 3px solid #ddd;
  border-top-color: #c8102e;
  animation: form-overlay-spin 0.8s linear infinite;
  margin: 0 auto;
}

@keyframes form-overlay-spin {
  to {
    transform: rotate(360deg);
  }
}

/* Indeterminierter "Progressbalken" */

.form-overlay__progressbar {
  position: relative;
  width: 100%;
  height: 5px;
  background: #eee;
  overflow: hidden;
  border-radius: 999px;
}

.form-overlay__progressbar-inner {
  position: absolute;
  left: -40%;
  top: 0;
  height: 100%;
  width: 40%;
  background: #c8102e;
  animation: form-overlay-bar 1.2s ease-in-out infinite;
}

@keyframes form-overlay-bar {
  0% {
    left: -40%;
  }
  50% {
    left: 60%;
  }
  100% {
    left: 100%;
  }
}


/* Overlay-Grundlayout hast du schon:
   .form-overlay, .form-overlay--visible, .form-overlay__backdrop,
   .form-overlay__content, Spinner, Progressbar etc.
   Wir ergänzen nur die Teile für das Ergebnis-Overlay. */

.form-overlay__title {
  margin: 0 0 8px;
  font-size: 1.1rem;
}

.form-overlay__body {
  font-size: 0.95rem;
  margin-bottom: 16px;
}

/* Erfolgs-/Fehlerzustände per Klasse am Overlay selbst */

.form-overlay--success .form-overlay__title {
  color: #155724;
}

.form-overlay--error .form-overlay__title {
  color: #721c24;
}

.form-overlay--success .form-overlay__content {
  border-top: 4px solid #28a745;
}

.form-overlay--error .form-overlay__content {
  border-top: 4px solid #c82333;
}

/* Schließen-Button */

.form-overlay__close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px 16px;
  font-size: 0.9rem;
  border-radius: 4px;
  border: 1px solid #ccc;
  background: #f5f5f5;
  cursor: pointer;
}

.form-overlay__close:hover {
  background: #eaeaea;
}



.fast-geschafft {
  margin-bottom:60px;
  border:none;
  text-align:center;
   font-family: "NeueHaasUnicaPro-Light";
   font-size: 48px;
   padding:0;
}

input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

@media(max-width:430px){
  .form-block {
    padding-top:160px;
  }
}
@media(max-width:510px){
  .js-block-geraete {
    padding-top:160px;
  }
}