/**
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()
*/
.drawer {
  position: fixed;
  top: 0;
  left: 0;
  opacity: 0;
  visibility: hidden;
  z-index: 39;
  pointer-events: none;
  transition: 0.3s ease;
}
.drawer.x-show {
  opacity: 1;
  visibility: visible;
  pointer-events: initial;
}

.drawer__content {
  display: block;
  position: fixed;
  top: 0;
  right: 0;
  max-width: 28.125rem;
  z-index: 41;
  width: 100%;
  height: 100%;
  transform: translateX(110%);
  background-color: #fff;
  transition: 0.3s ease;
  visibility: hidden;
}
@media only screen and (min-width: 768px) {
  .drawer__content {
    width: 28.125rem;
  }
}
.x-show .drawer__content {
  transform: translateX(0);
  visibility: visible;
}

.drawer__toggler {
  display: none;
}

.drawer__mask {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 40;
  background-color: #000;
  opacity: 0;
  transform: scale(0);
  transition: opacity 0.3s ease;
  visibility: hidden;
}
.x-show .drawer__mask {
  transform: scale(1);
  opacity: 0.2;
  visibility: visible;
}

.drawer__container {
  height: 100%;
  max-height: 100%;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
  padding: 1rem;
}
@media only screen and (min-width: 992px) {
  .drawer__container {
    padding: 1.5rem;
  }
}
.drawer__container label[for] {
  cursor: pointer;
}
.drawer__container--loading {
  position: relative;
  pointer-events: none;
  opacity: 0.8;
}
.drawer__container--loading::after {
  content: "";
  position: absolute;
  top: 5px;
  right: 5px;
  left: auto;
  bottom: auto;
  display: block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border-width: 1px;
  border-style: solid;
  border-color: black black black transparent;
  animation: loading-spinner 0.5s linear infinite;
}
.drawer__container--loading label {
  pointer-events: none !important;
}

.drawer__header {
  text-align: center;
  position: relative;
  margin-bottom: 1rem;
}
.drawer__header label {
  position: absolute;
  left: 0;
}

.drawer__header-close {
  display: inline-block;
}
@media only screen and (min-width: 992px) {
  .drawer__header-close {
    display: none;
  }
}

.drawer__close {
  background-color: transparent;
  padding: 0;
  border: 0;
  cursor: pointer;
  margin-left: auto;
  display: inline-block;
  position: absolute;
  right: 1.25rem;
  z-index: 42;
}
@media only screen and (min-width: 992px) {
  .drawer__close {
    position: relative;
    margin-bottom: 1.125rem;
    right: 0;
  }
}
.drawer__close::after {
  content: "";
  position: absolute;
  left: -0.75rem;
  top: -0.75rem;
  right: -0.75rem;
  bottom: -0.75rem;
}
