@import "core-variables";
@import "core-responsive";
@import "core-modal";
@import "core-drawers";

html, body, #outer-wrap {
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  right: 0;
  overflow: hidden;
}

.cl-header,
.cl-contents,
.cl-footer {
  left: 0;
  width: 100%;
  padding: 0;
  margin: 0;
}

.cl-header {
  top: 0;
}
.cl-header,
.cl-footer {
  z-index: $cl-header-z-index;
}
.cl-footer {
  bottom: 0;
}

.cl-contents {
  overflow: auto;
}

@mixin cl-heights($header-height, $footer-height) {
  /**
   * The following is left out to allow "overflowing" drop-down menus
   * from the header bar.
   **/
//  .cl-header {
//    height: $header-height;
//  }
  .cl-contents {
    top: $header-height;
    bottom: $footer-height;
  }
  .cl-footer {
    height: $footer-height;
  }
}

@media (max-width: $cl-screen-xs-max) {
  @include cl-heights($cl-header-height-xs, $cl-footer-height-xs);
}
@media (min-width: $cl-screen-sm-min) and (max-width: $cl-screen-sm-max) {
  @include cl-heights($cl-header-height-sm, $cl-footer-height-sm);
}
@media (min-width: $cl-screen-md-min) and (max-width: $cl-screen-md-max) {
  @include cl-heights($cl-header-height-md, $cl-footer-height-md);
}
@media (min-width: $cl-screen-lg-min) {
  @include cl-heights($cl-header-height-lg, $cl-footer-height-lg);
}

.cl-header,
.cl-footer,
.cl-contents {
  position: absolute;
}

.iscroll-on {
  .cl-header,
  .cl-contents,
  .cl-footer {
    overflow: hidden;
  }
}

.iscroll-off {
  .cl-contents {
    -webkit-overflow-scrolling: touch;
  }
}
