
/* moment — Video popup beta */

.moment-video-overlay {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(0,0,0,.88);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.moment-video-overlay[hidden] {
  display: none !important;
}

.moment-video-modal {
  position: relative;
  width: min(100%, 410px);
  max-height: calc(100dvh - 40px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 24px;
  background: #101014;
  box-shadow: 0 30px 100px rgba(0,0,0,.7);
}

.moment-video-top {
  position: relative;
  flex: none;
  min-height: 66px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px 58px;
}

.moment-video-title {
  margin: 0;
  color: #fff;
  font-size: 17px;
  font-weight: 750;
  line-height: 1.3;
  text-align: center;
}

.moment-video-close {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255,255,255,.2);
  border-radius: 50%;
  background: rgba(255,255,255,.1);
  color: #fff;
  font-size: 25px;
  cursor: pointer;
}

.moment-video-frame {
  position: relative;
  min-height: 0;
  display: grid;
  place-items: center;
  overflow: hidden;
  background: #000;
}

.moment-video-frame video {
  display: block;
  width: 100%;
  max-height: calc(100dvh - 190px);
  aspect-ratio: 9 / 16;
  object-fit: contain;
}

.moment-video-play {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  gap: 12px;
  align-content: center;
  border: 0;
  background: rgba(0,0,0,.48);
  color: #fff;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
}

.moment-video-play[hidden] {
  display: none !important;
}

.moment-video-play-icon {
  display: grid;
  place-items: center;
  width: 76px;
  height: 76px;
  border: 2px solid rgba(255,255,255,.7);
  border-radius: 50%;
  background: rgba(255,255,255,.15);
  font-size: 32px;
}

.moment-video-bottom {
  flex: none;
  padding: 17px 22px 20px;
  text-align: center;
}

.moment-video-caption {
  margin: 0;
  color: rgba(255,255,255,.8);
  font-size: 14px;
  line-height: 1.5;
}

.moment-video-sound {
  margin-top: 10px;
  padding: 8px 15px;
  border: 1px solid rgba(255,255,255,.25);
  border-radius: 999px;
  background: rgba(255,255,255,.08);
  color: #fff;
  font: inherit;
  font-size: 13px;
  cursor: pointer;
}

.moment-video-sound[hidden] {
  display: none !important;
}

@media (max-width: 480px) {
  .moment-video-overlay {
    padding: 10px;
  }

  .moment-video-modal {
    max-height: calc(100dvh - 20px);
    border-radius: 18px;
  }

  .moment-video-frame video {
    max-height: calc(100dvh - 175px);
  }
}
