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

.contact-form-modal {
  position: fixed;
  inset: 0;
  z-index: 2000;
  overflow-y: auto;
  padding: 24px;
}

.contact-form-modal__backdrop {
  position: absolute;
  inset: 0;
}

.contact-form-modal__dialog {
  position: relative;
  z-index: 1;
  width: min(680px, calc(100vw - 48px));
  max-height: calc(100dvh - 48px);
  margin: 0 auto;
  padding: 20px 28px 24px;
  background: #0e1b42e6;
  color: #ffffff;
  overflow-y: auto;
  backdrop-filter: blur(12px);
}

.contact-form-modal__close {
  position: absolute;
  top: 8px;
  right: 12px;
  border: 0;
  background: transparent;
  color: #ffffff;
  font-size: 26px;
  cursor: pointer;
}

.contact-form-modal__title {
  margin: 0;
  text-align: center;
  font-size: 32px;
  font-weight: 700;
  line-height: 1.2;
}

.contact-form-modal__subtitle {
  margin: 12px 0 18px;
  text-align: center;
  font-size: 20px;
  font-weight: 700;
  line-height: 1.35;
}

.contact-form {
  max-width: 415px;
  margin: 0 auto;
}

.contact-form,
.contact-form * {
  box-sizing: border-box;
}

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

.contact-form__field {
  margin-bottom: 14px;
  min-width: 0;
}

.contact-form__field label {
  display: block;
  margin-bottom: 8px;
  text-align: center;
  font-size: 14px;
  font-weight: 500;
}

.contact-form__field input,
.contact-form__field select,
.contact-form__field textarea {
  display: block;
  width: 100%;
  max-width: 100%;
  border: 0;
  background: #ffffff4d;
  color: #0e1b42;
  font-size: 14px;
  padding: 8px 12px;
}

.contact-form__field input:focus,
.contact-form__field select:focus,
.contact-form__field textarea:focus {
  background: #ffffffcc;
  color: #0e1b42;
}

.contact-form__field input::placeholder {
  color: #ffffffcc;
}

.contact-form__field select {
  height: 42px;
}

.contact-form__field textarea {
  min-height: 180px;
  resize: vertical;
}

.contact-form__actions {
  margin-top: 10px;
  text-align: center;
}

.contact-form__actions button {
  min-width: 196px;
  height: 38px;
  border: 0;
  background: #ffffff;
  color: #0e1b42;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
}

.contact-form__result {
  margin: 10px 0 0;
  min-height: 20px;
  text-align: center;
  font-size: 14px;
}

@media (max-width: 767px) {
  .contact-form-modal__dialog {
    width: calc(90vw - 24px);
    max-height: calc(100dvh - 24px);
    margin: 0 auto;
    padding: 16px 12px 18px;
  }

  .contact-form-modal__title {
    font-size: 24px;
  }

  .contact-form-modal__subtitle {
    font-size: 16px;
    margin: 10px 0 14px;
  }

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

  .contact-form__field {
    margin-bottom: 10px;
  }

  .contact-form__field label {
    font-size: 13px;
    margin-bottom: 6px;
  }

  .contact-form__field input,
  .contact-form__field select,
  .contact-form__field textarea {
    font-size: 13px;
    padding: 8px 10px;
  }

  .contact-form__field select {
    height: 38px;
  }

  .contact-form__field textarea {
    min-height: 120px;
  }

  .contact-form__actions button {
    min-width: 160px;
    height: 34px;
    font-size: 13px;
  }

  .contact-form__result {
    font-size: 12px;
  }
}
