body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  margin: 0;
}

:root {
  --text-color: #16161d;
  --background-color: white;
  --shadow-color: var(--text-color);
}

@media (prefers-color-scheme: dark) {
  :root {
    --text-color: white;
    --background-color: #16161d;
  }
  body {
    color: var(--text-color);
    background-color: var(--background-color);
  }
}

#iframe {
  border: none;
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

#menu {
  width: 48px;
  height: 48px;
  top: 0;
  right: 0;
  position: fixed;
  z-index: 9;
  border: none;
  color: #16161d;
  opacity: .8;
  font-size: 18px;
  transition: font-size 100ms cubic-bezier(0.4, 0.0, 0.2, 1);
  text-align: right;
}

#menu svg {
  width: 1em;
  height: 1em;
}

#menu.open,
#menu:hover {
  color: white;
  opacity: 1.0;
  font-size: 48px;
}

#menu.open svg,
#menu:hover svg {
  background: #16161d;
}

#menu.open svg .inner,
#menu:hover svg .inner {
  fill: white;
}

#menu.open svg .outer,
#menu:hover svg .outer {
  fill: transparent;
}

#warning {
  position: absolute;
  border-radius: 4px;
  background-color: #feecc2;
  padding: 1em;
  font-size: 16px;
  width: 20em;
  z-index: 100;
  top: 10vh;
  left: 50vw;
  margin-left: -10em;
}

#warning:empty {
  display: none;
}

body:not(.loading) #loader {
  top: -6em;
  transition: top 300ms ease-in;
}

#loader {
  border-radius: 0.1em;
  width: 0.5em;
  height: .5em;
  font-size: 10px;
  margin: 0 auto;
  top: 0em;
  position: relative;
  text-indent: -9999em;
  color: white;
  opacity: 1.0;
  transition: top 600ms ease-out;
  animation: turntable 2.8s infinite ease-in-out;
  animation-delay: -0.16s;
}

@keyframes turntable {
  0%, 100% {
    box-shadow: 0.00em 2.25em 0 0.20em rgba(127,127,127,1.50),
                2.85em 2.08em 0 0.13em rgba(127,127,127,0.81),
                -2.85em 1.92em 0 0.07em rgba(127,127,127,0.19),
                0.00em 1.75em 0 0.00em rgba(127,127,127,-0.50);
  }
  25% {
    box-shadow: 2.85em 2.08em 0 0.13em rgba(127,127,127,0.81),
                -2.85em 1.92em 0 0.07em rgba(127,127,127,0.19),
                0.00em 1.75em 0 0.00em rgba(127,127,127,-0.50),
                0.00em 2.25em 0 0.20em rgba(127,127,127,1.50);
  }
  50% {
    box-shadow: -2.85em 1.92em 0 0.07em rgba(127,127,127,0.19),
                0.00em 1.75em 0 0.00em rgba(127,127,127,-0.50),
                0.00em 2.25em 0 0.20em rgba(127,127,127,1.50),
                2.85em 2.08em 0 0.13em rgba(127,127,127,0.81);
  }
  75% {
    box-shadow: 0.00em 1.75em 0 0.00em rgba(127,127,127,-0.50),
                0.00em 2.25em 0 0.20em rgba(127,127,127,1.50),
                2.85em 2.08em 0 0.13em rgba(127,127,127,0.81),
                -2.85em 1.92em 0 0.07em rgba(127,127,127,0.19);
  }
}

.dialog {
  border: 2px solid white;
  border-radius: 4px;
  box-shadow: 0 0 0 2px black, inset 0 0 0 3px black;
  min-width: 300px;
  padding: 1.2em;
  display: flex;
  font-size: 18px;
  font-weight: 600;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

dialog::backdrop {
  background: rgba(255,255,255,0.5);
}

dialog#qr-dialog {
  display: flex;
  flex-direction: column;
}

dialog#qr-dialog div {
  text-align: center;
}

.dialog button {
  border: 1px solid white;
  border-radius: 9px;
  box-shadow: inset 0 0 0 2px black;
  min-width: 4em;
  min-height: 1.8em;
  background-color: white;
  margin-left: 1em;
  padding: 0 0.8em;
  color: currentColor;
  font-size: 18px;
  font-weight: 600;
}

.dialog button:last-child {
  box-shadow: 0 0 0 4px black, inset 0 0 0 2px black;
}

.dialog form {
  text-align: right;
  margin-top: 1em;
  font-size: 18px;
}

dialog.menu {
  top: 48px;
  right: 0;
  position: fixed;
  margin: 0;
  left: auto;
  padding: 0;
  bottom: 0;
  max-width: 16em;
  font-weight: bold;
  padding-bottom: .8em;
}

.menu-container {
  display: flex;
  flex-direction: column;
}

.menu .url {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  opacity: 0.5;
  padding: 0.2em 0.8em;
  width: auto;
  border: 1.9px solid black;
  flex: 1 1 auto;
  margin: 2px;
  font-size: 16px;
}

.menu hr {
  background-color: var(--text-color);
  height: 2px;
  width: 100%;
  border: none;
}

.menu .menu-icons {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0;
  cursor: default;
}

.menu .menu-icons .menu-item {
  width: 24px;
  height: 24px;
  padding: 12px;
}

.menu .menu-icons .menu-item svg {
  width: 2em;
  height: 2em;
  font-size: 12px;
}

.menu .menu-item {
  padding: 0.65em 1em;
  cursor: default;
  color: var(--text-color);
  text-decoration: none;
  line-height: 2em;
  text-align: left;
  display: block;
}

.menu .menu-item:hover {
  background-color: black;
  color: white;
}

.menu {
  color: var(--text-color);
  border: 2px solid currentColor;
  padding: 0.5em 0;
  box-shadow: 2px 2px var(--shadow-color);
  margin-right: 2px;
  border-radius: 2px;
  margin-top: -2px;
  z-index: 300;
  position: absolute;
  background-color: var(--background-color);
}
