body{
  font-family: sans-serif;
  margin: 20px;
}

body.paused{
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
  text-size-adjust: none;
  -webkit-text-size-adjust: none;
  touch-action: manipulation;
}

img,  video{
  display: block;
  max-width: 100%;
}
h1{
  text-align: center;
  font-size: 1.5rem;
}
#slide-elements{
  display: grid;
  grid-area: 1/1;

}
#slide-elements > *{
  grid-area: 1/1;
  opacity: 0;
  visibility: none;
}
#slide-elements > .active{ 
  opacity: 1;
  visibility: visible;
}

#slide{
  display: grid;
  border-radius: 4px;
  overflow: hidden;
  margin: 20px auto;
  max-width: 800px;
  background: black;
}
#slide-controls{
  grid-area: 1/1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  position: relative; 
}
#slide-controls button{
  opacity: 0;
  appearance: none;
  -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
}

#slide-thumb{
  display: flex;
  position: absolute;
  width: 100%;
  pointer-events: none;
}

#slide-thumb > span{
  flex: 1;
  display: block;
  height: 4px;
  background: rgba(255, 255, 255, .2);
  /* background: blue; */
  margin: 5px;
  border-radius: 4px;
  overflow: hidden;
  isolation: isolate;
}

#slide-thumb .thumb-item.active{
  display: block;
  height: inherit;
  background: rgba(255, 255, 255, .9);
  border-radius: 4px;
  transform: translateX(-100%);
  animation: thumb forwards linear running;
}

#slide-thumb .thumb-item.paused{
  animation-play-state: paused;
}

@keyframes thumb{
  to {
    transform: initial;
  }
}