/* Captions */

.story_page {
  transition: opacity 2000ms ease-out;
}

.story_page.hidden {
  pointer-events: none;
  opacity: 0;
}

.story_page .caption_cont {
  text-align: center;
  position: absolute;
  bottom: 50px;
  left: 0;
  width: 100%;
  transition: bottom 500ms ease-in-out;
  z-index: 15;
}

.story_page .caption_cont.raised {
  transition: bottom 0ms ease-in-out;
  bottom: 230px;
}

.story_page .caption {
  font-size: 22px;
  padding: 20px 40px;
  background: rgba(0,0,0,0.8);
  margin: auto;
  display: inline-block;
  border-radius: 7px;
}

@media (max-width: 700px) {
  .story_page .caption {
    font-size: 18px;
  }
}

.caption b,
.caption strong {
  font-weight: 400;
}

.story_page .caption.hidden {
  display: none;
}


/* Story Controls */

.story_page .story_controls {
}

.story_page .story_controls.hidden {
  transition: opacity 1000ms ease-out;
  pointer-events: none;
  opacity: 0;
}

.story_page .story_controls .bottom {
}

.story_page .story_controls.hidden .bottom {
  transition: transform 500ms ease-in;
  transform: translateY(100%);
}

.story_page .story_controls .back {
  position: fixed;
  top: 0;
  left: 0;
  margin: 40px;
  width: 50px;
  height: 50px;
  background: url('/static/images/arrow_back_round.svg') center/contain no-repeat;
  cursor: pointer;
}

@media (max-width: 700px) {
  .story_page .story_controls .back {
    margin: 20px;
  }
}

.story_page .story_controls .bottom {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 200px;
  z-index: 20;
  background: linear-gradient(to bottom, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 1) 100%);
}

.story_page .story_controls .center_controls {
  position: absolute;
  bottom: 120px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 20px;
  align-items: center;
  z-index: 10;
}

.story_page .story_controls .play,
.story_page .story_controls .pause,
.story_page .story_controls .replay,
.story_page .story_controls .forward {
  position: static;
}

.story_page .story_controls .play {
  display: block;
  width: 60px;
  height: 60px;
  background: url('/static/images/play_round.svg') center/contain no-repeat;
  cursor: pointer;
}

.story_page .story_controls .play.hidden {
  display: none;
}

.story_page .story_controls .pause {
  display: block;
  width: 60px;
  height: 60px;
  background: url('/static/images/pause_round.svg') center/contain no-repeat;
  cursor: pointer;
}

.story_page .story_controls .pause.hidden {
  display: none;
}

.story_page .story_controls .replay {
  display: block;
  width: 50px;
  height: 50px;
  background: url('/static/images/replay_round.svg') center/contain no-repeat;
  cursor: pointer;
}

.story_page .story_controls .forward {
  display: block;
  width: 50px;
  height: 50px;
  background: url('/static/images/forward_round.svg') center/contain no-repeat;
  cursor: pointer;
}


.story_page .story_controls .title {
  position: absolute;
  top: 160px;
  left: 40px;
  display: block;
  color: #fff;
  font-size: 14px;
  user-select: none;
}

@media (max-width: 700px) {
  .story_page .story_controls .title {
    left: 10px;
  }
}

.story_page .story_controls .sub_title {
  display: inline-block;
  color: #999;
  margin-left: 5px;
}


.story_page .story_controls .fullscreen {
  position: absolute;
  bottom: 35px;
  right: 20px;
  display: block;
  width: 50px;
  height: 50px;
  background: url('/static/images/fullscreen.svg') center/contain no-repeat;
  cursor: pointer;
}


.story_page .story_controls .fullscreen.hidden {
  display: none;
}


.story_page .story_controls .exit_fullscreen {
  position: absolute;
  bottom: 35px;
  right: 20px;
  display: block;
  width: 50px;
  height: 50px;
  background: url('/static/images/exit_fullscreen.svg') center/contain no-repeat;
  cursor: pointer;
}


.story_page .story_controls .exit_fullscreen.hidden {
  display: none;
}


.story_page .story_controls .skip_next {
  position: absolute;
  bottom: 35px;
  right: 100px;
  display: block;
  width: 50px;
  height: 50px;
  background: url('/static/images/skip_next.svg') center/contain no-repeat;
  cursor: pointer;
}


.story_page .story_controls .time {
  position: absolute;
  bottom: 60px;
  left: 40px;
  display: block;
  color: #fff;
  font-size: 14px;
  user-select: none;
}

@media (max-width: 700px) {
  .story_page .story_controls .time {
    left: 10px;
  }
}

.story_page .story_controls .duration {
  position: absolute;
  bottom: 60px;
  left: 84px;
  display: block;
  color: #fff;
  font-size: 14px;
  user-select: none;
  color: #ccc;
}

@media (max-width: 700px) {
  .story_page .story_controls .duration {
    left: 54px;
  }
}

.story_page .story_controls .progress_bg {
  position: absolute;
  bottom: 50px;
  left: 40px;
  right: 40px;
  height: 3px;
  background: #999;
  display: block;
  cursor: pointer;
}

@media (max-width: 700px) {
  .story_page .story_controls .progress_bg {
    left: 10px;
    right: 10px;
  }
}

.story_page .story_controls .progress_fg {
  position: absolute;
  top: 0px;
  left: 0px;
  width: 0;
  height: 100%;
  background: #fff;
  display: block;
}

.story_page .sound_button {
  position: absolute;
  top: 105px;
  right: 40px;
  width: 38px;
  height: 38px;
  background: url('/static/images/sound_icon.svg') center/contain no-repeat;
  cursor: pointer;
}

@media (max-width: 700px) {
  .story_page .sound_button {
    top: 85px;
    right: 20px
  }
}

.story_page .caption_button {
  position: absolute;
  top: 162px;
  right: 40px;
  width: 38px;
  height: 38px;
  background: url('/static/images/caption_icon.svg') center/contain no-repeat;
  cursor: pointer;
}

@media (max-width: 700px) {
  .story_page .caption_button {
    top: 142px;
    right: 20px;
  }
}

.story_page .caption_button.off {
  background: url('/static/images/caption_icon_off.svg') center/contain no-repeat;
}


/* volume */

.story_page .volume_cont {
  position: absolute;
  bottom: 35px;
  left: 260px;
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 100px;
}

.story_page .volume {
  display: block;
  width: 50px;
  height: 50px;
  background: url('/static/images/volume_up.svg') center/contain no-repeat;
  cursor: pointer;
  opacity: 1;
}

.story_page .volume.mute {
  background: url('/static/images/volume_off.svg') center/contain no-repeat;
}

.story_page .story_volume_slider_cont {
  position: relative;
  width: 200px;
  height: 20px;
  cursor: pointer;
}

.story_page .volume_bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  margin-top: 9px;
  background: #808080;
  overflow: hidden;
}

.story_page .story_volume_bar {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  margin-top: 9px;
  background: #fff;
}

.story_page .story_volume_slider_cont.active .story_volume_bar,
.story_page .story_volume_slider_cont:hover .story_volume_bar {
  background: #333;
}

.story_page .story_volume_ball {
  position: absolute;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  transform: translateX(-50%);
  top: 0;
  left: 100%;
  background: #fff;
  pointer-events: none;
  display: none;
}

.story_page .story_volume_slider_cont.active .story_volume_ball,
.story_page .story_volume_slider_cont:hover .story_volume_ball {
  display: block;
}


/* keyframe editor */

.keyframe_editor {
}

.keyframe_editor.hidden {
  display: none;
}

.keyframe_editor .progress_bg {
  position: absolute;
  bottom: 50px;
  left: 40px;
  right: 40px;
  height: 3px;
  background: none;
  display: block;
  cursor: pointer;
  z-index: 30;
  pointer-events: none;
}

.keyframe_editor .keyframe {
  position: absolute;
  top: 50%;
  width: 10px;
  height: 10px;
  transform: translate(-50%, -50%) rotate(45deg);
  background: #ff0;
  cursor: pointer;
  pointer-events: all;
}

.keyframe_editor .add_keyframe_button {
  position: absolute;
  bottom: 125px;
  right: 20px;
  background: #000;
  color: #ff0;
  font-weight: bold;
  font-size: 14px;
  cursor: pointer;
  padding: 10px 15px;
  user-select: none;
  z-index: 30;
}

.keyframe_editor .delete_keyframe_button {
  position: absolute;
  bottom: 185px;
  right: 20px;
  background: #000;
  color: #ff0;
  font-weight: bold;
  font-size: 14px;
  cursor: pointer;
  padding: 10px 15px;
  border: 1px solid #000;
  user-select: none;
  z-index: 30;
}

.keyframe_editor .delete_keyframe_button.active {
  border: 1px solid #ff0;
}

.keyframe_editor .duplicate_keyframes_button {
  position: absolute;
  bottom: 245px;
  right: 20px;
  background: #000;
  color: #ff0;
  font-weight: bold;
  font-size: 14px;
  cursor: pointer;
  padding: 10px 15px;
  border: 1px solid #000;
  user-select: none;
  z-index: 30;
}

.keyframe_editor .duplicate_keyframes_button.active {
  border: 1px solid #ff0;
}

.keyframe_editor .keyframe.transient {
  opacity: 0.5;
}

.keyframe_editor .keyframe.deleting {
  background: #f00;
}

.keyframe_editor .duplicate_options {
  position: absolute;
  bottom: 275px;
  right: 200px;
  font-weight: bold;
  font-size: 14px;
  z-index: 30;
  display: none;
}

.keyframe_editor .duplicate_options.active {
  display: block;
}

.keyframe_editor .duplicate_option {
  background: #000;
  color: #ff0;
  font-weight: bold;
  font-size: 14px;
  cursor: pointer;
  padding: 10px 15px;
  border: 1px solid #000;
  user-select: none;
  margin: 0 15px;
  display: inline-block;
}


/* story video */

.story_page .story_video {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  display: grid;
  place-items: center;
  opacity: 0;
  pointer-events: none;
  /*transition: opacity 1000ms;*/
  z-index: 10;
}

.story_page .story_video.active {
  opacity: 1;
  pointer-events: auto;
}

.story_page .video_wrapper {
  width: 90%;
  max-width: 900px;
}

.story_page .video_close_cont {
  background: #000;
  text-align: right;
  padding: 10px 20px;
  box-sizing: border-box;
}

.story_page .video_close {
  display: inline-block;
  width: 44px;
  height: 44px;
  background: url('/static/images/close_round_white.svg') center/contain no-repeat;
  cursor: pointer;
}

.story_page .video_cont {
  width: 100%;
  background: #000;
  overflow: hidden;
}

.story_page .video {
  width: 100%;
  height: auto;
  display: block;
  object-fit: contain;
}


