@value flex-box from '../../common/styles/layout.pcss';

.container {
  composes: flex-box;
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  right: 0;
  font-size: 14px;
  background: rgba(0, 0, 0, 0.7);
  overflow-x: hidden;
  overflow-y: auto;
  z-index: 999999999;
}

.vertical, .horizontal {
  composes: container;
}

.layer {
  composes: flex-box;
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  right: 0;
  height: 100%;
  max-height: 100vh;
}

/*---------------------------------------------------------
  CONTROLS
*/

.control {
  display: block;
  width: 40px;
  height: 40px;
  color: #fff;
  user-select: none;
  cursor: pointer;
  pointer-events: auto;
  overflow: hidden;

  & .control-label {
    display: block;
    text-indent: -9999em;
  }
}

.control-icon {
  color: #fff;
  font-size: 40px;
  line-height: 40px;
  width: 40px;
  height: 40px;
}

.close-button {
  composes: control;
  position: absolute;
  top: 5px;
  right: 5px;
}

/*---------------------------------------------------------
  NAVIGATION LAYER
*/

.nav-layer {
  composes: layer;
  pointer-events: none;
  z-index: 0;
}

.nav-boundary {
  composes: layer;
  margin: 0 auto;
  padding: 40px;
  pointer-events: none;
}

.nav-aligner {
  composes: flex-box;
  position: relative;
  width: 100%;
  height: 100%;
  margin: 0 auto;
  pointer-events: none;
}

.nav-aligner-sidebar {
  composes: nav-aligner;
  max-width: 935px;
}

.nav-aligner-no-sidebar {
  composes: nav-aligner;
  max-width: 600px;
}

.nav-btn {
  composes: control;
  position: absolute;
  top: 50%;
  margin-top: -20px;
}

.prev-btn {
  composes: nav-btn;
  left: -40px;
}

.next-btn {
  composes: nav-btn;
  right: -40px;
}

/*---------------------------------------------------------
  MODAL LAYER
*/

.modal-layer {
  composes: layer;
  padding: 0 40px;
  width: auto;
  height: 100%;
  pointer-events: none;
  z-index: 1;
}

.modal-aligner {
  composes: flex-box;
  position: relative;
  align-items: center;
  width: 100%;
  margin: auto;
  pointer-events: none;

  & > * {
    pointer-events: auto;
  }
}

.modal-aligner-sidebar {
  composes: modal-aligner;
  max-width: 935px;
}

.modal-aligner-no-sidebar {
  composes: modal-aligner;
  max-width: 600px;
}

/*---------------------------------------------------------
  VERTICAL MODE
*/

.vertical {
  & .modal-layer {
    padding: 40px;
  }

  & .modal-aligner {
    padding-bottom: 20px;
  }

  & .modal {
    max-height: 100%;
  }
}

/*---------------------------------------------------------
  BODY
*/

.no-scroll {
  overflow: hidden !important;
}

/*---------------------------------------------------------
  CTA
*/

.cta-icon {
    width: 20px;
    height: 20px;
    line-height: 20px;
    vertical-align: text-bottom;
    margin-right: 0.1em;
}

.skeleton-cta-button {
  composes: skeleton from "../../common/styles/colors.pcss";
  height: 42px;
}

.skeleton-cta-link {
  composes: skeleton from "../../common/styles/colors.pcss";
  height: 26px;
  margin: 8px 15px;
}
