/**
 * CSS by Mr. Cringe Kid (https://scratch.mit.edu/users/mrcringekidyt/).
 *
 * See changes made to their CSS on Github:
 * https://github.com/SheepTester/words-go-here/commits/master/htmlifier/main.css
 */

html {
  /* https://stackoverflow.com/a/56467997 */
  scroll-padding-top: 120px;
}
body {
  font-family: 'Roboto', sans-serif;
  background-color: #37373c;
  color: white;
  margin: 0px;
  padding: 0px;
}
.offline::after {
  content: 'Offline edition';
  position: fixed;
  bottom: 0;
  right: 0;
  color: rgba(255, 255, 255, 0.5);
  margin: 10px;
}
.bookmarklet-link {
  font-size: 0;
}
.bookmarklet-link::after {
  content: 'Bookmarklet';
  font-size: 1rem;
}
#errors {
  display: none;
}
#errors:target {
  -webkit-appearance: none;
  display: block;
  border: none;
  background: rgba(255, 0, 0, 0.7);
  color: white;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1000;
  animation: none;
}
.problem {
  font-weight: bold;
  color: #faa;
}
.hidden {
  display: none;
}
.notice {
  border-radius: 5px;
  padding: 5px 20px;
  border-left: 5px solid white;
  margin: 1em 0;
}
.start-warning {
  background-color: rgba(255, 195, 0, 0.3);
  border-color: #ffc300;
}
.info {
  background-color: rgba(2, 185, 255, 0.2);
  border-color: #02b9ff;
}
#root,
.footnotes {
  counter-reset: footnotes;
}
.footnote {
  font-size: 0;
}
.footnote::after {
  content: '[' counter(footnotes) ']';
  counter-increment: footnotes;
  font-size: small;
}

code {
  background-color: rgba(255, 255, 255, 0.1);
  border-radius: 2px;
  padding: 0 5px;
}
details > summary:first-of-type {
  cursor: pointer;
}

a {
  text-decoration: none;
  color: #00d755;
}
a:hover {
  text-decoration: underline;
}

:target {
  animation: flash 3s;
}
@keyframes flash {
  0% {
    background-color: rgba(255, 255, 0, 0.5);
  }
  100% {
    background-color: transparent;
  }
}

button,
input[type='file'],
::-webkit-file-upload-button {
  cursor: pointer;
}
input[type='submit'] {
  font-size: 1.2em;
}
input[type='url'] {
  width: 250px;
}
input[type='number'] {
  width: 100px;
}

.radio-group {
  border: none;
  padding: 0;
  margin: 2em 0 1em;
}
.radio-group > legend {
  font-weight: bold;
}
.radio-group + .radio-group {
  margin-top: 1em;
}

.log {
  color: #b93700;
  background-color: #f0f0b4;
  padding: 10px 0;
  font-family: 'Exo', sans-serif;
  height: 100px;
  resize: vertical;
  overflow: auto;
}
.log-entry {
  padding: 0 10px;
  white-space: pre-wrap;
}
.log-error {
  background-color: red;
  color: white;
}
.log-done {
  background-color: green;
  color: white;
}
.log-progress {
  opacity: 0.5;
}

.header {
  font-size: 10px;
  position: sticky;
  background-color: rgba(50, 50, 50, 0.7);
  top: 0px;
  color: rgba(255, 255, 255, 0.9);
  margin: 0px;
  padding: 10px;
  padding-left: 15px;
  z-index: 100;
  -webkit-backdrop-filter: blur(50px);
  backdrop-filter: blur(50px);
}

.mainarea {
  margin: 50px;
  background-color: #19191e;
  color: #f0f0f0;
  padding: 25px;
  border-radius: 8px;
}
@media (max-width: 600px) {
  .mainarea {
    margin: 0;
    border-radius: 0;
  }
}
.htmlify {
  position: relative;
  top: -85px;
  padding: 15px;
  float: right;
  background-color: rgba(100, 250, 150, 0.5);
  border: 0px;
  border-radius: 5px;
  font-family: 'Roboto', sans-serif;
  height: 90px;
  transition: background-color 0.25s, border-radius 0.25s;
  -webkit-backdrop-filter: blur(50px);
  backdrop-filter: blur(50px);
  box-shadow: rgba(0, 0, 0, 0.4) 5px 5px 10px;
}
.htmlify:hover {
  background-color: #78c3ff;
  transition: background-color 0.25s;
}

.legend {
  border: solid rgba(255, 255, 255, 0.5) 1px;
  border-radius: 10px;
  padding: 5px;
  background-color: #19191e;
}

.fieldset {
  padding: 10px;
  border: solid rgba(255, 255, 255, 0.2) 1px;
  border-radius: 5px;
  background-color: #19191e;
  box-shadow: none;
  transition: box-shadow 0.25s, border 0.25s;
  margin: 1em 0;
}
.fieldset:hover {
  box-shadow: rgb(255, 255, 255, 0.8) 0px 0px 10px;
  /* Fieldsets have this really weird bug on Chrome where translucent border
  /* colours result in a thicker border-top. */
  border: solid rgba(255, 255, 255, 0.5) 1px;
  transition: box-shadow 0.25s, border 0.25s;
}

.fieldset > p:nth-child(2),
.fieldset > .radio-group > p:first-child,
.fieldset > .fieldset:nth-child(2),
.fieldset > .radio-group:nth-child(2) {
  margin-top: 0;
}
.fieldset > p:last-child,
.fieldset > .fieldset:last-child,
.fieldset > .radio-group:last-child,
.fieldset > .radio-group:last-child > p:last-child {
  margin-bottom: 0;
}

.slideframe {
  margin: 0px;
  position: relative;
  width: 100%;
  height: 100%;
  border: none;
  transition: filter 0.25s, -webkit-filter 0.25s;
}
.slideframewrapper {
  width: 100%;
  height: 42.86vw;
  transition: filter 0.25s, -webkit-filter 0.1s;
  background-color: rgba(0, 0, 0, 0.9);
}
