@import "_compass";
@import "modules/jqueryui_minimal";

*{@include box-sizing(border-box);}
html, body{
  width:100%;
  height:100%;
  margin:0;
  padding:0;
  font:{
    family: $fontFamily;
    size: $fontSize;
  }
  line-height:$lineHeight;
  color:$darkFontColor;
}
// @todo: Resolve conflicts of these extra list and heading rules with Bootstrap and
//        general expectations. Should adopt Bootstrap convention to display lists with
//        bullets / numbers and indents by default. Only lists that explicitly DO NOT want
//        indents / bullets should have class list-unstyled to remove them.
// @see https://getbootstrap.com/docs/3.4/css/#type-lists (same in Bootstrap 4)
ul, ol {
  list-style: none;
  margin: 0;
  padding: 0;
  // @todo: this should be the default eventually (without requiring .list-default class)
  &.list-default {
   padding-left: 2.5em;
  }
}
ul.list-default {
  list-style-type: disc;
}
ol.list-default {
  list-style-type: decimal;
}
hr {
  margin:0;
  padding: 0;
}
h1, h2, h3, h4, h5, h6 {
  margin-bottom: 1em;
  &:first-child {
    margin-top: 0;
  }
  padding: 0;
  table thead & {
    // Avoid margins inside table cells
    margin: 0;
    line-height: 1.5;
  }
}

a {
  text-decoration:none;
  // undo bootstrap's default blue text color on all <a> elements
  &, &:hover, &:visited, &:focus {
    color:inherit;
  }
}
// @todo: p is for typography and should always have margins. If no margins are desired,
//        div is the right tag to use
p{margin:0;}

.clickable {
  cursor: pointer;
}

.popup, .sideContent {
  table {
    width: 100%;
  }
}

.flex-fill {
  flex-grow: 1;
}

.overlay-fill {
  position: relative;
  flex-grow: 1;
  display: inline-flex;
  flex-direction: column;
}

body.desktop-template .mobile-only {
  display: none;
}
body.mobile-template .desktop-only {
  display: none;
}

.anchored-element-wrap {
  position: absolute;
  .element-wrapper {
    // must be non-inline to stack vertically
    display: block;
    > div.mb-element {
      // must be inline to automatically shrink to real content size, and
      // align left / right as a whole
      display: inline-block;
    }
    // support "absolute"-positioned content
    position: relative;
  }
  .element-wrapper + .element-wrapper {
    margin-top: 0.5rem;
  }
  &.anchored-element-wrap-lt, &.anchored-element-wrap-lb {
    left: $space * 2;
    text-align: left;
  }
  &.anchored-element-wrap-rt, &.anchored-element-wrap-rb {
    right: $space * 2;
    text-align: right;
  }
  &.anchored-element-wrap-lt, &.anchored-element-wrap-rt {
    top: $space * 2;
  }
  &.anchored-element-wrap-lb, &.anchored-element-wrap-rb {
    bottom: $space;
  }
}
