.contact-form-modal {
  position: fixed;
  inset: 0;
  z-index: 10050;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
}

.contact-form-modal[hidden] {
  display: none;
}

.contact-form-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(27, 46, 28, 0.55);
}

.contact-form-modal__dialog {
  position: relative;
  z-index: 1;
  width: min(100%, 640px);
  max-height: calc(100vh - 48px);
  overflow: auto;
  border-radius: 16px;
  background: var(--white1);
  box-shadow: 0 24px 64px rgba(27, 46, 28, 0.24);
  padding: 32px 28px 28px;
}

.contact-form-modal__close {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 2;
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 50%;
  background: var(--grey2);
  color: var(--service-dark, #1b2e1c);
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
}

.contact-form-modal__close:hover {
  background: var(--grey1);
}

.contact-form-modal .contact-form--modal {
  display: flex;
  flex-direction: column;
  gap: 16px;
  width: 100%;
  margin: 0;
  padding: 0;
  box-shadow: none;
  background: transparent;
}

.contact-form-modal .contact-form--modal > * {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  grid-column: auto;
}

.contact-form-modal .contact-form--modal h2 {
  padding-right: 40px;
}

.contact-form-modal__select-label {
  display: block;
}

.contact-form-modal__select {
  width: 100%;
  appearance: none;
  background-color: var(--white1);
  cursor: pointer;
}

.contact-form-modal__select:valid {
  color: var(--black1);
}

body.contact-form-modal-open {
  overflow: hidden;
}

@media screen and (max-width: 640px) {
  .contact-form-modal__dialog {
    padding: 24px 18px 20px;
    border-radius: 12px;
  }

  .contact-form-modal .contact-form--modal h2 {
    font-size: 24px;
    line-height: 30px;
    padding-right: 36px;
  }

  .contact-form-modal .contact-form--modal .subheading {
    font-size: 14px;
    line-height: 21px;
  }
}
