/* Form */

#kontaktformular {
  scroll-margin-top: 80px;
}

.form-content {
  direction: ltr;
}

.form-content h2 {
  text-align: center;
}

.kontakt form.form {
  background: #fff;
  border-radius: 10px;
  padding: 28px 24px;
  box-shadow: 0 2px 14px rgba(0, 0, 0, 0.06);
}

.form_title {
  text-align: center;
  font-size: 18px;
  margin-bottom: 20px;
}

.form_step-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 20px;
}

.form_step-label {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 500;
  color: #3a3f45;
  white-space: nowrap;
}

.form_step-label b {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  background: #eceff1;
  border: 1px solid #dde1e5;
}

.form_step-label--current {
  font-weight: 600;
  color: #2a2f34;
}

.form_step-label--current b {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

.form_step-panel {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px 16px;
}

.form_step-panel input,
.form_step-panel select {
  width: 100%;
  min-height: 42px;
  padding: 9px 12px;
  border: 1px solid #e0e3e7;
  border-radius: 5px;
  background: #fff;
  font-size: 14px;
}

.form_step-panel select {
  appearance: none;
  padding-right: 36px;
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath fill='%23495057' d='M1.2 0L5 3.8 8.8 0 10 1.2l-5 4.8L0 1.2z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 11px center;
}

.form_step-panel input:focus-visible,
.form_step-panel select:focus-visible {
  outline: none;
  border-color: #b8bec5;
}

.form_step-panel input.form_field--invalid,
.form_step-panel select.form_field--invalid {
  border-color: #c62828;
  background: rgba(198, 40, 40, 0.04);
}

.form_file-drop {
  grid-column: 1 / -1;
}

.form_file-drop label {
  display: block;
  padding: 12px 16px;
  text-align: center;
  font-weight: 600;
  color: var(--primary);
  background: #f0f4f8;
  border: 1px dashed #e2e8ee;
  border-radius: 5px;
  cursor: pointer;
}

.form_file-drop label:hover {
  border-color: var(--accent);
}

.form_progress-track {
  height: 6px;
  background: #e2e8ee;
  border-radius: 999px;
  overflow: hidden;
}

.form_progress-fill {
  height: 100%;
  width: 0;
  background: var(--accent);
  transition: width 0.3s;
}

.form_progress-value {
  display: block;
  margin-top: 6px;
  font-size: 13px;
  color: #5c6670;
  text-align: center;
}

.form_actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: space-between;
  margin-top: 24px;
}

.form_btn--submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 1 1 160px;
  max-width: 224px;
  min-height: 44px;
  margin-left: auto;
  padding: 10px 20px;
  font-size: 15px;
  font-weight: 700;
  color: #fff;
  background: var(--accent);
  border: 0;
  border-radius: 5px;
  cursor: pointer;
  transition: 0.2s ease;
}

.form_btn--submit:hover {
  background: #e55f12;
}

.form_btn--submit:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

.form_actions:has(.form_btn--back.hidden) {
  justify-content: center;
}

.form_actions:has(.form_btn--back.hidden) .form_btn--submit {
  width: 100%;
  max-width: none;
  margin-left: 0;
}

.form_btn--back {
  min-height: 44px;
  padding-inline: 20px;
  border: 1px solid #e2e8ee;
  border-radius: 5px;
  background: #fff;
  cursor: pointer;
}

.form_error,
.form_success {
  margin-bottom: 16px;
  padding: 10px 14px;
  border-radius: 5px;
  font-size: 14px;
  text-align: center;
}

.form_error {
  background: rgba(204, 0, 0, 0.08);
  color: #a30000;
}

.form_success {
  background: rgba(4, 218, 141, 0.12);
  color: #027a52;
}

@media (min-width: 900px) {
  section.form .split {
    grid-template-columns: 1.05fr 0.95fr;
    align-items: start;
  }
}

@media (max-width: 520px) {
  .form_step-row,
  .form_step-panel {
    grid-template-columns: 1fr;
  }

  .form_step-label {
    justify-content: flex-start;
  }

  .form_actions {
    flex-direction: column;
    align-items: stretch;
  }

  .form_btn--submit {
    width: 100%;
    max-width: 352px;
    margin-inline: auto;
  }
}
