/* Restore the existing site controls on source-reconstructed CF7 forms only. */
.gradomir-recovered-form {
  min-width: 0;
  gap: 20px;
}

.gradomir-recovered-form .form-row,
.gradomir-recovered-form .form-input-wrapper,
.gradomir-recovered-form .wpcf7-form-control-wrap {
  min-width: 0;
}

.gradomir-recovered-form .form-input-wrapper {
  flex: 1 1 auto;
}

.gradomir-recovered-form .form-input-wrapper > label,
.gradomir-recovered-form .form-input-wrapper .wpcf7-form-control-wrap {
  display: block;
}

.gradomir-recovered-form .form-input-wrapper > label > .visually-hidden {
  position: static;
  display: block;
  width: auto;
  height: auto;
  margin: 0 0 6px;
  overflow: visible;
  clip: auto;
  clip-path: none;
  white-space: normal;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.5;
}

.gradomir-recovered-form .form-field {
  display: block;
  box-sizing: border-box;
  min-width: 0;
  min-height: 55px;
  color: var(--color-text-primary, #20252b);
  line-height: 1.4;
  transition: border-color 150ms ease, background-color 150ms ease;
}

.gradomir-recovered-form textarea.form-field {
  height: 110px;
  min-height: 110px;
  resize: vertical;
}

.gradomir-recovered-form .form-field:focus-visible {
  outline: 2px solid var(--color-accent, #e20d18);
  outline-offset: 3px;
}

.gradomir-recovered-form > .form-row:last-child {
  position: relative;
  align-items: center;
}

.gradomir-recovered-form > .form-row:last-child > .button {
  flex: 0 0 auto;
  min-width: 180px;
  max-width: 100%;
}

.gradomir-recovered-form .form-checkbox {
  min-width: 0;
  min-height: 0;
}

.gradomir-recovered-form .form-checkbox label {
  min-height: 24px;
}

.gradomir-recovered-form .form-checkbox__input + span {
  max-width: 100%;
  line-height: 1.5;
}

.gradomir-recovered-form .form-checkbox a {
  white-space: normal;
}

/* The invisible CF7 spinner must not become a stretched flex column. */
.gradomir-recovered-form > .form-row > .wpcf7-spinner {
  position: absolute;
  inset-inline-start: 146px;
  top: 16px;
  width: 24px;
  min-height: 24px;
  margin: 0;
  pointer-events: none;
}

.broker .gradomir-recovered-form .form-checkbox label,
.broker .gradomir-recovered-form .form-checkbox a {
  color: #fff;
}

.broker .gradomir-recovered-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.broker .gradomir-recovered-form > .form-row {
  grid-column: 1 / -1;
}

.broker .gradomir-recovered-form > .form-row:nth-child(-n + 2) {
  grid-column: auto;
}

.broker .gradomir-recovered-form .form-checkbox__input + span::before {
  border-color: #fff;
}

.broker .gradomir-recovered-form .form-field:focus-visible,
.broker .gradomir-recovered-form .form-checkbox a:focus-visible,
.broker .gradomir-recovered-form .form-checkbox__input:focus-visible + span::before {
  outline: 2px solid #fff;
  outline-offset: 3px;
}

.gradomir-recovered-form .gradomir-contact-preference > summary {
  min-height: 44px;
}

.home-consultation .gradomir-recovered-form > .form-row:last-child {
  flex-direction: column;
  align-items: stretch;
  gap: 16px;
}

.home-consultation .gradomir-recovered-form > .form-row:last-child > * {
  width: 100%;
}

.home-consultation .gradomir-recovered-form > .form-row > .wpcf7-spinner {
  inset-inline-start: auto;
  inset-inline-end: 16px;
  width: 24px;
}

.expert-consultation .gradomir-recovered-form .wpcf7-not-valid-tip {
  position: static !important;
  width: auto !important;
  height: auto !important;
  margin: 6px 0 0 !important;
  padding: 6px 10px !important;
  overflow: visible !important;
  clip: auto !important;
  clip-path: none !important;
  white-space: normal !important;
  border-radius: 4px;
  background: #fff5f5;
  color: #9d2231;
  font-size: 13px;
  line-height: 1.5;
}

@media (max-width: 998px) {
  .gradomir-recovered-form > .form-row:last-child > .button {
    width: 100%;
  }

  .gradomir-recovered-form > .form-row > .wpcf7-spinner {
    inset-inline-start: auto;
    inset-inline-end: 16px;
  }
}

@media (max-width: 600px) {
  .gradomir-recovered-form {
    gap: 16px;
  }

  .gradomir-recovered-form .form-field {
    font-size: 16px;
  }

  .broker .gradomir-recovered-form {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (forced-colors: active) {
  .gradomir-recovered-form .form-field:focus-visible,
  .broker .gradomir-recovered-form .form-field:focus-visible,
  .broker .gradomir-recovered-form .form-checkbox a:focus-visible,
  .broker .gradomir-recovered-form .form-checkbox__input:focus-visible + span::before {
    outline-color: Highlight;
  }
}
