.modal {
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 602;
  background-color: rgba(255,255,255,0.5);
  display: flex;
  align-items: flex-start;
  justify-content: flex-start;
  overflow: auto;
  -webkit-transition: all 0.2s ease;
  -moz-transition: all 0.2s ease;
  -ms-transition: all 0.2s ease;
  -o-transition: all 0.2s ease;
  transition: all 0.2s ease;
  opacity: 0;
  -webkit-overflow-scrolling: touch;
  pointer-events: none;
}
.modal.active {
  opacity: 1 !important;
  pointer-events: all;
}
@supports ((-webkit-backdrop-filter: blur(15px)) or (backdrop-filter: blur(15px))) {
  .modal.active {
    -webkit-backdrop-filter: blur(15px);
    backdrop-filter: blur(15px);
  }
}
.modal > .window {
  position: relative;
  min-width: 100%;
  min-height: calc(100% + 1px);
  overflow-x: auto;
  display: flex;
  flex-direction: column;
  overflow: visible;
  -webkit-transition: 0.2s ease;
  -moz-transition: 0.2s ease;
  -ms-transition: 0.2s ease;
  -o-transition: 0.2s ease;
  transition: 0.2s ease;
  transition-property: transform, opacity;
  background: #fff;
}
@media only screen and (max-width: 540px) {
  .modal > .window {
    padding-top: 60px;
  }
}
.modal > .window > header {
  min-height: 60px;
  display: flex;
  justify-content: space-between;
  padding: 15px;
  background-color: #000;
  font-size: 12px;
  color: #fff;
}
.modal > .window h3 {
  max-width: calc(100% - 58px);
  color: #fff;
  font-size: 21px;
  line-height: 28px;
}
.modal > .window .close {
  position: absolute;
  top: 2px;
  right: 0;
  width: 58px;
  height: 58px;
  -webkit-transition: border-color 0.2s ease-in-out;
  -moz-transition: border-color 0.2s ease-in-out;
  -ms-transition: border-color 0.2s ease-in-out;
  -o-transition: border-color 0.2s ease-in-out;
  transition: border-color 0.2s ease-in-out;
}
.modal > .window .close::before,
.modal > .window .close::after {
  background-color: #000;
  -webkit-transition: background-color 0.2s ease-in-out;
  -moz-transition: background-color 0.2s ease-in-out;
  -ms-transition: background-color 0.2s ease-in-out;
  -o-transition: background-color 0.2s ease-in-out;
  transition: background-color 0.2s ease-in-out;
}
.modal > .window > header + .close::before,
.modal > .window > header + .close::after {
  background-color: #fff;
}
.modal > .window main {
  color: #000;
  padding: 15px;
}
@media only screen and (min-width: 540px) {
  .modal {
    padding: 40px;
  }
  .modal > .window {
    min-width: 320px;
    min-height: 280px;
    margin: auto;
  }
  .modal > .window:after {
    content: "";
    display: block;
    position: absolute;
    right: -40px;
    width: 40px;
    height: 1px;
    visibility: hidden;
  }
  .modal > .window > .close {
    position: absolute;
    top: 2px;
    right: -48px;
    width: 28px;
    height: 28px;
    border: 2px solid #fff;
    border-radius: 14px;
  }
  .modal > .window > .close::before,
  .modal > .window > .close::after {
    background-color: #fff;
    width: 14px;
    height: 2px;
    top: calc(50% - 1px);
    left: calc((100% - 14px) / 2);
  }
}
