.mf-popup-window {
  position: fixed;
  top: 0;
  left: 0;
  height: 100%;
  width: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 110;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.2s ease-in-out;
  box-sizing: border-box;
	display: none;
}

.mf-popup-window * {
  box-sizing: border-box;
}

.mf-popup-window.active {
  pointer-events: all;
  opacity: 1;
	display:block
}

.mf-popup-container {
  height: 100%;
  display: flex;
  width: 100%;
  align-items: center;
  transform: translateY(-100vh);
  padding-left: 10px;
  padding-right: 10px;
  transition: all 0.2s ease-in-out;
}

.mf-popup-window.active .mf-popup-container {
  transform: translateY(0vh);
}

.mf-popup-form-container {
  background-color: #fff;
  max-width: 450px;
  padding-top: 1.5rem;
  padding-bottom: 0.5rem;
  max-height: calc(100vh - 12rem);
  margin-left: auto;
  margin-right: auto;
  position: relative;
  border-radius: 12px;
  display: flex;
  flex-direction: column;
}

.mf-popup-form-container > * {
  padding-left: 1.5rem;
  padding-right: 1.5rem;
}

.mf-popup-form {
  overflow: auto;
  width: 100%;
  height: 100%;    
  padding: 1rem 1.5rem 1.5rem;
  border-top: solid 1px var(--color-gray-bright);
}

.mf-popup-close {
  display: flex;
  justify-content: center;
  align-items: center;
  position: absolute;
  top: -3rem;
  right: 0;
  font-size: 2rem;
  color: #fff;
  width: 2rem;
  height: 2rem;
  transition: all 0.2s ease-in-out;
  cursor: pointer;
  padding: 0;
}

.mf-popup-close:hover {
  transform: rotate(180deg);
  color: #343a40;
  background: #fff;
  border-radius: 40px;
}

@media screen and (min-width: 768px) {
  .mf-popup-close {
    right: -2rem;
  }
  .mf-popup-form-container{
    padding-top: 2.5rem;
    padding-bottom:1rem
  }
  .mf-popup-form-container > *:not(.mf-popup-close) {
    padding-left: 2.5rem;
    padding-right: 2.5rem;
}
}

.mf-popup-form-container.mf-popup-form-container-wide{
  max-width: calc(100% - 5rem);
  width: 800px;
}