
.hidden {
  height: 0; /* to enable opacity transition: doesn't work if setting display */
  margin: 0 !important;
  opacity: 0;
  overflow: hidden;
  padding: 0 !important;
}

.highlight {
  color: #c83f3f !important;
}

.shadow-bottom {
  box-shadow: 0 19px 19px -8px rgba(100, 100, 100, 0.3);
}

div#credit a {
  color: rgba(200, 63, 63, 1);
  text-decoration: none;
}

div#credit a:hover {
  color: rgb(166, 48, 48);
  text-decoration: underline;
}

h1 a {
  color: inherit;
  text-decoration: none;
}

h1 a:hover {
  color: rgba(200, 63, 63, 1);
}

body {
  color: #444;
  counter-reset: line-number;
  font-family: Roboto, sans-serif;
  margin: 0;
  padding: 30px 20px;
  word-break: break-word;
}

details#search-options[open] {
  border-bottom: 1px solid #eee;
  margin: 0 0 20px 0;
}

details div {
  margin: 0 0 20px 0;
}

div.direction-location {
  font-size: 14px;
  font-style: italic;
  line-height: 1.4em;
  margin: 8px 0 8px 10px;
  text-indent: -10px;
}

/* div.direction-location + div.direction-location {
  margin-top: -20px;
} */

div#container {
  height: 100%;
  margin: 0 auto 0 auto;
  max-width: 750px;
}

div#credit {
  border-top: 1px solid #ccc;
  color: #666 !important;
  font-weight: 100;
  line-height: 2em;
  padding: 10px 0 0 0;
}

.hidden + div#credit {
  border-top: none;
}

div#info {
  color: #c83f3f;
  font-size: 16px;
  font-weight: 300;
  line-height: 1.4em;
  margin: 0 0 16px 0;
}

div#query-container {
  background: white;
  border-bottom: 1px solid #ccc;
  box-shadow: 0 5px 5px 5px white;
  padding: 0 0 20px 0;
  position: sticky;
  top: 0;
  z-index: 1;
}

div#query-info {
  color: #888;
  font-size: 14px;
}

div#text {
  border-top: 1px solid #eee;
  font-family: Palatino, serif;
  padding: 38px 0 0 0;
}

h1 {
  border-bottom: 1px solid #c83f3f; /* fallback */
  border-bottom: 1px solid rgba(200, 63, 63, 1);
  color: black;
  font-size: 24px;
  font-weight: 500;
  line-height: 1.4em;
  margin: 0 0 1em 0;
  padding: 0 0 1em 0;
}

#container > h1 {
  font-family: Google Sans, Roboto, sans-serif;
}

h1#title {
  border-bottom: 1px solid #c83f3f; /* fallback */
  border-bottom: 1px solid rgba(200, 63, 63, 0.5);
  font-size: 24px;
}

h2 {
  color: #666;
  font-size: 18px;
  font-weight: 500;
  line-height: 1.2em;
  margin: 0 0 1em 0;
  text-transform: uppercase;
}

.poem h2 {
  font-size: 18px;
}

h3 {
  color: black;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.2em;
  margin: 0 0 1em 0;
  text-transform: uppercase;
  white-space: nowrap;
}

h4 {
  color: black;
  font-size: 16px;
  font-weight: normal;
  margin: 0 0 25px 0;
}

h4::before {
  color: #c83f3f;
  content: '\2619'; /*  ☙ */
  font-size: 1.4em;
  margin: 0 0.5em 0 0;
  position: relative;
  top: 0.1em;
}

html {
  height: 100%;
  overflow-y: scroll;
}

iframe {
  border: none;
  height: calc(100% - 100px);
  opacity: 1;
  overflow: scroll;

  /* transition: opacity .5s; */
  width: 100%;
}

input[type=checkbox] {
  position: relative;
  top: -1px;
  left: -1px;
}

input[type=text] {
  color: black;
  font-family: Roboto, sans-serif;
  font-size: 18px;
  font-weight: 300;
  padding: 8px;
  top: 0;
}

details input[type=text] {
  width: calc(100% - 140px);
}

div#type input {
  display: inline-block;
}

input#query {
  margin: 0 0 24px 0;
  width: calc(100% - 20px);
}

label {
  display: inline-block;
  font-size: 14px;
  font-weight: 500;
  width: 110px;
}

div#download label[for],
div#type label[for] {
  display: inline-block;
  font-weight: normal;
  width: 55px;
}

li {
  list-style-type: none;
}

ol#matches li {
  color: #444;
  cursor: pointer;
  font-size: 15px;
  line-height: 1.3em;
  margin: 1px 0 1em 0;
  padding: 0 65px 0 15px;
  position: relative;
  text-indent: -1em;
}

ol#matches li::after {
  color: #aaa;
  content: attr(data-citation);
  display: inline-block;

  /* float: right; */
  font-size: 12px;
  height: 12px;

  /* left: 75px; */
  margin: 0;
  padding: 0;
  position: absolute;
  right: 0;
  top: 0;
}

.poem li {
  line-height: 1.6em;
}

.scene li {
  --margin-left: 10px;
  --offset: 30px;

  font-size: 14px;
  line-height: 1.4em;
  margin-bottom: 2px;
  margin-left: var(--margin-left);
  padding: 0 0 0 0;
  text-indent: -10px;
}

.scene li[data-o="1"] {
  margin-left: calc(var(--margin-left) + 1 * var(--offset));
}

.scene li[data-o="2"] {
  margin-left: calc(var(--margin-left) + 2 * var(--offset));
}

.scene li[data-o="3"] {
  margin-left: calc(var(--margin-left) + 3 * var(--offset));
}

.scene li[data-o="4"] {
  margin-left: calc(var(--margin-left) + 4 * var(--offset));
}

.scene li[data-o="5"] {
  margin-left: calc(var(--margin-left) + 5 * var(--offset));
}

.scene li[data-o="6"] {
  margin-left: calc(var(--margin-left) + 6 * var(--offset));
}

.scene li[data-o="7"] {
  margin-left: calc(var(--margin-left) + 7 * var(--offset));
}

.scene li[data-o="8"] {
  margin-left: calc(var(--margin-left) + 8 * var(--offset));
}

.scene li[data-o="9"] {
  margin-left: calc(var(--margin-left) + 9 * var(--offset));
}

.scene li[data-o="10"] {
  margin-left: calc(var(--margin-left) + 10 * var(--offset));
}

li[data-n$="0"]::after,
li[data-n$="5"]::after,
p[data-n$="0"]::after,
p[data-n$="5"]::after {
  color: #aaa;
  content: attr(data-n);
  float: right;
  font-size: 12px;
  padding: 0 0 0 20px;
  text-align: right;
}

.scene li.direction-location {
  color: black;
  counter-increment: none;
  font-style: italic;
  line-height: 1.4em;
  list-style-type: none;
  margin: 0.8em 0 0.8em 44px;
  padding: 0;
  text-indent: 20px;
}

ol[data-s]::before {
  color: black;
  content: attr(data-s);
  display: block;
  font-size: 13px;
  letter-spacing: 1px;
  margin: 0 0 4px 0;
  text-transform: uppercase;
}

ol {
  padding: 0;
}

ol.speech {
  margin: 0 0 5px 0;
  padding: 0;
}

ol#matches {
  border-bottom: 1px solid #ccc;
  font-family: Palatino, serif;
  margin: 0;
  max-height: calc(100% - 170px);
  padding: 20px 0 10px 0;
}

ol#results {
  border-top: 1px solid #eee;
  margin: 0 0 1em 0;
  padding: 1.4em 0 0 0;
}

p {
  cursor: pointer;
}

section#poemintro {
  border-bottom: 1px solid #eee;
  font-style: italic;
  line-height: 2em;
  margin: 0 0 2.5em 0;
  padding: 0 0 2em 0;
}

section.act {
  border-bottom: 1px solid #c83f3f;
  margin: 0 0 40px 0;
  padding: 0 0 3px 0;
}

section.act:last-of-type {
  border: none;
  padding: 0;
}

section.couplet {
  margin: 0 0 2em 0;
}

section.poem {
  border-bottom: 1px solid #eee;
  padding: 0 0 1em 0;
  margin: 0 0 2em 0;
}

section.poem:last-of-type {
  border-bottom: none;
}

section.quatrain {
  margin: 0 0 2em 0;
}

section.scene {
  /* border-bottom: 1px solid #eee; */
  counter-reset: line-number;
  margin: 0 0 1.6em 0;
}

section.scene::after {
  color: #c83f3f;
  content: '\2766'; /* ❦ */
  font-size: 30px;
}

section.scene:last-of-type {
  border-bottom: none;
}

section.scene:last-of-type::after {
  content: '';
}

section.stanza {
  margin: 0 0 2em 0;
}

section.tercet {
  margin: 0 0 2em 0;
}

section#dramatis-personae {
  margin: 0 0 1.4em 0;
}

section#preamble {
  /* border-bottom: 1px solid #c83f3f; */
  margin: 0 0 0 0;
  padding: 0 0 1em 0;
}

select#gender {
  border: 1px solid #ccc;
  height: 38px;
}

span {
  cursor: pointer;
}

span:hover {
  background-color: yellow;
}

span.direction-location {
  color: black;
  font-style: italic;
  line-height: 1.4em;
  margin: 0.8em 0 0.8em 44px;
  padding: 0;
  text-indent: 20px;
}

span.direction-location::before {
  content: '(';
}

span.direction-location::after {
  content: ')';
}

span.foreign {
  font-style: italic;
}

div#credit span {
  color: black;
  text-decoration: none;
}

strong {
  font-weight: 500;
}

summary {
  color: #666;
  cursor: pointer;
  display: block;
  font-size: 18px;
  font-weight: 500;
  margin: 0 0 24px 2px;
  outline: none;
}

@media (min-width: 450px) {
  div.direction-location {
    font-size: 16px;
    margin: 8px 0 8px 50px;
    text-indent: 30px;
  }

  h1 {
    color: #444;
    font-size: 28px;
  }

  h2 {
    font-size: 20px;
  }

  h3 {
    font-size: 16px;
  }

  .scene li {
    --margin-left: 20px;
    --offset: 35px;

    font-size: 16px;
    margin-left: var(--margin-left);
    padding: 0 0 0 32px;
    text-indent: -20px;
  }

  details#search-options select {
    border-color: #ddd;
    height: 34px;
  }
}
