@mixin button {
  color: #FFF;
  background: #7abcff; /* Old browsers */
  /* IE9 SVG, needs conditional override of 'filter' to 'none' */
  background: url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiA/Pgo8c3ZnIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgd2lkdGg9IjEwMCUiIGhlaWdodD0iMTAwJSIgdmlld0JveD0iMCAwIDEgMSIgcHJlc2VydmVBc3BlY3RSYXRpbz0ibm9uZSI+CiAgPGxpbmVhckdyYWRpZW50IGlkPSJncmFkLXVjZ2ctZ2VuZXJhdGVkIiBncmFkaWVudFVuaXRzPSJ1c2VyU3BhY2VPblVzZSIgeDE9IjAlIiB5MT0iMCUiIHgyPSIwJSIgeTI9IjEwMCUiPgogICAgPHN0b3Agb2Zmc2V0PSIwJSIgc3RvcC1jb2xvcj0iIzdhYmNmZiIgc3RvcC1vcGFjaXR5PSIxIi8+CiAgICA8c3RvcCBvZmZzZXQ9IjQ0JSIgc3RvcC1jb2xvcj0iIzYwYWJmOCIgc3RvcC1vcGFjaXR5PSIxIi8+CiAgICA8c3RvcCBvZmZzZXQ9IjEwMCUiIHN0b3AtY29sb3I9IiM0MDk2ZWUiIHN0b3Atb3BhY2l0eT0iMSIvPgogIDwvbGluZWFyR3JhZGllbnQ+CiAgPHJlY3QgeD0iMCIgeT0iMCIgd2lkdGg9IjEiIGhlaWdodD0iMSIgZmlsbD0idXJsKCNncmFkLXVjZ2ctZ2VuZXJhdGVkKSIgLz4KPC9zdmc+);
  background: -moz-linear-gradient(top,  #7abcff 0%, #60abf8 44%, #4096ee 100%); /* FF3.6+ */
  background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#7abcff), color-stop(44%,#60abf8), color-stop(100%,#4096ee)); /* Chrome,Safari4+ */
  background: -webkit-linear-gradient(top,  #7abcff 0%,#60abf8 44%,#4096ee 100%); /* Chrome10+,Safari5.1+ */
  background: -o-linear-gradient(top,  #7abcff 0%,#60abf8 44%,#4096ee 100%); /* Opera 11.10+ */
  background: -ms-linear-gradient(top,  #7abcff 0%,#60abf8 44%,#4096ee 100%); /* IE10+ */
  background: linear-gradient(top,  #7abcff 0%,#60abf8 44%,#4096ee 100%); /* W3C */
  filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#7abcff', endColorstr='#4096ee',GradientType=0 ); /* IE6-8 */
}

html, body {
  width: 100%;
  height: 100%;
  font: 13px/1.5 Futura, Helvetica, Arial, sans-serif;
  margin: 0;
  min-width: 800px;
}

.controller {
  &.view.active {
    display: block;
  }
  &:not(.view), &.view.passive {
    display: none;
  }
}

.view {
  &.active {
    display: block;
  }
  &.passive {
    display: none;
  }
}

#main-stack {
  width: 100%;
  height: 100%;
}

#note-selector {
  width: 20%;
  height: 100%;
  margin-right: -1px;
  float: left;
  overflow: auto;
  background: url('white_texture.png');
  box-shadow: -10px 0 20px 10px #333;
  position: relative;
  z-index: 5;
  div {
    height: 100%;
    background: rgba(200, 200, 200, 0.5);
    #by-flakey {
      padding: 0 10px;
      font-size: 10px;
      position: absolute;
      bottom: 0;
      color: #666;
      a { color: #444; }
    }
    ul {
      margin: 0;
      padding: 0;
      list-style: none;
      li {
        cursor: pointer;
        list-style: none;
        display: block;
        padding: 15px 25px;
        border-bottom: 1px solid #CCC;
        &.selected {
          @include button;
        }
        &:active {
          background: rgba(150, 150, 150, 0.5);
        }
      }
    }
  }
}

#note-editor {
  width: 80%;
  height: 100%;
  float: left;
  background: url('white_texture.png');
  position: relative;
  z-index: 1;
  div.texture {
    width: 100%;
    height: 100%;
    input[type=button] {
      font-weight: bold;
      font-size: 1em;
      display: block;
      @include button;
      border: none;
      border-radius: 5px;
      height: 40px;
      position: absolute;
      bottom: 20px;
      border: 1px solid #999;
      &:active {
        box-shadow: inset 0 0 5px #666;
      }
    }
    #save-note {
      left: 20px;
    }
    #delete-note {
      right: 20px;
    }
    #last-saved {
      height: auto;
      font-size: 10px;
      color: #666;
      position: absolute;
      left: 23px;
      bottom: 3px;
    }
    #history {
      label {
        position: absolute;
        top: -10px;
        left: 3px;
      }
      height: auto;
      font-size: 10px;
      color: #666;
      position: absolute;
      right: 140px;
      bottom: 20px;
      padding: 0;
      input[type=range] {
        width: 200px;
      }
    }
    #when {
      height: auto;
      font-size: 10px;
      color: #666;
      position: absolute;
      right: 140px;
      bottom: 3px;
      padding: 0;
    }
    input[type=text], textarea {
      width: auto;
      height: auto;
      font: 18px/1.5 "Menlo", "Monaco", "Lucida Console", "Consolas", "Courier New";
      border-radius: 5px;
      border: 1px solid #CCC;
      outline: none;
      background: rgba(200, 200, 200, 0.2);
    }
    input[type=text] {
      padding: 10px;
      position: absolute;
      left: 20px;
      right: 20px;
      top: 20px;
    }
    textarea {
      overflow: auto;
      margin-top: 20px;
      padding: 10px;
      position: absolute;
      left: 20px;
      right: 20px;
      top: 70px;
      bottom: 70px;
    }
  }
}



