.laive-nh-video {
  width: 100%;
  position: relative;
  overflow: hidden;
}

.laive-nh-video--empty {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 200px;
  padding: 24px;
  text-align: center;
  background: #f4f6f8;
  color: #5c6670;
  border-radius: 8px;
}

.laive-nh-video__player,
.laive-nh-video video {
  display: block;
  width: 100%;
  height: 100%;
}

.laive-nh-video--cover .laive-nh-video__player,
.laive-nh-video--cover video {
  object-fit: cover;
  object-position: center center;
}

.laive-nh-video--grayscale-hover:not(.is-playing) .laive-nh-video__player {
  filter: grayscale(100%);
  transition: filter 0.35s ease;
}

.laive-nh-video--grayscale-hover:not(.is-playing):hover .laive-nh-video__player {
  filter: grayscale(0%);
}

.laive-nh-video--grayscale-hover.is-playing .laive-nh-video__player {
  filter: none;
}

.laive-nh-video--grayscale-hover:not(.is-playing) .laive-nh-video__toggle[data-state="paused"]::before {
  filter: grayscale(100%);
  transition: filter 0.35s ease;
}

.laive-nh-video--grayscale-hover:not(.is-playing) .laive-nh-video__toggle[data-state="paused"]:hover::before,
.laive-nh-video--grayscale-hover:not(.is-playing):hover .laive-nh-video__toggle[data-state="paused"]::before {
  filter: grayscale(0%);
}

.laive-nh-video--grayscale-hover.is-playing .laive-nh-video__toggle::before {
  filter: none;
}

@media (prefers-reduced-motion: reduce) {
  .laive-nh-video--grayscale-hover:not(.is-playing) .laive-nh-video__player,
  .laive-nh-video--grayscale-hover:not(.is-playing) .laive-nh-video__toggle[data-state="paused"]::before {
    transition: none;
  }
}

.laive-nh-video__bubble {
  --laive-nh-bubble-bg: #ffffff;
  --laive-nh-bubble-arrow: 10px;
  --laive-nh-bubble-offset: 14px;
  position: absolute;
  z-index: 4;
  left: 50%;
  top: 72%;
  transform: translate(-50%, var(--laive-nh-bubble-offset));
  width: max-content;
  max-width: min(280px, 88%);
  background-color: var(--laive-nh-bubble-bg);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition:
    opacity 0.35s ease,
    transform 0.35s ease,
    visibility 0.35s ease;
}

.laive-nh-video__bubble::before {
  content: "";
  position: absolute;
  top: calc(var(--laive-nh-bubble-arrow) * -1);
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 0;
  border-left: var(--laive-nh-bubble-arrow) solid transparent;
  border-right: var(--laive-nh-bubble-arrow) solid transparent;
  border-bottom: var(--laive-nh-bubble-arrow) solid var(--laive-nh-bubble-bg);
}

.laive-nh-video__bubble-text {
  margin: 0;
  color: #4a4f55;
  line-height: 1.45;
}

.laive-nh-video--has-bubble:not(.is-playing):hover .laive-nh-video__bubble,
.laive-nh-video--bubble-edit .laive-nh-video__bubble {
  opacity: 1;
  visibility: visible;
  transform: translate(-50%, 0);
}

.laive-nh-video.is-playing .laive-nh-video__bubble {
  opacity: 0;
  visibility: hidden;
  transform: translate(-50%, var(--laive-nh-bubble-offset));
}

@media (prefers-reduced-motion: reduce) {
  .laive-nh-video__bubble {
    transition: none;
  }
}

.laive-nh-video[data-nh-dblclick] {
  cursor: pointer;
}

.laive-nh-video.is-fullscreen,
.laive-nh-video:fullscreen,
.laive-nh-video:-webkit-full-screen,
.laive-nh-video:-moz-full-screen {
  width: 100vw !important;
  height: 100vh !important;
  max-width: none !important;
  max-height: none !important;
  border-radius: 0 !important;
  background: #000000;
}

.laive-nh-video.is-fullscreen .laive-nh-video__player,
.laive-nh-video:fullscreen .laive-nh-video__player,
.laive-nh-video:-webkit-full-screen .laive-nh-video__player,
.laive-nh-video:-moz-full-screen .laive-nh-video__player,
.laive-nh-video.is-fullscreen video,
.laive-nh-video:fullscreen video,
.laive-nh-video:-webkit-full-screen video,
.laive-nh-video:-moz-full-screen video {
  position: absolute !important;
  inset: 0 !important;
  width: 100% !important;
  height: 100% !important;
  max-width: none !important;
  max-height: none !important;
  border-radius: 0 !important;
  object-fit: contain !important;
  object-position: center center;
  filter: none !important;
  background: #000000;
}

.laive-nh-video.is-fullscreen .laive-nh-video__bubble,
.laive-nh-video:fullscreen .laive-nh-video__bubble,
.laive-nh-video:-webkit-full-screen .laive-nh-video__bubble,
.laive-nh-video:-moz-full-screen .laive-nh-video__bubble {
  display: none !important;
}

.laive-nh-lightbox {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  box-sizing: border-box;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.laive-nh-lightbox.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.laive-nh-lightbox__overlay {
  position: absolute;
  inset: 0;
  background: rgba(26, 31, 36, 0.88);
}

.laive-nh-lightbox__dialog {
  position: relative;
  z-index: 1;
  width: fit-content;
  max-width: min(960px, calc(100vw - 48px));
  background: #ffffff;
  border-radius: 24px;
  overflow: hidden;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.35);
}

.laive-nh-lightbox__close {
  position: absolute;
  top: 16px;
  right: 16px;
  z-index: 5;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: #6b7280;
  color: #ffffff;
  font-size: 0;
  line-height: 0;
  cursor: pointer;
  transition: background 0.2s ease;
}

.laive-nh-lightbox__close:hover,
.laive-nh-lightbox__close:focus-visible {
  background: #4b5563;
}

.laive-nh-lightbox__close::before,
.laive-nh-lightbox__close::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 16px;
  height: 2px;
  background: #ffffff;
  border-radius: 1px;
}

.laive-nh-lightbox__close::before {
  transform: translate(-50%, -50%) rotate(45deg);
}

.laive-nh-lightbox__close::after {
  transform: translate(-50%, -50%) rotate(-45deg);
}

.laive-nh-lightbox__player.laive-nh-video {
  width: var(--laive-nh-player-width, 100%);
  max-width: 100%;
  height: auto;
  position: relative;
  overflow: hidden;
  aspect-ratio: var(--laive-nh-aspect, 16 / 9);
  background: #000000;
}

.laive-nh-lightbox__player .laive-nh-video__player {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center center;
  background: #000000;
}

.laive-nh-lightbox__player .laive-nh-video__toggle {
  z-index: 5;
}

.laive-nh-lightbox__player .laive-nh-video__bar {
  z-index: 5;
}

body.laive-nh-lightbox-open {
  overflow: hidden;
}

@media (prefers-reduced-motion: reduce) {
  .laive-nh-lightbox {
    transition: none;
  }
}
