.contact {
  padding: 40px 0;
}

.contact-form {
  max-width: 560px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.contact-form__row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.contact-form__field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.contact-form__label {
  color: rgba(255, 255, 255, 0.78);
  font-size: 13px;
  font-weight: 500;
}

.contact-form input,
.contact-form textarea {
  background: #fff;
  color: var(--color-input-text);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 10px;
  padding: 14px 16px;
  font-size: 14px;
  transition:
    border 0.18s ease,
    box-shadow 0.18s ease;
  width: 100%;
  font-family: inherit;
}

.contact-form input:focus,
.contact-form textarea:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(255, 106, 42, 0.4);
}

.contact-form input.is-invalid,
.contact-form textarea.is-invalid {
  box-shadow: 0 0 0 2px #ff4f4f;
}

.contact-form textarea {
  resize: vertical;
  min-height: 130px;
}

.contact-form__consent {
  display: flex;
  align-items: center;
  gap: 12px;
  color: rgba(255, 255, 255, 0.78);
  font-size: 13px;
  cursor: pointer;
  user-select: none;
}

.contact-form__consent input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  width: 20px;
  height: 20px;
  border: 1.5px solid rgba(255, 255, 255, 0.45);
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.06);
  position: relative;
  cursor: pointer;
  flex-shrink: 0;
  margin: 0;
  padding: 0;
  transition: background 0.18s ease, border-color 0.18s ease;
}

.contact-form__consent input[type="checkbox"]:hover {
  border-color: rgba(255, 255, 255, 0.7);
}

.contact-form__consent input[type="checkbox"]:checked {
  background: var(--color-orange);
  border-color: var(--color-orange);
}

.contact-form__consent input[type="checkbox"]:checked::after {
  content: "";
  position: absolute;
  left: 6px;
  top: 2px;
  width: 5px;
  height: 10px;
  border: solid #fff;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.contact-form__consent input[type="checkbox"]:focus-visible {
  outline: 2px solid var(--color-orange);
  outline-offset: 2px;
}

.contact-form__consent input[type="checkbox"].is-invalid {
  border-color: #ff4f4f;
  box-shadow: 0 0 0 2px rgba(255, 79, 79, 0.4);
}

.contact-form__submit {
  align-self: stretch;
  margin-top: 8px;
}

.contact-form.is-hidden {
  display: none;
}

.contact-form__thanks {
  display: none;
  max-width: 560px;
  margin: 0 auto;
  background: rgba(46, 229, 166, 0.12);
  border: 1px solid rgba(46, 229, 166, 0.4);
  color: #fff;
  border-radius: 14px;
  padding: 32px;
  text-align: center;
  font-size: 16px;
}

.contact-form__thanks.is-visible {
  display: block;
}

@media (max-width: 600px) {
  .contact-form__row {
    grid-template-columns: 1fr;
  }
}
