/* Changelog video: poster with a Play button, then a small control bar. js/changelog-video.js */

.cl-video {
  position: relative;
  overflow: hidden;
  margin-bottom: 1rem;
  border: 1px solid rgba(160, 179, 202, .5);
  border-radius: 16px;
  box-shadow: 0 0 0 5px rgba(160, 179, 202, .25);
  background: #fff;
  aspect-ratio: 16 / 9;
  -webkit-user-select: none;
  user-select: none;
}

.cl-video__media {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  cursor: pointer;
}

.cl-video button {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 0;
  background: none;
  color: #002756;
  cursor: pointer;
}

.cl-video svg {
  display: block;
}

.cl-video__play {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 64px;
  height: 64px;
  margin: -32px 0 0 -32px;
  border-radius: 50%;
  background: #fff !important;
  color: #2f7fef !important;
  box-shadow: 0 4px 16px rgba(0, 39, 86, .16);
  transition: transform .15s ease, opacity .2s ease;
}

.cl-video__play:hover {
  transform: scale(1.06);
}

.cl-video__play svg {
  margin-left: 3px;
}

.cl-video.is-playing .cl-video__play {
  opacity: 0;
  pointer-events: none;
}

.cl-video__bar {
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  height: 36px;
  padding: 0 12px 0 6px;
  border-radius: 10px;
  background: rgba(255, 255, 255, .92);
  box-shadow: 0 2px 8px rgba(0, 39, 86, .12);
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s ease;
}

.cl-video.is-started .cl-video__bar {
  opacity: 1;
  pointer-events: auto;
}

.cl-video.is-playing.is-idle .cl-video__bar {
  opacity: 0;
  pointer-events: none;
}

.cl-video.is-playing.is-idle {
  cursor: none;
}

.cl-video__toggle,
.cl-video__full {
  flex: none;
  width: 28px;
  height: 28px;
  border-radius: 6px;
}

.cl-video__toggle:hover,
.cl-video__full:hover {
  background: rgba(0, 39, 86, .06) !important;
}

.cl-video__toggle .cl-video__icon-pause,
.cl-video.is-playing .cl-video__toggle .cl-video__icon-play {
  display: none;
}

.cl-video.is-playing .cl-video__toggle .cl-video__icon-pause {
  display: block;
}

.cl-video__track {
  position: relative;
  flex: 1;
  height: 20px;
  cursor: pointer;
  touch-action: none;
  outline: none;
}

.cl-video__track::before,
.cl-video__progress {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  height: 4px;
  margin-top: -2px;
  border-radius: 2px;
}

.cl-video__track::before {
  right: 0;
  background: rgba(0, 39, 86, .12);
}

.cl-video__progress {
  width: 0;
  background: #2f7fef;
}

.cl-video__progress::after {
  content: "";
  position: absolute;
  right: -6px;
  top: -4px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #2f7fef;
  opacity: 0;
  transition: opacity .15s ease;
}

.cl-video__track:hover .cl-video__progress::after,
.cl-video__track:focus-visible .cl-video__progress::after,
.cl-video.is-seeking .cl-video__progress::after {
  opacity: 1;
}

.cl-video__time {
  flex: none;
  font-size: 12px;
  line-height: 1;
  color: rgba(0, 39, 86, .6);
  font-variant-numeric: tabular-nums;
}

.cl-video:fullscreen {
  border: 0;
  border-radius: 0;
  box-shadow: none;
  aspect-ratio: auto;
}

@media screen and (max-width: 479px) {
  .cl-video__play {
    width: 48px;
    height: 48px;
    margin: -24px 0 0 -24px;
  }

  .cl-video__bar {
    left: 8px;
    right: 8px;
    bottom: 8px;
    height: 32px;
  }
}
