:root {
  --aspect-ratio: 9 / 16;

  /* --caption-highlight: #999; */
  --caption-highlight: #cf402f;
  --max-content-width: 500px;
}

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

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

div#credit a {
  color: #999;
  text-decoration: none;
}

div#credit a:hover {
  color: black;
  text-decoration: underline;
}

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

h1 a:hover {
  color: #999;
}

body {
  color: #444;
  font-family: Roboto, sans-serif;
  margin: 20px;

  /* padding: 30px 20px; */
  word-break: break-word;
}

details#search-options[open] {
  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;
  max-width: var(--max-content-width);
}

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: #999;
  font-size: 16px;
  font-weight: 300;
  line-height: 1.4em;
  margin: 0 0 16px 0;
}

div#page-options > div {
  margin: 0 0 20px 0;
}

div#page-options > div#google-translate {
  display: none;
  margin: 0 0 20px 0;
  height: 36px;
}

div#query-info {
  border-bottom: 1px solid #eee;
  color: #888;
  font-size: 14px;
  margin: 0 0 20px 0;
  padding: 0 0 20px 0;
}

div#transcript {
  border-top: 1px solid #eee;
  padding: 38px 0 0 0;
}

h1 {
  border-bottom: 1px solid #c83f3f; /* fallback */
  border-bottom: 1px solid #999;
  color: black;
  font-family: Google Sans, Roboto, sans-serif;
  font-size: 22px;
  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;
}

h2 {
  color: #666;
  font-family: 'Google Sans', sans-serif;
  font-size: 1.2em;
}

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

iframe {
  background-color: #ccc;
  border: none;
  border-bottom: 20px solid white;
  display: block;
  height: calc(100vw * var(--aspect-ratio));
  margin: 0 0 10px -20px;
  max-height: calc(var(--max-content-width) * var(--aspect-ratio));
  max-width: var(--max-content-width);
  width: calc(100vw);
  z-index: 1;
}

img#fin {
  display: block;
  margin: 40px auto;
  width: 150px;
}

#page-options input[type='checkbox'] {
  font-size: 20px;
  margin: 0 7px 0 0;
  position: relative;
  top: 2px;
}

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;
}

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

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

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

#page-options label {
  color: #000;
  font-size: 16px;
  font-weight: 300;
}

#search-options 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: 16px;
  font-weight: 400;
  line-height: 1.3em;
  margin: 1px 0 1em 0;
  padding: 0 0 0 15px;
  position: relative;
  text-indent: -1em;
}

ol#matches li:hover {
  color: var(--caption-highlight);
}

/* li:nth-child(5n)::after {
  color: #aaa;
  content: attr(data-start);
  float: right;
  font-size: 12px;
  padding: 0 0 0 20px;
  text-align: right;
} */

/* 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#matches {
  border-bottom: 1px solid #ccc;
  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;
}

#transcript p {
  margin: 0;
  cursor: pointer;
  text-indent: 1.5em;
}

#transcript p:first-child {
  text-indent: 0;
}

section#top {
  background-color: white;
  border-bottom: 1px solid #ccc;
  box-shadow: 0 10px 10px 10px white;
  margin: 0;
  padding: 20px 0 0 0;
  position: -webkit-sticky;
  position: sticky;
  top: 0;
  z-index: 1;
}

#transcript section {
  margin: 0 0 20px 0;
}

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

#transcript span {
  cursor: pointer;
}

#transcript span.speaker {
  color: #333;
  font-weight: 600;
}

#transcript span[data-start] {
  color: #444;
  font-size: 14px;
  font-weight: 300;
  line-height: 1.5em;
}

#transcript span[data-start]:hover {
  border-bottom: 1px dashed black;
  color: var(--caption-highlight);
  cursor: pointer;
}

#transcript span[data-start].current {
  border-bottom: 1px dashed black;
  color: var(--caption-highlight);
}

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: 500px) {
  div#container {
    margin: 0 auto;
  }

  div#page-options > div#google-translate {
    display: block;
  }

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

  h2 {
    font-size: 20px;
  }

  iframe {
    border: 1px solid #ccc;
    height: calc((100vw - 80px) * var(--aspect-ratio));
    margin: 0 0 20px 0;

    /*
    max-height: calc(800px * 9 / 16);
    max-width: 800px;
    */
    outline: 20px solid white;
    width: calc(100vw - 40px);
  }

  #page-options input {
    top: -2px;
  }

  #page-options input[type='checkbox'] {
    top: -1px;
  }

  /*  #page-options label {
    font-size: 16px;
  } */

  span[data-start] {
    font-size: 16px;
    line-height: 1.7em;
  }

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

/* Google Translate internals */

.goog-te-gadget-simple {
  border-bottom: 1px solid #ccc !important;
  border-left: 1px solid #ccc !important;
  border-right: 1px solid #ccc !important;
  border-top: 1px solid #ccc !important;
  padding-bottom: 7px !important;
  padding-left: 7px !important;
  padding-right: 0 !important;
  padding-top: 7px !important;
}

.goog-te-menu-value {
  color: #000;
  margin-left: 4px;
  margin-right: 4px;
  font-size: 16px;
  font-family: Roboto, sans-serif;
  font-weight: 200;
  padding: 5px;
}
