/* Global form styling/validation helpers. */
.wpcf7-form {
  display: grid;
  gap: 13px;
}

.wpcf7-form label {
  display: grid;
  gap: 6px;
}

.wpcf7-form input:not([type="checkbox"]):not([type="radio"]),
.wpcf7-form textarea,
.wpcf7-form select {
  width: 100%;
  font: inherit;
  padding: 12px 10px;
  border: 1px solid #b9baca;
  border-radius: 7px;
  box-sizing: border-box;
  background: #fff;
  color: inherit;
  outline: none;
}

.wpcf7-form input:not([type="checkbox"]):not([type="radio"]):focus,
.wpcf7-form textarea:focus,
.wpcf7-form select:focus {
  border-color: #5d628f;
}

.wpcf7-form p {
  margin: 0;
}

/* Согласие CF7. Не используем внешний <label>, потому что CF7 сам генерирует label. */
.wpcf7-form .request-consent {
  margin: 4px 0 2px;
}

.wpcf7-form .request-consent .wpcf7-form-control-wrap,
.wpcf7-form .request-consent .wpcf7-form-control,
.wpcf7-form .request-consent .wpcf7-list-item {
  display: block;
  margin: 0;
}

.wpcf7-form .request-consent .wpcf7-list-item > label {
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr);
  align-items: start;
  gap: 10px;
  cursor: pointer;
}

.wpcf7-form .request-consent input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  width: 20px;
  height: 20px;
  min-width: 20px;
  margin: 1px 0 0;
  border: 1px solid #9ea1b3;
  border-radius: 4px;
  background: #fff;
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: border-color .18s ease, background-color .18s ease;
}

.wpcf7-form .request-consent input[type="checkbox"]::before {
  content: '';
  width: 9px;
  height: 5px;
  border-right: 2px solid #fff;
  border-bottom: 2px solid #fff;
  transform: translateY(-1px) rotate(45deg) scale(0);
  transition: transform .14s ease;
}

.wpcf7-form .request-consent input[type="checkbox"]:checked {
  border-color: #5d628f;
  background: #5d628f;
}

.wpcf7-form .request-consent input[type="checkbox"]:checked::before {
  transform: translateY(-1px) rotate(45deg) scale(1);
}

.wpcf7-form .request-consent input[type="checkbox"]:focus-visible {
  outline: 2px solid rgba(93, 98, 143, .25);
  outline-offset: 2px;
}

.wpcf7-form .request-consent .wpcf7-list-item-label {
  font-size: 16px;
  line-height: 1.4;
  color: #2f3038;
}

.wpcf7-form .request-consent a {
  color: inherit;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.wpcf7-form .request-consent a:hover {
  text-decoration-thickness: 2px;
}

.wpcf7-form .wpcf7-submit {
  cursor: pointer;
}

.wpcf7-not-valid-tip {
  margin-top: 4px;
  font-size: .8rem;
}

@media (max-width: 700px) {
  .wpcf7-form .request-consent .wpcf7-list-item-label {
    font-size: 14px;
  }
}
