.js-video-playlist .editor-styles-wrapper p {
  margin-top: 0 !important;
  margin-bottom: 0 !important;
}

.editor-styles-wrapper .js-video-description-row + .js-video-description-row {
  margin-top: 8px;
}

.js-video-player,
.js-video-player-single {
  width: 100%;
  aspect-ratio: 16 / 9;
}
/*
|--------------------------------------------------------------------------
| Block: Video
|--------------------------------------------------------------------------
*/

.js-video-playlist-episodes {
  width: 100%;
  max-width: none;
  max-height: 320px;
  overflow-y: auto;
  padding: 4px 20px 4px 4px;
  scrollbar-width: none;
}

.js-video-playlist-episodes::-webkit-scrollbar {
  display: none;
}

@media (min-width: 768px) {
  .js-video-playlist-episodes {
    max-height: 368px;
  }
}

/* QA ID 258/259: su desktop niente altezza fissa — la lista episodi riempie
   in assoluto la colonna (self-stretch sulla riga della playlist), sotto
   l'etichetta "Episodi" (32px + gap 16px), e scorre solo se serve. */
@media (min-width: 1024px) {
  .js-video-playlist-episodes-wrap {
    position: absolute;
    inset: 48px 0 0 0;
    max-width: 100%;
  }

  .js-video-playlist-episodes {
    height: 100%;
    max-height: none;
    padding-right: 16px;
  }
}

@media (min-width: 1280px) {
  .js-video-playlist-episodes-wrap {
    width: 384px;
    max-width: 384px;
  }
}

.js-video-episodes-bar {
  position: absolute;
  top: 4px;
  right: 0;
  bottom: 4px;
  display: flex;
  width: 4px;
  flex-direction: column;
  align-items: center;
  cursor: pointer;
  touch-action: none;
}

.js-video-episodes-bar[hidden] {
  display: none;
}

.js-video-episodes-bar__segment {
  width: 2px;
  min-height: 0;
  border-radius: 1px;
  background: #8b8b99;
}

.js-video-episodes-bar__segment--before {
  flex: 0 1 auto;
}

.js-video-episodes-bar__segment--after {
  flex: 1 1 0;
}

.js-video-episodes-bar__thumb {
  flex: none;
  width: 4px;
  margin-block: 2px;
  border-radius: 1px;
  background: var(--color-primary, #0072ce);
  cursor: grab;
  transition: width 0.18s ease, margin 0.18s ease;
}

.js-video-episodes-bar:hover .js-video-episodes-bar__thumb,
.js-video-episodes-bar.is-dragging .js-video-episodes-bar__thumb {
  width: 6px;
  margin-block: 4px;
  border-radius: 2px;
}

.js-video-episodes-bar.is-dragging .js-video-episodes-bar__thumb {
  cursor: grabbing;
}

.js-video-tab.is-active {
  border-color: var(--color-primary, #0072ce);
}

.js-video-tab:hover:not(.is-active),
.js-video-tab:focus-visible:not(.is-active) {
  background: #edf7ff;
}

.js-video-tab:focus-visible {
  border-color: var(--color-primary, #0072ce);
  outline: none;
}
