.modal {
  display: block;
  overflow: hidden;
  position: fixed;
  top: 0;
  width: 0;
  height: 100%;
  visibility: hidden;
  transition: all 0.9s cubic-bezier(0.74, 0, 0.24, 0.99);
  z-index: 100001;
}

[dir=ltr] .modal {
  right: 0;
}

[dir=rtl] .modal {
  left: 0;
}

.modal.is-active {
  width: 100%;
  visibility: visible;
}

.modal__bg {
  display: block;
  position: absolute;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(23, 64, 117, 0.85);
  backdrop-filter: blur(10px);
}

[dir=ltr] .modal__bg {
  left: 0;
}

[dir=rtl] .modal__bg {
  right: 0;
}

.ui-light .modal__bg {
  opacity: .75;
}

[dir].ui-light .modal__bg {
  background-color: var(--primary-text-color);
}

[dir].ui-dark .modal__bg {
  background-color: var(--primary-bg-color);
}

.modal__container {
  position: absolute;
  top: 0;
  width: 100vw;
}

[dir=ltr] .modal__container {
  right: 0;
}

[dir=rtl] .modal__container {
  left: 0;
}

.modal__close {
  position: absolute;
  z-index: 3;
  font-size: var(--heading-6-font-size);
  opacity: 0;
  color: #fff;
}

[dir=ltr] .modal__close {
  animation-timing-function: cubic-bezier(0.17, 0.67, 0.54, 1);
  animation-duration: .3s;
  animation-delay: .7s;
  animation-fill-mode: both;
}

[dir=rtl] .modal__close {
  animation-timing-function: cubic-bezier(0.17, 0.67, 0.54, 1);
  animation-duration: .3s;
  animation-delay: .7s;
  animation-fill-mode: both;
}

.ui-light .modal__close:hover, .ui-light .modal__close:active, .ui-light .modal__close.is-active,
.ui-dark .modal__close:hover,
.ui-dark .modal__close:active,
.ui-dark .modal__close.is-active {
  color: rgba(255, 255, 255, 0.5);
}

@keyframes closeButtonBottomShow-ltr {
  from {
    opacity: 0;
    transform: translateX(-50%);
  }
  to {
    opacity: 1;
    transform: translate(-50%, 12px);
  }
}

@keyframes closeButtonBottomShow-rtl {
  from {
    opacity: 0;
    transform: translateX(50%);
  }
  to {
    opacity: 1;
    transform: translate(50%, 12px);
  }
}

@keyframes closeButtonLeftShow-ltr {
  from {
    opacity: 0;
    transform: translateX(0);
  }
  to {
    opacity: 1;
    transform: translateX(-12px);
  }
}

@keyframes closeButtonLeftShow-rtl {
  from {
    opacity: 0;
    transform: translateX(0);
  }
  to {
    opacity: 1;
    transform: translateX(12px);
  }
}

.modal__content {
  position: absolute;
}

[dir] .modal__content {
  background-color: var(--primary-bg-color);
}

.modal__content--center {
  width: calc(100% - 24px);
  max-width: 668px;
  top: 50vh;
}

[dir] .modal__content--center {
  border-radius: var(--border-radius-base);
  padding-top: 32px;
  padding-bottom: 32px;
}

[dir=ltr] .modal__content--center {
  left: 50vw;
  transform: translate(-50%, -50%);
}

[dir=rtl] .modal__content--center {
  right: 50vw;
  transform: translate(50%, -50%);
}

@media only screen and (min-width: 568px), (min-aspect-ratio: 13 / 9) {
  [dir] .modal__content--center {
    padding-top: 48px;
    padding-bottom: 48px;
  }
}

@media only screen and (min-width: 568px) and (max-aspect-ratio: 13 / 9), only screen and (min-width: 668px) and (min-height: 416px), only screen and (min-width: 980px) {
  [dir] .modal__content--center {
    padding-top: 80px;
    padding-bottom: 80px;
  }
}

.modal__content--center .modal__close {
  top: 12px;
  color: var(--link-color);
}

[dir] .modal__content--center .modal__close {
  transform: translateY(100%);
}

[dir=ltr] .modal__content--center .modal__close {
  right: 0;
  margin-left: 8px;
}

[dir=rtl] .modal__content--center .modal__close {
  left: 0;
  margin-right: 8px;
}

[dir=ltr] .modal.is-active .modal__content--center .modal__close {
  animation-name: closeButtonLeftShow-ltr;
}

[dir=rtl] .modal.is-active .modal__content--center .modal__close {
  animation-name: closeButtonLeftShow-rtl;
}

.modal__content--top {
  top: 0;
  width: 100%;
}

[dir] .modal__content--top {
  padding-top: 32px;
  padding-bottom: 32px;
}

[dir=ltr] .modal__content--top {
  left: 0;
}

[dir=rtl] .modal__content--top {
  right: 0;
}

@media only screen and (min-width: 568px), (min-aspect-ratio: 13 / 9) {
  [dir] .modal__content--top {
    padding-top: 48px;
    padding-bottom: 48px;
  }
}

@media only screen and (min-width: 568px) and (max-aspect-ratio: 13 / 9), only screen and (min-width: 668px) and (min-height: 416px), only screen and (min-width: 980px) {
  [dir] .modal__content--top {
    padding-top: 80px;
    padding-bottom: 80px;
  }
}

[dir].ui-dark .modal__content--top {
  border-bottom: 1px solid var(--border-color);
}

.modal__content--top .modal__close {
  top: 100%;
}

[dir=ltr] .modal__content--top .modal__close {
  left: 50%;
}

[dir=rtl] .modal__content--top .modal__close {
  right: 50%;
}

[dir=ltr] .modal.is-active .modal__content--top .modal__close {
  animation-name: closeButtonBottomShow-ltr;
}

[dir=rtl] .modal.is-active .modal__content--top .modal__close {
  animation-name: closeButtonBottomShow-rtl;
}

.modal__content--right {
  top: 0;
  width: calc(100% - 60px);
  height: 100vh;
  max-width: 568px;
}

[dir] .modal__content--right {
  padding: 16px;
}

[dir=ltr] .modal__content--right {
  right: 0;
}

[dir=rtl] .modal__content--right {
  left: 0;
}

@media only screen and (min-width: 568px) and (max-aspect-ratio: 13 / 9), only screen and (min-width: 668px) and (min-height: 416px), only screen and (min-width: 980px) {
  [dir] .modal__content--right {
    padding: 32px;
  }
}

[dir=ltr].ui-dark .modal__content--right {
  border-left: 1px solid var(--border-color);
}

[dir=rtl].ui-dark .modal__content--right {
  border-right: 1px solid var(--border-color);
}

@media only screen and (min-width: 568px) and (max-aspect-ratio: 13 / 9), only screen and (min-width: 668px) and (min-height: 416px), only screen and (min-width: 980px) {
  .modal__content--right {
    width: calc(100% - 68px);
  }
}

.modal__content--right .modal__close {
  top: 24px;
}

[dir=ltr] .modal__content--right .modal__close {
  right: 100%;
}

[dir=rtl] .modal__content--right .modal__close {
  left: 100%;
}

[dir=ltr] .modal.is-active .modal__content--right .modal__close {
  animation-name: closeButtonLeftShow-ltr;
}

[dir=rtl] .modal.is-active .modal__content--right .modal__close {
  animation-name: closeButtonLeftShow-rtl;
}

.modal__content-scroll {
  display: block;
  width: 100%;
  height: 100%;
  overflow-y: auto;
  position: absolute;
  top: 0;
}

[dir] .modal__content-scroll {
  padding: 16px;
}

[dir=ltr] .modal__content-scroll {
  right: 0;
}

[dir=rtl] .modal__content-scroll {
  left: 0;
}

@media only screen and (min-width: 568px) and (max-aspect-ratio: 13 / 9), only screen and (min-width: 668px) and (min-height: 416px), only screen and (min-width: 980px) {
  [dir] .modal__content-scroll {
    padding: 32px;
  }
}

.modal-is-open {
  overflow: hidden;
}

.modal-search form {
  display: flex;
}

.modal-search form input[type=search] {
  flex: 1 1 10px;
  border-top-right-radius: 0;
  border-bottom-right-radius: 0;
  height: 60px;
}

.modal-search form input[type=submit] {
  border-top-left-radius: 0;
  border-bottom-left-radius: 0;
  height: 60px;
}
