* {
  padding: 0;
  margin: 0;
  box-sizing: border-box;
  font-size: 16px;
}

html, body {
  height: 100%;
}

body {
  background: #292929;
  font-family: -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Oxygen,Ubuntu,Cantarell,Fira Sans,Droid Sans,Helvetica Neue,sans-serif;
  color: #999;
}

a {
  cursor: pointer;
  color: #F95700FF;
}

h1, h2 {
  color: #DDD;
  font-weight: normal;
}

#note ul {
  padding-left: 0 !important;
  list-style: none;
}

#note li {
  padding-left: 0 !important;
}

#note ul li::before {
  content: "\2022";
  color: #F95700FF;
  font-weight: bold;
  display: inline-block;
  width: .5em;
  margin-left: .5em;
}

#wrapper {
  display: flex;
  width: 100%;
  height: 100%;
}

#notes {
  width: 250px;
  flex-shrink: 0;
  background: #292929;
  border-right: 1px solid black;
  display: flex;
  flex-direction: column;
  height: 100%;
}

#notes a {
  color: #CCC;
}

#editor {
  width: 700px;
  padding: 0 2em;
  margin: 0 auto;
}

#buttons {
  z-index: 2;
  position: fixed;
  display: flex;
}

#buttons .btn {
  opacity: .2;
}
#buttons .btn:hover {
  opacity: .4;
}

@media screen and (max-width: 700px) {
  #notes {
    position: absolute;
    width: 80%;
    z-index: 100;
    transform: translateX(-100%);
    transition: transform 250ms;
  }

  .shownotes #notes {
    transform: translateX(0px);
  }

  #buttons {
    width: 100%;
    bottom: 0;
    background: rgba(36, 36, 36);
    height: 3em;
    align-items: center;
    padding: 0 1em;
    justify-content: space-between;
  }

  #editor {
    padding: 0;
  }

  #note {
    margin-bottom: 3em;
  }

  #buttons .btn {
    opacity: .5;
  }
}

@media screen and (min-width: 700px) {
  #show-notes {
    display: none;
  }
  #buttons {
    height: 100%;
    right: 0;
    width: 2.5em;
    padding-right: 1em;
    margin-top: 1em;
  }
}

#cover {
  display: none;
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 50;
  background: rgba(0, 0, 0, .5);
}

.shownotes #cover {
  display: block;
}

#note {
  background: #2d2d2d;
  overflow: scroll;
  flex-grow: 2;
  display: flex;
  flex-direction: row;
}

#notes ul {
  list-style-type: none;
}

#notes footer {
  border-top: 1px solid black;
  color: white;
  align-items: center;
  display: none;
}

#notes footer.logged-in,
#notes footer.sign-in {
  display: flex;
}

#sign-in {
  display: block;
  width: 100%;
  padding: 1em;
}

#notes ul a {
  display: block;
  cursor: pointer;
  padding: 15px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-decoration: none;
}

#notes a {
  transition: background-color 250ms;
}

#notes ul li {
  border-bottom: 1px solid black;
}
#notes ul li:last-child {
  border-bottom: 0;
}

#notes-list {
  flex-grow: 2;
  overflow-y: scroll;
}

.error {
  padding: 1em;
  text-align: center;
}

#notes a.selected {
  background-color: rgba(255, 255, 255, .05);
  border-right: 5px solid #F95700FF;
}

#notes a:hover {
  background-color: rgba(255, 255, 255, .05);
}

#header {
  margin: .5em;
}

[type=search] {
  background: #1f1f1f;
  border-width: 0;
  border-radius: 5px;
  color: #CCC;
  height: 2.5em;
  font-size: .8em;
  padding: 5px;
  text-indent: 5px;
  width: 100%;
}

#search-wrapper {
  flex-grow: 2;
}

#logout {
  background-image: url(/img/logout.svg);
  margin: .5em;
  flex-shrink: 0;
}

#create-note {
  background-image: url(/img/create.svg);
  flex-shrink: 0;
  margin-left: .5em;
}

#create-note:hover {
   opacity: .8;
}

#header {
  display: flex;
  align-items: center;
}

.btn {
  display: block;
  cursor: pointer;
  width: 1.5em;
  height: 1.5em;
  background-size: contain;
  background-repeat: no-repeat;
  background-color: transparent;
  opacity: .4;
  text-indent: -9999em;
  border: 0;
  color: #CCC;
  z-index: 50;
  transition: opacity 250ms;
}

.btn:hover {
  opacity: .8;
}

#show-notes {
  background-image: url(/img/home.svg);
}

#delete-note {
  background-image: url(/img/delete.svg);
}

dialog {
  display: none;
  position: fixed;
  background: rgba(0, 0, 0, .5);
  border: 0;
  top: 0;
  bottom: 0;
  left: 0;
  right: 0;
  width: 100%;
  height: 100%;
  z-index: 200;
  justify-content: center;
  align-self: center;
}

dialog div {
  display: flex;
  justify-content: center;
  align-self: center;
  position: relative;
}

dialog form {
  max-width: 300px;
  display: flex;
  flex-direction: column;
  background: #292929;
  margin: 2em;
  padding: 3em 1em 1em 1em;
  box-shadow: 0px 0px 12px 0px rgba(0,0,0,0.5);
  color: lightgrey;
}

dialog form input {
  color: lightgrey;
}

.cancel-btn {
  position: absolute;
  top: 3em;
  right: 3em;
  border: 0;
  background: url(/img/cross.svg) no-repeat;
  background-size: 1em;
  height: 1em;
  width: 1em;
  text-indent: -9999em;
  opacity: .5;
  cursor: pointer;
}

dialog p {
  text-align: center;
}

form input[type=submit] {
  background: black;
  border: 0;
  padding: 1em;
  font-size: 1em;
  border: 0;
  border-radius: .2em;
  cursor: pointer;
}

input#cancel-btn {
  background: #222;
}
input#sign-in-btn {
  background: green;
}

#sign-in {
  background-color: rgba(0,0,0,.2);
}

#email {
  display: block;
  width: 100%;
  background: transparent;
  border: 0;
  padding: .5em;
  font-size: 1em;
  border-bottom: 2px solid lightgrey;
  margin: 2em 0;
}

#user #logged-in {
  display: none;
}

#logged-in {
  position: relative;
}

#logged-in span {
  flex-grow: 2;
  line-height: 100%;
  font-size: .85em;
  color: #999;
  padding: 1em;
  overflow: hidden;
  text-overflow: ellipsis;
  text-indent: 2em;
  background: url(/img/sync.svg) no-repeat 1em center;
  background-size: 1.5em;
}

#logged-in span:before {
  content: "";
  display: block;
  background-size: .5em;
  border-radius: 1em;
  width: 1em;
  height: 1em;
  position: absolute;
  top: 1.4em;
  left: .7em;
}

#logged-in[data-sync-status=syncing] span:before {
  background: green url(/img/tick.svg) no-repeat center center;
  background-size: .5em;
}

#logged-in[data-sync-status=error] span:before {
  background: red url(/img/cross.svg) no-repeat center center;
  background-size: .5em;
}

#user.logged-in #logged-in {
  display: flex;
  width: 100%;
  align-content: center;
}
#user.logged-in #sign-in {
  display: none;
}

.CodeMirror {
  background: #2d2d2d !important;
  border: 0 !important;
}

.ql-editor {
  overflow-y: visible !important;
}
