.contact-form {
  margin-top: 16px;
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
}

.contact-form::after {
  content: "";
  display: block;
  clear: both;
}

.contact-form fieldset {
  border: 0;
  padding: 0;
  margin: 0;
}

.contact-form .col-50 {
  box-sizing: border-box;
  flex: 1 1 calc(50% - 9px);
  width: calc(50% - 9px);
}

.contact-form .form-card {
  width: 100%;
}

.contact-form .formbuilder-heading,
.contact-form .form-actions {
  width: 100%;
}

.formbuilder h2 {
    text-align: center;
    text-transform: uppercase;
}

.formbuilder__intro {
    text-align: center;
}

.formbuilder__intro p {
    margin: 0 auto;
}
.contact-form input,
.contact-form textarea,
.contact-form select {
  width: 100%;
  font-size: 16px;
  padding: 12px 14px;
  background: transparent;
  border-radius: 12px;
  border: 1px solid #d1d5db;
  color: #1d1d1b;
  transition: border-color 150ms ease, box-shadow 150ms ease, background-color 150ms ease;
}

.contact-form input,
.contact-form select {
  height: 44px;
  line-height: 1.2;
  padding: 0 14px;
  box-sizing: border-box;
}

.contact-form textarea {
  min-height: 70px;
  resize: vertical;
  box-sizing: border-box;
  font-family: inherit;
  font-size: inherit;
}

.contact-form input::placeholder,
.contact-form textarea::placeholder {
  color: #6b7280;
}

.contact-form input:focus,
.contact-form textarea:focus,
.contact-form select:focus {
  outline: none;
  border-color: #17c117;
  background: transparent;

  box-shadow: 0 0 0 3px rgba(22, 163, 74, 0.18);
}

.contact-form .custom-select select {
  appearance: none;
  background-image: url("data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%23777' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 38px;
}

.contact-form input[type="checkbox"] {
  width: 18px;
  height: 18px;
  margin-right: 8px;
  accent-color: #17c117;
  transform: translateY(3px);
}

.contact-form input[type="radio"] {
  width: 18px;
  height: 18px;
  margin-right: 8px;
  accent-color: #17c117;
}

.contact-form input[name="privacy"] + label {
  font-size: 14px;
  line-height: 1.4;
  display: inline-block;
  color: #1d1d1b !important;
  flex: 1;
  min-width: 0;
}

.contact-form input[name="privacy"] + label a {
  color: #1d1d1b !important;
}

/* Datenschutz: Checkbox und Label in einer Zeile, links ausgerichtet */
.contact-form .form-privacy-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.contact-form .form-privacy-row input[type="checkbox"] {
  margin-right: 0;
  flex-shrink: 0;
  margin-top: 2px;
}

.contact-form.closed {
  display: block;
}

.contact-form.closed .form-hidden,
.contact-form.closed .form-card,
.contact-form.closed .form-recaptcha,
.contact-form.closed .form-actions,
.contact-form.closed .form-note {
  display: none !important;
}

.contact-form.closed .msg_success {
  display: block !important;
  margin: 0 auto;
}

.contact-form .loader {
  display: none;
}

.contact-form.loading .loader {
  display: inline-block;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid rgba(0, 0, 0, 0.2);
  border-top-color: #17c117;
  animation: spin 0.8s linear infinite;
  margin-left: 12px;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.form-card {

  border: 1px solid #ededed;
  border-radius: 16px;
  padding: 18px 20px;
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.04);
}

.formcard label p {
    margin-bottom: 7px;
}

.formbuilder-heading {
  margin: 8px 0;
}

.formbuilder-heading h3 {
  margin: 0;
  font-size: 20px;
  font-weight: 700;
  color: #1d1d1b;
}

.theme-dark .formbuilder-heading h3 {
  color: #f8fafc;
}

.form-card__header h3 {
  margin: 0 0 6px;
  font-size: 18px;
  font-weight: 600;
}

.form-card__header p {
  margin: 0 0 12px;
  color: #6b6b6b;
  font-size: 14px;
}

.form-card__body {
  display: block;
}

.checkbox-group {
  display: grid;
  gap: 14px 24px;
}

.checkbox-item {
  display: flex;
  gap: 10px;
  align-items: center;
  font-size: 1rem;
  margin-top: 10px;
}

.field-error {
  display: block;
  margin-top: 8px;
  color: #b42318;
  font-size: 13px;
}

.required {
  color: #dc2626;
  margin-left: 6px;
}

.form-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  gap: 16px;
}

.form-actions .form-note {
  position: absolute;
  right: 0;
  margin: 0;
  font-size: 13px;
  color: #8a8a8a;
}

.form-actions__submit {
  display: flex;
  align-items: center;
  gap: 16px;
}

.form-note {
  margin: 0;
  font-size: 13px;
  color: #8a8a8a;
}

.form-hidden {
  position: absolute;
  left: -10000px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.contact-form .msg_success {
  color: #17c117;
  font-weight: 600;
  text-align: center;
  margin: 1em 0;
}

.msg_success {
    text-align: center;
    margin: 0;
    display: block;
    font-weight: 600;
    font-size: 1.5rem;
    color: #17c117;
}

.contact-form .msg_success.is-error {
  color: #b42318;
}

.theme-dark .contact-form input,
.theme-dark .contact-form textarea,
.theme-dark .contact-form select {
  border-color: #3b3b3b;
  color: #f1f5f9;
}

.theme-dark .contact-form input::placeholder,
.theme-dark .contact-form textarea::placeholder {
  color: #94a3b8;
}

.theme-dark .contact-form input:focus,
.theme-dark .contact-form textarea:focus,
.theme-dark .contact-form select:focus {
  border-color: #22c55e;
  box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.22);
}

.theme-dark .contact-form .custom-select select {
  background-image: url("data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%23b0b0b0' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}

.theme-dark .contact-form input[name="privacy"] + label {
  color: #ccc !important;
}

.theme-dark .form-card {
  border-color: transparent;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.4);
}


.theme-dark .form-card__header p,
.theme-dark .form-note {
  color: #94a3b8;
}

.theme-dark .field-error {
  color: #fca5a5;
}

@media screen and (max-width: 767px) {
  .contact-form .col-50 {
    flex: 1 1 100%;
    width: 100%;
  }
}

@media screen and (max-width: 640px) {
  .checkbox-group {
    grid-template-columns: 1fr;
  }
}


.theme-dark .contact-form input,
.theme-dark .contact-form textarea,
.theme-dark .contact-form select {
    border-color: #3b3b3b;
    color: #f1f5f9;
  }

  .theme-dark .contact-form input::placeholder,
  .theme-dark .contact-form textarea::placeholder {
    color: #94a3b8;
  }

  .theme-dark .contact-form input:focus,
  .theme-dark .contact-form textarea:focus,
  .theme-dark .contact-form select:focus {
    border-color: #22c55e;
    box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.22);
  }

  .contact-form .custom-select select {
    background-image: url("data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%23b0b0b0' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  }

  .contact-form input[name="privacy"] + label {
    color: #ccc !important;
  }

  .form-card {
    border-color: transparent;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.4);
  }

  .formbuilder-heading h3 {
    color: #1d1d1b;
  }

  .theme-dark .form-card__header h3 {
    color: #f8fafc;
  }

  .form-card__header p,
  .form-note {
    color: #94a3b8;
  }

  .field-error {
    color: #fca5a5;
  }

