@charset "utf-8";

.nex-modal-dim[data-nex-modal-variant="video"] {
  --video-modal-viewport-height: var(--initial-viewport-height);
  padding: calc(20 / var(--width) * var(--device-width));
  background: rgba(0, 0, 0, 0.8);
  -webkit-backdrop-filter: blur(calc(10 / var(--width) * var(--device-width)));
  backdrop-filter: blur(calc(10 / var(--width) * var(--device-width)));
}

.nex-modal--video {
  --video-modal-sidebar-width: calc(282 / var(--width) * var(--device-width));
  --video-modal-column-gap: calc(14 / var(--width) * var(--device-width));
  --video-modal-available-height: calc(var(--video-modal-viewport-height) - calc(80 / var(--width) * var(--device-width)) - env(safe-area-inset-top) - env(safe-area-inset-bottom));
  width: min(calc(1696 / var(--width) * var(--device-width)), calc(var(--video-modal-available-height) * 16 / 9 + var(--video-modal-sidebar-width) + var(--video-modal-column-gap)));
  max-width: none;
  max-height: var(--video-modal-available-height);
  overflow: visible;
  padding: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  color: var(--white);
}

.nex-modal--video .nex-modal__content {
  width: 100%;
  min-height: 0;
}

.nex-modal--video .nex-modal__close {
  position: absolute;
  z-index: 5;
  top: auto;
  right: calc((var(--video-modal-sidebar-width) - calc(52 / var(--width) * var(--device-width))) / 2);
  bottom: calc(54 / var(--width) * var(--device-width));
  left: auto;
  width: calc(52 / var(--width) * var(--device-width));
  height: calc(52 / var(--width) * var(--device-width));
  min-height: 0;
  margin: 0;
  padding: 0;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: calc(6 / var(--width) * var(--device-width));
  color: transparent;
  background: rgba(0, 0, 0, 0.3);
  box-shadow: none;
  font-size: 0;
  cursor: pointer;
  transition: border-color 0.25s ease, background-color 0.25s ease, box-shadow 0.25s ease;
}

.nex-modal--video .nex-modal__close::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url('/resources/img/common/ico_close.svg') center / calc(16 / var(--width) * var(--device-width)) calc(16 / var(--width) * var(--device-width)) no-repeat;
  transition: transform 0.25s ease;
}

.nex-modal--video .nex-modal__close:focus-visible {
  border-color: var(--white);
  outline: calc(2 / var(--width) * var(--device-width)) solid var(--white);
  outline-offset: calc(4 / var(--width) * var(--device-width));
  background: rgba(255, 255, 255, 0.2);
  box-shadow: none;
}

.video-modal {
  display: grid;
  grid-template-columns: minmax(0, 1fr) var(--video-modal-sidebar-width);
  gap: var(--video-modal-column-gap);
  width: 100%;
  background: transparent;
  font-size: calc(16 / var(--width) * var(--device-width));
}

.video-modal__frame {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #0f1113;
}

.video-modal__iframe {
  position: absolute;
  z-index: 0;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.video-modal__skeleton {
  position: absolute;
  z-index: 3;
  inset: 0;
  overflow: hidden;
  background: #0f1113;
  transition: opacity 0.3s ease;
}

.video-modal__skeleton::after,
.video-modal__list-placeholder::after {
  content: '';
  position: absolute;
  inset: 0;
  transform: translateX(-100%);
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.12), transparent);
  animation: video-modal-skeleton 1.4s ease-in-out infinite;
}

.video-modal__skeleton-icon {
  position: absolute;
  top: 50%;
  left: 50%;
  width: calc(54 / var(--width) * var(--device-width));
  height: calc(54 / var(--width) * var(--device-width));
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 50%;
  transform: translate(-50%, -50%);
}

.video-modal__skeleton-icon::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 53%;
  border-top: calc(7 / var(--width) * var(--device-width)) solid transparent;
  border-bottom: calc(7 / var(--width) * var(--device-width)) solid transparent;
  border-left: calc(11 / var(--width) * var(--device-width)) solid rgba(255, 255, 255, 0.55);
  transform: translate(-50%, -50%);
}

.video-modal.is-loaded .video-modal__skeleton,
.video-modal.has-thumbnail.is-thumbnail-loaded:not(.is-video-loading) .video-modal__skeleton,
.video-modal.is-thumbnail-error:not(.is-video-loading) .video-modal__skeleton {
  opacity: 0;
  pointer-events: none;
}

.video-modal__thumbnail {
  position: absolute;
  z-index: 2;
  inset: 0;
  overflow: hidden;
  background: #0f1113;
  transition: opacity 0.4s ease;
}

.video-modal__thumbnail[hidden],
.video-modal__thumbnail-image[hidden],
.video-modal__item-thumbnail[hidden],
.video-modal__play[hidden] {
  display: none;
}

.video-modal__thumbnail-image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.video-modal__play {
  position: absolute;
  top: 50%;
  left: 50%;
  display: flex;
  width: calc(72 / var(--width) * var(--device-width));
  height: calc(72 / var(--width) * var(--device-width));
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 50%;
  color: var(--white);
  background: rgba(0, 0, 0, 0.42);
  transform: translate(-50%, -50%);
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background-color 0.25s ease, transform 0.25s ease;
}

.video-modal__play span {
  width: 0;
  height: 0;
  margin-left: calc(5 / var(--width) * var(--device-width));
  border-top: calc(10 / var(--width) * var(--device-width)) solid transparent;
  border-bottom: calc(10 / var(--width) * var(--device-width)) solid transparent;
  border-left: calc(16 / var(--width) * var(--device-width)) solid currentColor;
}

.video-modal__play:hover,
.video-modal__play:focus-visible {
  background: rgba(0, 0, 0, 0.68);
  outline: calc(2 / var(--width) * var(--device-width)) solid var(--white);
  outline-offset: calc(4 / var(--width) * var(--device-width));
}

.video-modal.is-autoplay .video-modal__thumbnail {
  pointer-events: none;
}

.video-modal.is-loaded .video-modal__thumbnail {
  opacity: 0;
  pointer-events: none;
}

.video-modal__error {
  position: absolute;
  z-index: 4;
  inset: 0;
  display: flex;
  padding: calc(24 / var(--width) * var(--device-width));
  color: var(--white);
  background: rgba(0, 0, 0, 0.82);
  align-items: center;
  justify-content: center;
  flex-direction: column;
  text-align: center;
}

.video-modal__error[hidden] {
  display: none;
}

.video-modal__error p {
  margin: 0 0 calc(12 / var(--width) * var(--device-width));
}

.video-modal__error a {
  display: inline-flex;
  min-height: calc(44 / var(--width) * var(--device-width));
  padding: calc(10 / var(--width) * var(--device-width)) calc(18 / var(--width) * var(--device-width));
  border: 1px solid currentColor;
  border-radius: calc(999 / var(--width) * var(--device-width));
  align-items: center;
}

.video-modal__playlist {
  position: relative;
  display: flex;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  padding: calc(60 / var(--width) * var(--device-width)) calc(20 / var(--width) * var(--device-width)) calc(136 / var(--width) * var(--device-width));
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: rgba(0, 0, 0, 0.72);
  flex-direction: column;
  contain: size;
}

.video-modal__playlist-title {
  display: flex;
  margin: 0 0 calc(24 / var(--width) * var(--device-width));
  color: var(--white);
  font-size: calc(22 / var(--width) * var(--device-width));
  font-weight: 600;
  line-height: 1.3;
  white-space: nowrap;
  align-items: center;
  justify-content: center;
  gap: calc(8 / var(--width) * var(--device-width));
  flex-shrink: 0;
}

.video-modal__playlist-title img {
  display: block;
  width: calc(22 / var(--width) * var(--device-width));
  height: calc(26 / var(--width) * var(--device-width));
  filter: brightness(0) invert(1);
  flex-shrink: 0;
}

.video-modal__playlist-scroll {
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  flex: 1;
  overscroll-behavior: contain;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.video-modal__playlist-scroll::-webkit-scrollbar {
  display: none;
}

.video-modal__list-status {
  margin: 0 0 calc(12 / var(--width) * var(--device-width));
  color: rgba(255, 255, 255, 0.65);
  font-size: calc(12 / var(--width) * var(--device-width));
  line-height: 1.5;
  text-align: center;
}

.video-modal__list-status[hidden] {
  display: none;
}

.video-modal__list {
  display: flex;
  margin: 0;
  padding: 0;
  list-style: none;
  flex-direction: column;
  gap: calc(8 / var(--width) * var(--device-width));
}

.video-modal__list > li {
  min-width: 0;
  flex-shrink: 0;
}

.video-modal__item,
.video-modal__list-placeholder {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  padding: 0;
  border: 2px solid transparent;
  border-radius: 0;
  background: #282b2c;
}

button.video-modal__item {
  cursor: pointer;
  transition: border-color 0.25s ease;
}

.video-modal__item-thumbnail {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.5;
  transition: opacity 0.25s ease;
}

.video-modal__item.is-active {
  border-color: rgba(255, 255, 255, 0.9);
}

.video-modal__item.is-active .video-modal__item-thumbnail,
.video-modal__item:focus-visible .video-modal__item-thumbnail {
  opacity: 1;
}

.video-modal__item:focus-visible {
  border-color: var(--white);
  outline: calc(2 / var(--width) * var(--device-width)) solid var(--white);
  outline-offset: calc(-4 / var(--width) * var(--device-width));
}

.video-modal__item-label {
  position: absolute;
  width: calc(1 / var(--width) * var(--device-width));
  height: calc(1 / var(--width) * var(--device-width));
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}

.video-modal__item--pending {
  display: flex;
  border: 0;
  color: rgba(255, 255, 255, 0.48);
  background:
    linear-gradient(to top right, transparent calc(50% - calc(0.5 / var(--width) * var(--device-width))), rgba(255, 255, 255, 0.32) 50%, transparent calc(50% + calc(0.5 / var(--width) * var(--device-width)))),
    linear-gradient(to bottom right, transparent calc(50% - calc(0.5 / var(--width) * var(--device-width))), rgba(255, 255, 255, 0.32) 50%, transparent calc(50% + calc(0.5 / var(--width) * var(--device-width)))),
    #3b3d3d;
  font-size: calc(13 / var(--width) * var(--device-width));
  align-items: center;
  justify-content: center;
}

.video-modal__item-message {
  position: relative;
  padding: calc(10 / var(--width) * var(--device-width)) calc(14 / var(--width) * var(--device-width));
  background: #3b3d3d;
}

@keyframes video-modal-skeleton {
  to {
    transform: translateX(100%);
  }
}

@media screen and (min-width: 1025px) {
  .nex-modal--video .nex-modal__close:hover {
    border-color: rgba(255, 255, 255, 0.8);
    background: rgba(255, 255, 255, 0.14);
    box-shadow: 0 0 calc(18 / var(--width) * var(--device-width)) rgba(255, 255, 255, 0.12);
  }

  .nex-modal--video .nex-modal__close:hover::before {
    transform: rotate(90deg);
  }

  .video-modal__item:hover .video-modal__item-thumbnail {
    opacity: 1;
  }
}

@media screen and (max-width: 1024px) {
  .nex-modal-dim[data-nex-modal-variant="video"] {
    --video-modal-mobile-top: calc(55 / var(--width) * var(--device-width));
    --video-modal-mobile-bottom: calc(26 / var(--width) * var(--device-width));
    --video-modal-available-height: calc(var(--video-modal-viewport-height) - var(--video-modal-mobile-top) - var(--video-modal-mobile-bottom) - env(safe-area-inset-top) - env(safe-area-inset-bottom));
    padding: calc(var(--video-modal-mobile-top) + env(safe-area-inset-top)) calc(20 / var(--width) * var(--device-width)) calc(var(--video-modal-mobile-bottom) + env(safe-area-inset-bottom));
    align-items: flex-start;
    overflow-y: auto;
    overscroll-behavior: contain;
  }

  .nex-modal--video {
    --video-modal-available-height: calc(var(--video-modal-viewport-height) - var(--video-modal-mobile-top) - var(--video-modal-mobile-bottom) - env(safe-area-inset-top) - env(safe-area-inset-bottom));
    width: calc(350 / var(--width) * var(--device-width));
    max-height: var(--video-modal-available-height);
    overflow-x: hidden;
    overflow-y: auto;
    scrollbar-width: none;
  }

  .nex-modal--video .nex-modal__close {
    position: fixed;
    right: auto;
    bottom: calc(60 / var(--width) * var(--device-width));
    left: 50%;
    width: calc(44 / var(--width) * var(--device-width));
    height: calc(44 / var(--width) * var(--device-width));
    border-color: rgba(255, 255, 255, 1);
    transform: translateX(-50%);
  }

  .video-modal {
    height: max(var(--video-modal-available-height), calc(667 / var(--width) * var(--device-width)));
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto minmax(0, 1fr);
    gap: calc(10 / var(--width) * var(--device-width));
  }

  .video-modal__frame {
    width: min(calc(350 / var(--width) * var(--device-width)), calc(var(--video-modal-available-height) * 16 / 9));
    margin-inline: auto;
  }

  .video-modal__playlist {
    padding: calc(30 / var(--width) * var(--device-width)) var(--page-margin) calc(120 / var(--width) * var(--device-width));
  }

  .video-modal__playlist-title {
    margin-bottom: calc(24 / var(--width) * var(--device-width));
    font-size: calc(16 / var(--width) * var(--device-width));
  }

  .video-modal__playlist-scroll {
    -webkit-mask-image: linear-gradient(to bottom, #000 calc(100% - calc(120 / var(--width) * var(--device-width))), transparent);
    mask-image: linear-gradient(to bottom, #000 calc(100% - calc(120 / var(--width) * var(--device-width))), transparent);
  }

  .video-modal__list {
    width: 100%;
    gap: calc(10 / var(--width) * var(--device-width));
  }
}
