.andcode-videoblock {
  position: relative;
}

.andcode-videoblock__header {
  display: flex;
  align-items: center;
  gap: 16px;
}

.andcode-videoblock__title {
  flex: 1 1 auto;
}

.andcode-videoblock__nav {
  display: flex;
  align-items: center;
  gap: 8px;
}

.andcode-videoblock--no-public-label .andcode-videoblock__header {
  justify-content: flex-end;
}

.andcode-videoblock--no-public-label .andcode-videoblock__nav {
  margin-left: auto;
}

.andcode-videoblock__track-wrap {
  position: relative;
}

.andcode-videoblock__track-wrap::after {
  content: "";
  position: absolute;
  right: 0;
  top: 0;
  height: 100%;
  width: var(--anb-video-fade-width, 32px);
  pointer-events: none;
  background: linear-gradient(to right, rgba(255, 253, 251, 0), #fffdfb);
  z-index: 2;
}

.andcode-videoblock__track {
  display: flex;
  gap: var(--anb-video-gap, 16px);
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
  -webkit-overflow-scrolling: touch;
  scroll-snap-type: x mandatory;
  padding-bottom: 6px;
}

@media (max-width: 768px) {
  .andcode-videoblock__track {
    display: flex;
    gap: 16px;
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x mandatory;
    padding-bottom: 6px;
  }

  .andcode-videoblock__track-wrap::after {
    width: var(--anb-video-fade-width-mobile, 8px);
  }
}

.andcode-videoblock__track::-webkit-scrollbar {
  display: none;
  height: 0;
}

.andcode-videoblock__track::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.2);
  border-radius: 999px;
}

.andcode-videoblock__track .video-card {
  flex: 0 0 calc(
    (100% - (var(--anb-video-gap, 16px) * (var(--anb-video-per-view, 3) - 1)) - var(--anb-video-peek, 32px))
    / var(--anb-video-per-view, 3)
  );
}

@media (max-width: 768px) {
  .andcode-videoblock__track .video-card {
    flex: 0 0 75%;
  }
}

.andcode-videoblock.is-snap .video-card {
  scroll-snap-align: start;
}

.andcode-videoblock__arrow {
  background: transparent;
  border: 0;
  width: 32px;
  height: 32px;
  border-radius: 999px;
  display: inline-grid;
  place-items: center;
  cursor: pointer;
}

.andcode-videoblock__arrow::before {
  content: "";
  width: 28px;
  height: 28px;
  background: center / contain no-repeat;
}

.andcode-videoblock__arrow--prev::before {
  background-image: url("../icons/previous.svg");
}

.andcode-videoblock__arrow--next::before {
  background-image: url("../icons/next.svg");
}

.video-card__thumb {
  display: block;
  position: relative;
}

.video-card__title a {
  cursor: pointer;
}

.video-card__thumb img {
  display: block;
  width: 100%;
  height: auto;
}

.video-card__play {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  pointer-events: none;
}

.video-card__play::before {
  content: "";
  width: 48px;
  height: 48px;
  background: url("../icons/play.svg") center / contain no-repeat;
}

.anb-video-modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: grid;
  place-items: center;
}

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

.anb-video-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
}

.anb-video-modal__dialog {
  position: relative;
  width: min(960px, 92vw);
  background: #000;
  z-index: 1;
}

.anb-video-modal__frame {
  aspect-ratio: 16 / 9;
}

.anb-video-modal__frame iframe {
  width: 100%;
  height: 100%;
  border: 0;
}

.anb-video-modal__close {
  position: absolute;
  top: -12px;
  right: -12px;
  width: 32px;
  height: 32px;
  border-radius: 999px;
  border: 0;
  background: #fff;
}

@media (max-width: 768px) {
  .andcode-videoblock__nav {
    display: none;
  }
}
