html {
  width: 100%;
  height: 100%;
}

body {
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
  overflow: hidden;
  font-family: Roboto, sans-serif;
  font-weight: 300;
  background-color: black;
  color: white;
}

#videoContainer {
  width: 100%;
  height: 100%;
}

#video {
  width: 100%;
  height: 100%;
  margin: auto;
}

#controlsContainer {
  padding: 0 3%;
  height: auto;
}

#controls {
  height: 100%;
  max-width: initial;
}

#controls * {
  font-size: 35px;
}

#controls button {
  width: 50px;
  height: 50px;
}

#seekBar {
  height: 12px;
  border-radius: 12px;
}

#seekBar::-webkit-slider-thumb {
  width: 30px;
  height: 30px;
  border-radius: 30px;
  opacity: 0.5;
}

#bufferingSpinner {
  transform: scale(2.0);
}

.overlay-parent {
  /* Makes this a positioned ancestor of .overlay */
  position: relative;
}

.overlay {
  /* Allows this to be positioned relative to a containing .overlay-parent */
  position: absolute;
}

#idle {
  top: 0;
  left: 0;
  bottom: 0;
  right: 0;

  background: #201639;
  background: -moz-linear-gradient(-45deg,  #201639 22%, #851358 100%);
  background: -webkit-linear-gradient(-45deg,  #201639 22%,#851358 100%);
  background: linear-gradient(135deg,  #201639 22%,#851358 100%);

  background-image: url('./idle.jpg');
  background-repeat: no-repeat;
  background-size: cover;
}

 #bufferingSpinner {
    margin: auto;
    width: 50px;
    height: 50px;

    top: 0;
    left: 0;
    bottom: 0;
    right: 0;
  }

  #controlsContainer {
    width: 100%;
    height: 35px;
    padding: 0 5px;
    margin: 0 auto 5px;
    box-sizing: border-box;

    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;

    bottom: 5px;
  }

  #controls {
    width: 100%;
    max-width: 800px;
    height: 35px;
    margin: 0;
    padding: 0 0 0 7px;

    background-color: rgba(20, 20, 20, 0.8);
    border-radius: 5px;

    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;

    opacity: 0;
    transition: opacity 0.3s;
  }

  /* Show the controls when the mouse is over them.  This overrides the mouse
   * timeout logic in JS that is used to hide the controls when the mouse stops
   * moving over the video container.
   */
  #controls:hover {
    opacity: 1;
  }

  /* NOTE: These fullscreen pseudo-classes can't be combined.  Browsers ignore
   * the rest of the list once they hit one prefix they don't support.
   */
  #videoContainer:fullscreen { width: 100%; height: 100%; }
  #videoContainer:-webkit-full-screen { width: 100%; height: 100%; }
  #videoContainer:-moz-full-screen { width: 100%; height: 100%; }
  #videoContainer:-ms-fullscreen { width: 100%; height: 100%; }

  #controls button {
    color: white;
    height: 32px;
    width: 32px;
    padding: 0;
    margin: 0 7px 0 0;
    background: transparent;
    border: 0;
    outline: none;
    border-radius: 4px;
    cursor: pointer;
  }

  #controls button:active {
    background: rgba(100, 100, 100, 0.4);
  }

  #controls button:disabled {
    color: rgba(255, 255, 255, 0.3);
  }

  #controls input[type="range"] {
    cursor: pointer;
  }

  #castReceiverName {
    display: none;

    background-color: rgba(0, 0, 0, 0.5);
    color: white;
    font-size: 150%;
    padding: 5px;

    bottom: 50px;
    left: 0;
    right: 0;
    margin: auto;
    width: max-content;
  }

  #giantPlayButtonContainer {
    margin: auto;
    width: 200px;
    height: 200px;

    top: 0;
    left: 0;
    bottom: 0;
    right: 0;
  }

  #giantPlayButton {
    width: 100%;
    height: 100%;
    font-size: 150px;
    margin: 0;
    padding: 0;
    border: 0;
    outline: none;
    background: rgba(100, 100, 100, 0.4);
    border-radius: 40px;
  }

  #pauseButton, #unmuteButton,
  #castButton, #castConnectedButton,
  #rewindButton, #fastForwardButton,
  #giantPlayButtonContainer, #bufferingSpinner {
    display: none;
  }

  #currentTime {
    display: flex;
    flex-grow: 0;
    margin: 0 9px 0 0;
    font-family: sans-serif;
    font-size: 13px;
    font-weight: bold;
    color: white;

    cursor: default;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
  }


  /* Always show controls while casting */
  #controls.casting {
    opacity: 1;
  }

  /* Hide fullscreen button while casting */
  #controls.casting #fullscreenButton {
    display: none;
  }


  /* NOTE: pseudo-elements for different browsers can't be combined with commas.
   * Browsers will ignore styles if any pseudo-element in the list is unknown.
   */

  /* range inputs, common style */
  #seekBar, #volumeBar {
    display: flex;
    height: 7px;
    margin: 0 12px 0 0;
    padding: 0;

    /* removes webkit default styling */
    -webkit-appearance: none;

    border: 1px solid #666;
    border-radius: 4px;
    background-color: black;
    outline: none;
  }
  /* removes mozilla default styling */
  #seekBar::-moz-range-track, #volumeBar::-moz-range-track {
    background-color: transparent;
    outline: none;
  }
  /* removes IE default styling */
  #seekBar::-ms-track, #seekBar::-ms-fill-lower, #seekBar::-ms-fill-upper,
  #volumeBar::-ms-track, #volumeBar::-ms-fill-lower, #volumeBar::-ms-fill-upper {
    background-color: transparent;
    outline: none;
  }

  /* per-instance styles */
  #seekBar {
    flex-grow: 1;
  }
  #volumeBar {
    flex-grow: 0;
    min-width: 15px;
    max-width: 70px;
  }


  /* thumb pseudo-element, common style */
  #seekBar::-webkit-slider-thumb, #volumeBar::-webkit-slider-thumb {
    -webkit-appearance: none;
    background-color: white;
    outline: none;
  }
  #seekBar::-moz-range-thumb, #volumeBar::-moz-range-thumb {
    background-color: white;
    outline: none;
  }
  #seekBar::-ms-thumb, #volumeBar::-ms-thumb {
    background-color: white;
    outline: none;
  }

  /* thumb pseudo-element, seek style */
  #seekBar::-webkit-slider-thumb {
    width: 18px;
    height: 11px;
    border-radius: 8px;
  }
  #seekBar::-moz-range-thumb {
    width: 18px;
    height: 11px;
    border-radius: 8px;
  }
  #seekBar::-ms-thumb {
    width: 18px;
    height: 11px;
    border-radius: 8px;
  }

  /* thumb pseudo-element, volume style */
  #volumeBar::-webkit-slider-thumb {
    width: 12px;
    height: 12px;
    border-radius: 12px;
  }
  #volumeBar::-moz-range-thumb {
    width: 12px;
    height: 12px;
    border-radius: 12px;
  }
  #volumeBar::-ms-thumb {
    width: 12px;
    height: 12px;
    border-radius: 12px;
  }

  /* turn off tooltips for the seekBar on IE */
  #seekBar::-ms-tooltip {
    display: none;
  }

  /* hide volume and mute buttons on mobile-sized screens */
  @media screen and (max-width: 700px) {
    #volumeBar, #muteButton {
      display: none;
    }
  }

  .spinnerSvg {
    animation: rotate 2s linear infinite;
    height: 100%;
    transform-origin: center center;
    width: 100%;
    position: absolute;
    top: 0; bottom: 0; left: 0; right: 0;
    margin: auto;
  }

  .spinnerPath {
    stroke: #d62d20;
    stroke-dasharray: 20, 200;
    stroke-dashoffset: 0;

    animation:
      dash 1.5s ease-in-out infinite,
      color 6s ease-in-out infinite;
    stroke-linecap: round;
  }

  @keyframes rotate {
    100% {
      transform: rotate(360deg);
    }
  }

  @keyframes dash {
    0% {
      stroke-dasharray: 1, 200;
      stroke-dashoffset: 0;
    }
    50% {
      stroke-dasharray: 89, 200;
      stroke-dashoffset: -35px;
    }
    100% {
      stroke-dasharray: 89, 200;
      stroke-dashoffset: -124px;
    }
  }

  @keyframes color {
    100%, 0% {
      stroke: #d62d20;
    }
    40% {
      stroke: #0057e7;
    }
    66% {
      stroke: #008744;
    }
    80%, 90% {
      stroke: #ffa700;
    }
  }

#subtitleContainer {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
}

#subtitleElement {
    white-space: pre;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    margin: 1.5%;
    direction: ltr;
    writing-mode: horizontal-tb;
    unicode-bidi: plaintext;
    text-align: center;
    font-size: 32px;
}

#subtitleImage {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    margin: 0 auto 1.5%;
}
