/* ****************** PAGE ROOT STYLES */

html, body {
  height: 100%;
  font-family: Avenir, Helvetica;
}

*, *:before, *:after {
  -webkit-box-sizing: border-box; 
  -moz-box-sizing: border-box; 
  box-sizing: border-box;
}

body {
  position: relative;
  background: white;
  margin: 0;
  overflow-x: hidden;
  overflow-y: auto;
}

input[type="checkbox"] {
  display: none;
}

/* *************** CONTENT FORMATTING */

quote {
  font-style: italic;
  float: right;
  padding: .5em;
  margin: 0 0 1em 1em;
  background: #DDD;
  border-radius: 5px;
  width: 11em;
}

/* ****************** COMMON RULES FOR CONTAINERS */

.contentContainer,
.menuOverlay,
.menuButton,
.menuContainer,
.rootContainer {
  position: fixed; /* fixed, not absolute, to cancel the un-wanted horizontal scrolling */
  margin: 0;
  padding: 0;
}

.contentContainer {
  top: 0;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 0;
  overflow: hidden;
  /*transition: all .2s linear; */ /* <- this one goes with the below commented rule */
}

.scrollContainer {
  margin: 0;
  padding: 15px;
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  height: 100%;
}

.rootContainer {
  top: 0;
  left: 0;
  height: 100%;
  width: 100%;
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
/* for more pop-eye candy and CPU waste, activate this rule... */
/*    input[type="checkbox"]:checked ~ .contentContainer {
  -webkit-filter: blur(4px);
}*/

/* ****************** MENU OVERLAY */

.menuOverlay {
  background: black;
  opacity: 0;
  top: 0;
  bottom: 0;
  left: 0;
  right: 0;
  pointer-events: none;
  transition: opacity .3s ease-in;
  -webkit-tap-highlight-color: transparent;
  overflow: hidden;
}

input[type="checkbox"]:checked ~ .menuOverlay {
  pointer-events: auto;
  opacity: .6;
}

/* ****************** MENU BUTTON */

label.menuButton {
  background: white;
  color: #666;
  width: 50px;
  height: 50px;
  top: 5px;
  right: 5px;
  font-size: 40px;
  line-height: 44px;
  text-align: center;
  font-weight: 700;
  overflow: hidden;
  cursor: pointer;
  border-radius: 50%;
  border: 3px solid black;
  -webkit-tap-highlight-color: transparent;
  transition: all .2s ease-in;
}

input[type="checkbox"]:checked ~ label.menuButton {
  -webkit-transform: rotateZ( -135deg ) scale3d(.7,.7,1);
  -moz-transform: rotateZ( -135deg ) scale3d(.7,.7,1);
}

/*label.menuButton:hover {
  border-color: black;
  transition: all .2s ease-in;
}*/

/* ****************** MENU CONTAINER */

.menuContainer {
  top: 0;
  right: 0;
  bottom: 0;
  padding: 0;
  background: white;
  overflow: hidden;

  -webkit-transform: translateX(100%);
  -moz-transform: translateX(100%);
  transition: -webkit-transform .2s ease-in-out;
  transition: -moz-transform .2s ease-in-out;
}

input[type="checkbox"]:checked ~ .menuContainer {
  -webkit-transform: translateX(0px);
  -moz-transform: translateX(0px);
}

/* ****************** MENU TITLE */

.menuContainer h3 {
  margin: 0 0 0 0;
  font-size: 28px;
  padding: 15px;
  background: black;
  color: white;
  height: 60px;
  line-height: 30px;
}

/* ****************** MENU ITEMS */

ul.options {
  padding: 0;
  margin: 0;
  font-size: 24px;
}

ul.options li {
  list-style-type: none;
  border-top: 2px dashed #FFF;
}

ul.options li:nth-child(n+2) {
  border-top: 2px dashed #AAA;
}

ul.options label {
  display: block;
  padding: 10px 20px 10px 0;
  cursor: pointer;
  opacity: .6;
  transition: all .1s ease-out;
  position: relative;
}

ul.options label small {
  display: block;
  font-size: 12px;
  margin: 0;
  padding: 0;
}

ul.options input[type="checkbox"]:checked ~ label {
  opacity: 1;
  -webkit-transform: translateX( 20px );
  -moz-transform: translateX( 20px );
}

ul.options label:before {
  content:"L";
  font-weight: 700;
  color: #1D1;
  text-align: center;
  position: absolute;
  width: 20px;
  top: 10px;
  left: -20px;
  pointer-events: none;
  opacity: 0;
  text-align: left;
  transition: all .1s ease-in-out;
  -webkit-transform: translate3d(-8px,-2px, 0) scale3d(-.8,.8,1) rotateZ(-45deg);
  -moz-transform: translate3d(-8px,-2px, 0) scale3d(-.8,.8,1) rotateZ(-45deg);
}

ul.options input[type="checkbox"]:checked ~ label:before {
  opacity: 1;
  transition: all .3s ease-in-out;
}