.aimed-modal-open {
  overflow: hidden;
}

.aimed-form-modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: none;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.aimed-form-modal.is-open {
  display: block;
}

.aimed-form-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(3, 24, 45, 0.68);
  backdrop-filter: blur(2px);
}

.aimed-form-modal__dialog {
  position: relative;
  width: min(760px, calc(100% - 24px));
  margin: 5vh auto;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 30px 90px rgba(2, 24, 44, 0.35);
  overflow: hidden;
  max-height: calc(100dvh - 10vh);
  display: flex;
  flex-direction: column;
}

.aimed-form-modal__head {
  font-size: 1.1rem;
  font-weight: 700;
  color: #0f3868;
  padding: 16px 56px 14px 16px;
  border-bottom: 1px solid #e6ecf4;
  background: #f8fbff;
}

.aimed-form-modal__form {
  padding: 16px;
  overflow-y: auto;
}

.aimed-form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.aimed-form-modal label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 0.9rem;
  color: #184170;
  font-weight: 600;
}

.aimed-form-modal input,
.aimed-form-modal select,
.aimed-form-modal textarea {
  border: 1px solid #c7d7ea;
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 0.96rem;
  color: #102f52;
  background: #fff;
}

.aimed-form-modal input:focus,
.aimed-form-modal select:focus,
.aimed-form-modal textarea:focus {
  outline: none;
  border-color: #1477cc;
  box-shadow: 0 0 0 3px rgba(20, 119, 204, 0.15);
}

.aimed-form-full {
  margin-top: 12px;
}

.aimed-form-consent {
  margin-top: 12px;
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  gap: 8px;
  font-size: 0.84rem;
  font-weight: 500;
  color: #2b4869;
}

.aimed-form-consent input {
  margin-top: 2px;
}

.aimed-form-actions {
  margin-top: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.aimed-form-submit {
  border: 0;
  border-radius: 10px;
  padding: 12px 14px;
  font-size: 1rem;
  font-weight: 700;
  color: #fff;
  background: #0f4f8a;
  cursor: pointer;
}

.aimed-form-submit:disabled {
  opacity: 0.6;
  cursor: wait;
}

.aimed-form-status {
  min-height: 1.2em;
  font-size: 0.88rem;
  margin: 0;
}

.aimed-form-status.is-loading {
  color: #425f83;
}

.aimed-form-status.is-success {
  color: #0a7a42;
  font-weight: 600;
}

.aimed-form-status.is-error {
  color: #aa2a2a;
  font-weight: 600;
}

.aimed-form-modal__close {
  position: absolute;
  top: 10px;
  right: 12px;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 999px;
  background: #eaf2fd;
  color: #0f3868;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
}

@media (max-width: 720px) {
  .aimed-form-modal__dialog {
    width: calc(100% - 16px);
    margin: 8px auto;
    max-height: calc(100dvh - 16px);
    border-radius: 12px;
  }

  .aimed-form-modal__head {
    padding: 14px 52px 12px 14px;
    font-size: 1rem;
  }

  .aimed-form-modal__form {
    padding: 14px;
  }

  .aimed-form-grid {
    grid-template-columns: 1fr;
  }

  .aimed-form-modal textarea {
    min-height: 92px;
  }
}
