html.mf-open {
  overflow: hidden;
}

.mf-overlay {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background-color: rgba(37, 45, 94, .55);
  opacity: 0;
  transition: opacity .3s ease;
}

.mf-overlay[hidden] {
  display: none;
}

.mf-overlay.mf-visible {
  opacity: 1;
}

.mf-dialog {
  position: relative;
  width: 100%;
  max-width: 440px;
  max-height: calc(100vh - 32px);
  overflow-y: auto;
  padding: 40px 32px 32px;
  border-top: 5px solid var(--highlights, #93c22b);
  border-radius: 5px;
  background-color: var(--beige, #fef9e6);
  color: var(--main, #252d5e);
  text-align: center;
  box-shadow: 0 20px 50px rgba(0, 0, 0, .25);
  transform: translateY(20px);
  transition: transform .3s ease;
}

.mf-overlay.mf-visible .mf-dialog {
  transform: translateY(0);
}

.mf-dialog.mf-error {
  border-top-color: #c0392b;
}

.mf-title {
  margin: 0 0 12px;
  font-family: Cormorant, sans-serif;
  font-size: 32px;
  font-weight: 600;
  line-height: 1.2;
}

.mf-text {
  margin: 0 0 28px;
  font-size: 15px;
}

.mf-close {
  min-width: 140px;
  padding: 12px 30px;
}

.mf-x {
  position: absolute;
  top: 8px;
  right: 10px;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--main, #252d5e);
  font-size: 30px;
  line-height: 40px;
  cursor: pointer;
}

.mf-x:hover,
.mf-x:focus-visible {
  color: var(--highlights, #93c22b);
}

[data-mailform] [type="submit"]:disabled {
  opacity: .6;
  cursor: wait;
}

@media screen and (max-width: 479px) {
  .mf-dialog {
    padding: 36px 20px 24px;
  }

  .mf-title {
    font-size: 26px;
  }

  .mf-close {
    width: 100%;
  }
}
