/* Responsive repair for the nested Bootstrap structure used by the quote form. */
form.wpcf7-form > .row {
  display: block !important;
  width: 100% !important;
  max-width: 100% !important;
  margin-right: auto !important;
  margin-left: auto !important;
}

form.wpcf7-form > .row > .col-md-4.col-sm-6 {
  display: block !important;
  float: none !important;
  width: 100% !important;
  max-width: 860px !important;
  margin-right: auto !important;
  margin-left: 0 !important;
  padding-right: 0 !important;
  padding-left: 0 !important;
  box-sizing: border-box !important;
}

form.wpcf7-form > .row > .col-md-4.col-sm-6 > .row {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 24px 36px !important;
  width: 100% !important;
  max-width: 860px !important;
  margin: 0 !important;
}

form.wpcf7-form > .row > .col-md-4.col-sm-6 > .row > .col-md-4 {
  display: block !important;
  float: none !important;
  width: 100% !important;
  max-width: none !important;
  padding: 0 !important;
  box-sizing: border-box !important;
}

form.wpcf7-form > .row > .col-md-4.col-sm-6 > .row > .col-md-4:nth-child(3) {
  grid-column: 1 / -1 !important;
  width: 100% !important;
  max-width: 860px !important;
  margin: 0 !important;
}

form.wpcf7-form .inp {
  width: 100% !important;
  margin-bottom: 16px !important;
  box-sizing: border-box !important;
}

form.wpcf7-form input:not([type="checkbox"]):not([type="radio"]):not([type="submit"]):not([type="hidden"]),
form.wpcf7-form textarea,
form.wpcf7-form select {
  width: 100% !important;
  max-width: 100% !important;
  min-height: 44px !important;
  box-sizing: border-box !important;
}

form.wpcf7-form > .row > .col-md-4.col-sm-6 > .row > .col-md-4:nth-child(3) .wpcf7-checkbox {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 10px 24px !important;
  width: 100% !important;
}

form.wpcf7-form .wpcf7-list-item {
  margin-left: 0 !important;
}

@media (min-width: 768px) {
  form.wpcf7-form > .row > .col-md-4.col-sm-6 > .row > .col-md-4:nth-child(1) {
    grid-column: 1 !important;
    grid-row: 1 !important;
    align-self: start !important;
  }

  form.wpcf7-form > .row > .col-md-4.col-sm-6 > .row > .col-md-4:nth-child(2) {
    grid-column: 2 !important;
    grid-row: 1 !important;
    align-self: start !important;
  }

  form.wpcf7-form > .row > .col-md-4.col-sm-6 > .row > .col-md-4:nth-child(3) {
    grid-column: 1 / -1 !important;
    grid-row: 2 !important;
    align-self: start !important;
  }
}

@media (max-width: 767px) {
  form.wpcf7-form > .row > .col-md-4.col-sm-6 > .row {
    grid-template-columns: 1fr !important;
    gap: 16px !important;
  }

  form.wpcf7-form > .row > .col-md-4.col-sm-6 > .row > .col-md-4,
  form.wpcf7-form > .row > .col-md-4.col-sm-6 > .row > .col-md-4:nth-child(3) {
    grid-column: 1 / -1 !important;
    width: 100% !important;
    max-width: 100% !important;
  }

  form.wpcf7-form > .row > .col-md-4.col-sm-6 > .row > .col-md-4:nth-child(3) .wpcf7-checkbox {
    grid-template-columns: 1fr !important;
    gap: 8px !important;
  }
}
