/**
Include icons in scss/css.
Usage: 
 @include icon(close);
*/
/*
Media query mixin.
Usage: 
@include media($bp-l, min)
*/
/*
Mixin to add loading spinner to button/element.
Usage: 
@include loading()
*/
.modal {
  display: flex !important;
  visibility: hidden;
  opacity: 0;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  transition: all 0.3s;
  background-color: rgba(0, 0, 0, 0.3);
  align-items: center;
  justify-content: center;
  z-index: 50;
}
@media only screen and (max-width: 767px) {
  .modal--mobile-dock {
    align-items: flex-end;
  }
}
.modal:target, .modal--active {
  visibility: visible;
  opacity: 1;
}
.modal--slide-out {
  justify-content: flex-end;
}

.modal__underlay {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  bottom: 0;
  text-indent: -125rem;
}

.modal__window {
  background-color: white;
  width: calc(100% - 1.25rem);
  max-width: 31rem;
  max-height: 100%;
  position: relative;
  overflow: hidden;
  transition: 0.3s ease;
}
@media only screen and (max-width: 767px) {
  .modal--mobile-dock .modal__window {
    max-width: unset !important;
    width: 100%;
    transform: translateY(100%);
    transition: transform 0.3s;
  }
  .modal--mobile-dock:target .modal__window {
    transform: translateY(0);
  }
}
@media only screen and (min-width: 992px) {
  .modal__window {
    border-radius: 2.5rem;
  }
}
.modal--slide-out .modal__window {
  height: 100%;
  border-radius: 0;
  transform: translateX(110%);
}
@media only screen and (max-width: 767px) {
  .modal--slide-out .modal__window {
    max-width: unset;
    width: 100%;
  }
}
.modal--slide-out:target .modal__window, .modal--slide-out.modal--active .modal__window {
  transform: translateX(0);
}

.modal__window-content {
  overflow: auto;
  max-height: 100vh;
  padding: 2.5rem;
  box-sizing: border-box;
}
@media only screen and (max-width: 767px) {
  .modal__window-content {
    padding: 2.5rem 1rem;
  }
}

.modal__close {
  width: 2rem;
  height: 2rem;
  right: 1.5rem;
  top: 1.5rem;
  display: block;
  overflow: hidden;
  text-indent: -62.5rem;
  transition: transform 0.3s;
  position: absolute;
}
.modal__close::before, .modal__close::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  bottom: 0;
  width: 0.875rem;
  height: 1px;
  background-color: black;
  transform: rotateZ(-45deg);
  margin: auto;
}
.modal__close::before {
  transform: rotateZ(45deg);
}
.modal__close:hover {
  transform: rotateZ(90deg);
}

.modal__title {
  font-size: 1.25rem;
  line-height: 140%;
  font-weight: 600;
  letter-spacing: -0.025rem;
  margin-bottom: 1.5rem;
  text-align: center;
}
@media only screen and (min-width: 992px) {
  .modal__title {
    font-size: 1.5rem;
    line-height: 140%;
    font-weight: 600;
    letter-spacing: -0.025rem;
  }
}
