/* 首頁 banner 影片燈箱，搭配 js/home-video.js */
html.hv-lock {
  overflow: hidden;
}

.hv-box {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 10000;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.88);
}

.hv-box.hv-open {
  display: flex;
}

/* 16:9，寬度取「螢幕寬」「螢幕高換算的寬」「1280」三者最小，直式橫式都不會超出畫面 */
.hv-frame {
  position: relative;
  width: 1280px;
  max-width: calc(100vw - 32px);
  background: #000;
}

@media (min-aspect-ratio: 16/9) {
  .hv-frame {
    max-width: calc((100vh - 120px) * 16 / 9);
  }
}

.hv-frame:before {
  display: block;
  padding-top: 56.25%;
  content: '';
}

.hv-frame iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.hv-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 48px;
  height: 48px;
  padding: 0;
  color: #fff;
  font-size: 36px;
  line-height: 44px;
  text-align: center;
  background: rgba(255, 255, 255, 0.14);
  border: 0;
  border-radius: 50%;
  cursor: pointer;
}

.hv-close:hover {
  background: rgba(255, 255, 255, 0.28);
}

.hv-close:focus-visible {
  outline: 3px solid #fff;
  outline-offset: 2px;
}
