
body {
  margin: 0;
}

body, div.panel, div.book, h1, h2, h3, h4, input, button, #versePopupMenu, #toggleNav, #toggleSearch {
  transition: background-color 1s linear;
}

sup, span.deleteBookmark {
  cursor: pointer;
}

sup {
  font-size: 60%;
  display: inline-block;
  margin-top: -7px;
}

span.bookmarked {
  background-color: rgba(0, 0, 0, 0.1);
}

span.bookmarked::before {
  font-family: 'Font Awesome 5 Pro';
  font-weight: 900;
  font-size: 140%;
  vertical-align: baseline;
  content: '\f02e' !important;
  margin-left: -45px;
  float: left;
}

span.marked {
  cursor: pointer;
}

span.note {
  font-weight: bold;
  font-style: normal;
  color: rgb(144, 33, 33);
  padding: 0;
}

span.note span {
  padding: 0 6px;
}

span.note i.fas {
  font-size: 60%;
  color: rgb(0, 0, 0);
  cursor: pointer;
}

span.note::before {
  content: '[ Note: ';
}

span.note::after {
  content: ' ]';
}

a:link span.marked, a:visited span.marked {
  color: rgb(0, 0, 0);
  text-decoration: underline;
}

a {
  transition: color .1s linear;
}

sup:hover {
  text-decoration: underline;
}

h1, h2 {
  text-align: center;
}

div.book h1 {
  margin: -20px -80px 0 -80px;
  padding: 40px 0;
  font-size: 240%;
}

div.book h1, button {
  text-shadow: 0px -2px 0px rgb(0, 0, 0, 0.2);
}

h2 {
  margin-top: 40px;
  margin-bottom: 10px;
}

h4.bookNameAboveChapter {

  margin-top: 60px;
  margin-bottom: -40px;
  text-align: center;
  font-style: normal;
  font-variant: small-caps;

}

div.book h4 {
  font-size: 85%;
  line-height: 150%;
}

h1 {
  margin: 20px 0;
  font-size: 160%;
}

h1 span {
  font-size: 70%;
  display: block;
}

h2 span.bookNameAboveChapter {
  font-variant: small-caps;
  font-size: 70%;
  margin-top: 2rem;
  margin-bottom: -10px;
}

h4 {
  font-style: italic;
  font-size: 100%;
  opacity: 0.95;
}

h4 b {
  font-weight: 900;
}

#search h4 {
  margin-bottom: 16px;
}

button {
  cursor: pointer;
}

button:active {
  filter:invert();
}

button, input, textarea {
  font-weight: bold;
}

div.book h4 {
  padding: 0 40px;
}

hr {
  margin: 26px 0;
}

h2 + hr {
  margin-top: 20px;
}

h2 i {
  margin: 0 10px;
  font-size: 60%;
  vertical-align: middle;
}

h2 i.fa-chevron-circle-left {

}

h2 i.fa-chevron-circle-right {

}

input[type=text], button {

  border-radius: 5px;
  padding: 4px 8px;
  border-width: 1px;
  font-size: 100%;
  outline: none;

}

input[type=text] {
  box-shadow: inset 1px 1px 2px rgba(0, 0, 0, 0.3);
  border: 0;
  margin-right: 5px;
}

button {
  border-width: 0;
  box-shadow: 0px 2px 5px rgba(0, 0, 0, 0.2);
  transition: box-shadow .2s linear;
}

button:hover {
  box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.2);
}

span {
  transition: background-color .1s linear;
}

span:target {
  font-weight: bold;
}

span:target::before {
  font-family: 'Font Awesome 5 Pro';
  font-weight: 400;
  font-size: 160%;
  vertical-align: baseline;
  content: '\f0a4';
  margin-left: -45px;
  float: left;
}

.panel {
  position: fixed;
  top: 0; bottom: 0;
  overflow: hidden;
  width: 400px;
  box-sizing: border-box;
  padding: 1px 20px 0 20px;
  background-color: #ccc;
  box-shadow: 0px 0px 10px rgba(0,0,0,0.4);
}

#booksList {
  columns: 2;
}

#booksList h3 {
  font-size: 100%;
  font-variant: small-caps;
  margin-bottom: 0;
}

#booksList h3:first-child {
  margin-top: 0;
}

#booksList ol {
  padding: 0 0 0 28px;
  margin-top: 10px;
}

#booksList ol li.current {
  font-weight: bold;
}

input[type=radio], label, select {
  cursor: pointer;
  user-select: none;
}

#navigation {
  left: 0;
}

#bible {
  width: 100%;
  max-width: 900px;
  margin: 60px auto;
}

div.book {
  display: none;
  width: 100%;
  box-sizing: border-box;
  padding: 20px 80px 100px 80px;
  background-color: white;
  box-shadow: 0px 0px 12px rgba(0, 0, 0, 0.3);
  font-size: 1.2em;
}

div.openBook {
  display: block;
}

#search {
  right: 0;
}

p.hint {
  font-size: 90%;
  font-weight: bold;
  opacity: 0.75;
}

p.notice {
  font-size: 80%;
  opacity: 0.6;
  font-weight: bold;
}

.list {
  padding: 0;
}

.list li {
  list-style-type: none;
  padding: 8px 10px;
  transition: all .25s linear;
  box-sizing: border-box;
}

.list span.deleteBookmark {
  float: right;
  font-size: 80%;
  margin-right: -5px;
}

.list li p {
  font-size: 80%;
  margin: 0;
}

p.end {
  text-align: center;
}


/* Verse popup menu */

#versePopupMenu {

  opacity: 0;
  position: absolute;
  top: -1000px; left: -1000px;
  box-sizing: border-box;
  background-color: rgb(255, 255, 255);
  color: rgb(0, 0, 0);
  border-left: 10px solid rgb(150, 150, 150);
  padding: 0;
  box-shadow: 0px 0px 12px rgba(0, 0, 0, 0.5);
  z-index: 1001;
  transition: opacity .1s linear;

}

#versePopupMenu ul {
  padding: 0;
  margin: 0;
  list-style-type: none;
}

#versePopupMenu li:nth-child(odd) {
  background-color: rgba(0, 0, 0, 0.05);
}

#versePopupMenu li:nth-child(4) {
  border-bottom: 1px solid rgb(150, 150, 150);
}

#versePopupMenu li:nth-child(8) {
  border-top: 1px solid rgb(150, 150, 150);
}

#versePopupMenu li {
  padding: 8px 18px 8px 8px;
  font-weight: bold;
}

#versePopupMenu li a:link, #versePopupMenu li a:visited {
  text-decoration: none;
}

#versePopupMenu li span {
  text-decoration: underline;
}


/* Highlight menu */

#highlightMenu {

  opacity: 0;
  position: absolute;
  top: -1000px; left: -1000px;
  background-color: rgb(255, 255, 255);
  border-left: 10px solid rgb(150, 150, 150);
  box-shadow: 0px 0px 12px rgba(0, 0, 0, 0.5);
  z-index: 1001;
  transition: opacity .1s linear;
}

#highlightMenu ul {
  list-style-type: none;
  padding: 0;
  margin: 0;
}

#highlightMenu a:link, #highlightMenu a:visited {
  text-decoration: none;
}

#highlightMenu li a span {
  text-decoration: underline;
}

#highlightMenu li {
  padding: 8px 18px 8px 8px;
  font-weight: bold;
  cursor: pointer;
}

#highlightMenu li:nth-child(odd) {
  background-color: rgba(0, 0, 0, 0.05);
}

#highlightMenu span.marked {
  float: right;
  margin-left: 20px;
  font-weight: normal;
}

form span {
  display: inline-block;
}

div.panel {
  padding: 0;
}

div.panelContents {
  box-sizing: border-box;
  position: absolute;
  top: 0px; bottom: 0px;
  width: calc(100% - 20px);
  padding: 0 20px 20px 20px;
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: thin;
}

#navigation, #search {
  box-sizing: border-box;
}

#navigation {
  padding-right: 20px;
  transition: left .3s ease;
  z-index:998;
}

#search {
  padding-left: 20px;
  transition: right .3s ease;
  z-index:999;
}

#navigation div.panelContents {
  left: 0;
}

#search div.panelContents {
  right: 0;
}

#navigation.open {
  left: 0;
}

#navigation.open #toggleNav {
  left: 380px;
}

#navigation.closed {
  left: -380px;
}

#navigation.closed #toggleNav {
  left: 0px;
}

#search.open {
  right: 0px;
}

#search.open #toggleSearch {
  right: 380px;
}

#search.closed {
  right: -380px;
}

#search.closed #toggleSearch {
  right: 0px;
}

#toggleNav, #toggleSearch {
  width: 20px;
  height: 100vh;
  padding-top: calc(50vh - 8px);
  cursor: pointer;
  transition: background-color .1s linear;
}

#toggleNav {
  float: right;
  margin-right: -20px;
  z-index: 1001;
}

#toggleSearch {
  float: left;
  margin-left: -20px;
  z-index: 1002;
}

#narrowScreenMenu {
  display: none;
}

#closeNav, #closeSearch {
  display: block;
  cursor: pointer;
  position: absolute;
  top: 10px;
  opacity: 0.7;
  transition: opacity .1s linear;
}

#closeNav:hover, #closeSearch:hover {
  opacity: 1;
}

#closeSearch {
  right: 5px;
}

#closeNav {
  right: 25px;
}

/* Backup and restore */

#modalBackground {
  opacity: 1;
  position: fixed;
  top: 0; right: 0; bottom: 0; left: 0;
  background-color: rgba(255, 255, 255, 0.3);
  backdrop-filter: blur(10px);
  z-index: 1003;
  transition: opacity .2s linear;
}

.modal {
  position: fixed;
  z-index: 1004;
  box-sizing: border-box;
  padding: 10px 40px 40px 40px;
  box-shadow: 0px 5px 20px rgba(0, 0, 0, 0.5);
  width: 600px;
  max-height: 600px;
  overflow-y: auto;
  top: calc(50vh - 300px);
  left: calc(50vw - 300px);
  background-color: rgb(255, 255, 255);
  transition: opacity .2s linear;
}

.modal h4 {
  margin-top: 30px;
}

span.searchExample {
  background-color: rgba(0, 0, 0, 0.05);
  padding: 1px 4px;
  border-radius: 5px;
  border: 1px solid rgba(0, 0, 0, 0.2);
}

#backupAndRestore, #shareLink, #searchHelp {
  display: none;
}

#searchHelp {
  opacity: 0;
  top: 0;
  margin-top: 8vh;
  height: 84vh;
  max-height: 1050px;
}

#shareLink {
  opacity: 0;
}

#shareLinkText {
  width: 98%;
  font-family: monospace;
}

#shareLinkDismiss {
  float: right;
}

#loading {
  opacity: 1;
}

#loading p {
  font-weight: bold;
  text-align: center;
  font-size: 100%;
}

.modalCloseX {
  opacity: 0.5;
  position: fixed;
  padding-left: 500px;
  cursor: pointer;
  transition: opacity .1s linear;
}

.modalCloseX:hover {
  opacity: 1;
}


@media only screen and (max-width: 1024px) {

  body {
    margin: 0;
  }

  #closeNav {
    right: 5px;
  }

  #navigation, #search {
    width: 320px;
  }

  #searchText {
    width: 160px;
  }

  #navigation.open {
    left: 0;
  }

  #navigation.open #toggleNav {

  }

  #navigation.closed {
    left: -300px;
  }

  #navigation.closed #toggleNav {

  }

  #search.open {
    right: 0px;
  }

  #search.open #toggleSearch {

  }

  #search.closed {
    right: -300px;
  }

  #search.closed #toggleSearch {

  }

  #booksList {
    columns: 1;
  }

  #bible {
    width: auto;
    max-width: none;
    margin: 0;
  }

  div.panelContents {
    padding-bottom: 80px;
  }

  div.panel.closed {
    box-shadow: none;
  }

  #toggleNav, #toggleSearch {
    display: none;
  }

  #navigation {
    padding-right: 0;
    border-right: 1px solid #ccc;
  }

  #search {
    padding-left: 0;
    border-left: 1px solid #ccc;
  }

  #navigation.closed {
    left: -320px;
  }

  #search.closed {
    right: -320px;
  }

  #narrowScreenMenu {
    display: block;
    position: fixed;
    bottom: 0px;
    left: 0px; right: 0px;
    z-index: 1000;
  }

  #narrowScreenMenu ul {
    padding: 0;
    margin: 0;
  }

  #narrowScreenMenu ul li {
    display: inline-block;
    padding: 10px 0;
    width: 50%;
    text-align: center;
    transition: background-color .1s linear, color .1s linear;
  }

  #narrowScreenMenu ul li:last-child {
    width: calc(50% - 1px);
  }

  div.book {
    padding: 10px 40px 60px 40px;
    font-size: 1em;
  }

  div.book h1 {
    margin: -10px -40px 0 -40px;
    padding: 40px 0;
  }

  div.book h4 {
    padding: 0 5px;
  }

  #booksList ol li {
    padding: 4px 0;
  }

  #narrowScreenMenu {
    border-top: 1px solid rgb(170, 170, 170);
  }

  #narrowScreenMenu ul li {
    background-color: rgb(255, 255, 255);
    color: rgb(37, 119, 205);
  }

  #narrowScreenMenu ul li:hover, #narrowScreenMenu ul li:focus {
    background-color: rgb(37, 119, 205);
    color: rgb(255, 255, 255);
  }

  #narrowScreenMenu ul li:first-child {
    border-right: 1px solid rgb(170, 170, 170);
  }

  div.panelContents {
    width: 100%;
  }

  span.bookmarked::before {
    font-size: 100%;
    margin: 0 5px;
    float: none;
  }

  span:target::before {
    font-size: 100%;
    margin: 0 5px;
    float: none;
  }

}

@media only screen and (max-width: 700px) {

  #searchHelp {
    margin: 0;
    height: 100vh;
  }

  #searchHelp p {
    line-height: 180%;
  }

  .modalCloseX {
    opacity: 0.5;
    position: fixed;
    margin: 0;
    padding: 0px;
    top: 10px; right: 10px;
    cursor: pointer;
    transition: opacity .1s linear;
  }

  div.book {
    padding: 10px 20px 40px 20px;
    font-size: 1em;
  }

  div.book h1 {
    margin: -10px -20px 0 -20px;
    padding: 40px 0;
  }

  .modal {
    width: auto;
    top: 0px; right: 0px; bottom: 0px; left: 0px;
    padding: 10px 20px;
  }

  #search, #navigation {
    border: 0;
  }

}

/* Dyslexic font support */

@font-face {
  font-family: OpenDyslexic;
  src: url('./opendyslexic/OpenDyslexic-Regular.otf') format("opentype");
}

@font-face {
  font-family: OpenDyslexic;
  font-weight: bold;
  src: url('./opendyslexic/OpenDyslexic-Bold.otf') format("opentype");
}

@font-face {
  font-family: OpenDyslexic;
  font-style: italic;
  src: url('./opendyslexic/OpenDyslexic-Italic.otf') format("opentype");
}

@font-face {
  font-family: OpenDyslexic;
  font-weight: bold;
  font-style: italic;
  src: url('./opendyslexic/OpenDyslexic-BoldItalic.otf') format("opentype");
}


/* Animations */

.shake {

	animation: shake 0.82s cubic-bezier(.36,.07,.19,.97) both;
	transform: translate3d(0, 0, 0);
	backface-visibility: hidden;
	perspective: 1000px;

}

@keyframes shake {

	10%, 90% {
		transform: translate3d(-1px, 0, 0);
	}

	20%, 80% {
		transform: translate3d(2px, 0, 0);
	}

	30%, 50%, 70% {
		transform: translate3d(-4px, 0, 0);
	}

	40%, 60% {
		transform: translate3d(4px, 0, 0);
	}

}

/* Highlighting */

span.marked.blue {
  background-color: rgb(99, 197, 227);
}

span.marked.green {
  background-color: rgb(90, 193, 101);
}

span.marked.magenta {
  background-color: rgb(215, 103, 211);
}

span.marked.orange {
  background-color: rgb(223, 175, 69);
}

span.marked.red {
  background-color: rgb(218, 86, 86);
}

span.marked.yellow {
  background-color: rgb(235, 233, 108);
}

.fa-circle.blue {
  color: rgb(99, 197, 227);
}

.fa-circle.green {
  color: rgb(90, 193, 101);
}

.fa-circle.magenta {
  color: rgb(215, 103, 211);
}

.fa-circle.orange {
  color: rgb(223, 175, 69);
}

.fa-circle.red {
  color: rgb(218, 86, 86);
}

.fa-circle.yellow {
  color: rgb(235, 233, 108);
}


/* debug */

#debugConsole {
  display:none;
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 50px;
  overflow-x: hidden;
  overflow-y: auto;
  font-size: 70%;
  background-color: rgba(255, 255, 255, 0.8);
  padding: 10px;
  z-index: 10000;
  border-bottom: 1px solid red;
}
