.wfg-vl-library,
.wfg-vl-library * {
  box-sizing: border-box;
}

.wfg-vl-library {
  position: relative;
  /* Follow the width supplied by the SWELL page/container.
     The plugin no longer expands beyond its parent content area. */
  width: 100%;
  max-width: 100%;
  margin-inline: 0;
  padding: var(--wfg-vl-library-padding-top, 0) var(--wfg-vl-library-padding-inline-mobile, 6px) var(--wfg-vl-library-padding-bottom, 44px);
  color: #111;
  --wfg-vl-cols: var(--wfg-vl-mobile-cols, 3);
  --wfg-vl-gap: 6px;
  --wfg-vl-shell-max: 100%;
  --wfg-vl-row-gap: 14px;
  --wfg-vl-slide-width: var(--wfg-vl-mobile-slide-width, calc(33.333333% - 5.333px));
}

.wfg-vl-shell {
  width: min(100%, var(--wfg-vl-shell-max));
  margin-inline: auto;
}

.wfg-vl-notice {
  padding: 16px;
  border: 1px solid #dcdcde;
  border-radius: 8px;
  background: #fff;
}

.wfg-vl-category-nav {
  z-index: 9990;
  margin: var(--wfg-vl-category-nav-margin-top, 0) var(--wfg-vl-category-nav-margin-inline-mobile, -6px) var(--wfg-vl-category-nav-margin-bottom, 18px);
  padding: var(--wfg-vl-category-nav-padding-block, 8px) var(--wfg-vl-category-nav-padding-inline-mobile, 6px);
  background: var(--wfg-vl-sticky-bg, rgba(255,255,255,.96));
  border-bottom: 1px solid rgba(0, 0, 0, 0.07);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

/* CSS sticky is the no-JavaScript fallback. JavaScript upgrades it to a
   fixed-position implementation so theme overflow rules cannot disable it. */
.wfg-vl-library--sticky-nav .wfg-vl-category-nav:not(.is-js-managed) {
  position: sticky;
  top: 0;
}

.wfg-vl-category-nav-placeholder {
  width: 100%;
  pointer-events: none;
}

.wfg-vl-category-nav-placeholder[hidden] {
  display: none !important;
}

.wfg-vl-category-nav.is-js-managed {
  position: relative;
  top: auto;
}

.wfg-vl-category-nav.is-fixed {
  position: fixed !important;
  z-index: 99990;
  margin: 0 !important;
  max-width: none !important;
  transform: translateZ(0);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
  will-change: left, width;
}

/* The fixed navigation is moved to body while following the viewport. This
   prevents theme wrappers with overflow or transform from disabling sticky. */
.wfg-vl-category-nav.is-portaled {
  box-sizing: border-box;
  isolation: isolate;
}

.wfg-vl-category-nav.is-portaled .wfg-vl-category-nav__inner {
  width: min(100%, var(--wfg-vl-shell-max));
  margin-inline: auto;
}

.wfg-vl-category-nav__inner {
  display: flex;
  gap: var(--wfg-vl-category-nav-gap, 8px);
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  scrollbar-width: none;
  scroll-snap-type: x proximity;
}

.wfg-vl-category-nav__inner::-webkit-scrollbar,
.wfg-vl-track::-webkit-scrollbar {
  display: none;
}

.wfg-vl-category-nav__button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  min-height: var(--wfg-vl-category-height, 36px);
  padding: var(--wfg-vl-category-padding-block, 7px) var(--wfg-vl-category-padding-inline, 15px);
  border: 1px solid var(--wfg-vl-category-border, #f78da7);
  border-radius: var(--wfg-vl-category-radius, 6px);
  background-color: var(--wfg-vl-category-bg, #f78da7) !important;
  background-image: none !important;
  color: var(--wfg-vl-category-text, #ffffff) !important;
  font: inherit;
  font-size: var(--wfg-vl-category-font-size, 13px);
  font-weight: var(--wfg-vl-category-font-weight, 700);
  line-height: 1.15;
  white-space: nowrap;
  cursor: pointer;
  text-decoration: none !important;
  scroll-snap-align: center;
  transition: background-color 160ms ease, color 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

.wfg-vl-category-nav__button:focus-visible {
  outline: 2px solid #000;
  outline-offset: 2px;
}

.wfg-vl-category-nav__button:link,
.wfg-vl-category-nav__button:visited,
.wfg-vl-category-nav__button:active {
  background-color: var(--wfg-vl-category-bg, #f78da7) !important;
  background-image: none !important;
  color: var(--wfg-vl-category-text, #ffffff) !important;
}

.wfg-vl-category-nav__button:hover {
  background-color: var(--wfg-vl-category-hover-bg, #e87895) !important;
  background-image: none !important;
  color: var(--wfg-vl-category-text, #ffffff) !important;
}

.wfg-vl-category-nav__button.is-active {
  background-color: var(--wfg-vl-category-active-bg, #f78da7) !important;
  background-image: none !important;
  color: var(--wfg-vl-category-active-text, #ffffff) !important;
  border-color: var(--wfg-vl-category-border, #f78da7) !important;
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.52);
}

.wfg-vl-rows {
  container-type: inline-size;
}

.wfg-vl-row {
  position: relative;
  margin: 0 0 var(--wfg-vl-row-gap, 20px);
  scroll-margin-top: calc(var(--wfg-vl-category-height, 36px) + 34px);
}

.wfg-vl-row:last-child {
  margin-bottom: 0;
}

.wfg-vl-row__header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  min-height: 0;
  margin: 0 0 6px;
  padding: 0;
}

/* Category heading: keep SWELL's global H2 decoration from turning this into
   a filled banner. The heading stays compact and close to its video row. */
.wfg-vl-library .wfg-vl-row__title {
  display: inline-block !important;
  width: auto !important;
  max-width: 100%;
  margin: 0 !important;
  padding: 0 0 7px !important;
  border: 0 !important;
  border-bottom: 2px solid var(--wfg-vl-heading-accent, #f78da7) !important;
  border-radius: 0 !important;
  background: transparent !important;
  background-color: transparent !important;
  background-image: none !important;
  box-shadow: none !important;
  color: var(--wfg-vl-heading-text, #4b342e) !important;
  font-size: var(--wfg-vl-title-size-mobile, clamp(1rem, 4vw, 1.28rem));
  font-weight: 800;
  line-height: 1.25;
  text-align: left !important;
}

.wfg-vl-library .wfg-vl-row__title::before,
.wfg-vl-library .wfg-vl-row__title::after {
  display: none !important;
  content: none !important;
}

.wfg-vl-row__nav {
  display: none;
  gap: 7px;
}

.wfg-vl-row__prev,
.wfg-vl-row__next {
  display: grid;
  width: 34px;
  height: 34px;
  padding: 0;
  place-items: center;
  border: 1px solid rgba(0, 0, 0, 0.15);
  border-radius: 999px;
  background: var(--wfg-vl-arrow-bg, #fff);
  color: var(--wfg-vl-arrow-text, #111);
  font: inherit;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
}

.wfg-vl-row__prev:disabled,
.wfg-vl-row__next:disabled {
  opacity: 0.28;
  cursor: default;
}

.wfg-vl-track {
  display: flex;
  gap: var(--wfg-vl-gap, 8px);
  width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 0 0 3px;
  scroll-behavior: smooth;
  scroll-snap-type: x mandatory;
  overscroll-behavior-inline: contain;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.wfg-vl-slide {
  /* Fallback first, then CSS arithmetic so --wfg-vl-*-cols can control the
     visible card count without a PHP/admin layout setting. */
  flex: 0 0 var(--wfg-vl-slide-width);
  flex-basis: calc((100% - ((var(--wfg-vl-cols) - 1) * var(--wfg-vl-gap))) / var(--wfg-vl-cols));
  min-width: 0;
  scroll-snap-align: start;
}

.wfg-vl-card {
  min-width: 0;
}

.wfg-vl-card__poster-wrap {
  position: relative;
  overflow: hidden;
  border-radius: var(--wfg-vl-card-radius, 0px);
  background: #111;
  box-shadow: 0 5px 18px rgba(0, 0, 0, 0.12);
}

.wfg-vl-card__open {
  position: relative;
  display: block;
  width: 100%;
  padding: 0;
  overflow: hidden;
  border: 0;
  border-radius: inherit;
  background: #111;
  cursor: pointer;
}

.wfg-vl-card__poster {
  display: block;
  width: 100%;
  aspect-ratio: 9 / 16;
  object-fit: cover;
  transition: transform 200ms ease, opacity 200ms ease;
}

.wfg-vl-card__open:hover .wfg-vl-card__poster,
.wfg-vl-card__open:focus-visible .wfg-vl-card__poster {
  transform: scale(1.025);
  opacity: 0.92;
}

.wfg-vl-card__play {
  position: absolute;
  top: 50%;
  left: 50%;
  width: clamp(32px, 10vw, 48px);
  height: clamp(32px, 10vw, 48px);
  border-radius: 999px;
  background: var(--wfg-vl-play-bg, rgba(0,0,0,.64));
  transform: translate(-50%, -50%);
  box-shadow: 0 3px 12px rgba(0,0,0,.2);
}

.wfg-vl-card__play::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 54%;
  border-top: 7px solid transparent;
  border-bottom: 7px solid transparent;
  border-left: 12px solid #fff;
  transform: translate(-50%, -50%);
}

.wfg-vl-card__like {
  position: absolute;
  right: 4px;
  bottom: 4px;
  z-index: 4;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: auto;
  min-width: 22px;
  min-height: 22px;
  padding: 1px 2px;
  border-radius: 999px;
  background: var(--wfg-vl-like-bg, rgba(255,255,255,.32));
  box-shadow: 0 1px 6px rgba(0, 0, 0, 0.14);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.wfg-vl-card__like .wp_ulike_general_class,
.wfg-vl-card__like .wp_ulike_btn,
.wfg-vl-card__like .count-box,
.wfg-vl-card__like .wp_ulike_put_image {
  margin: 0 !important;
  border: 0 !important;
  background-color: transparent !important;
  box-shadow: none !important;
}

.wfg-vl-card__like .wp_ulike_general_class {
  display: inline-flex !important;
  align-items: center !important;
  gap: 0 !important;
  min-width: 0 !important;
  min-height: 0 !important;
  padding: 0 !important;
}

.wfg-vl-card__like .wp_ulike_btn,
.wfg-vl-card__like .wp_ulike_put_image {
  width: 16px !important;
  height: 16px !important;
  min-width: 16px !important;
  min-height: 16px !important;
  padding: 0 !important;
  background-size: 12px 12px !important;
}

.wfg-vl-card__like .count-box {
  min-width: 0 !important;
  min-height: 0 !important;
  padding: 0 1px !important;
  font-size: 9px !important;
  line-height: 1 !important;
}

.wfg-vl-card__duration {
  position: absolute;
  left: 6px;
  bottom: 6px;
  z-index: 3;
  padding: 3px 5px;
  border-radius: 4px;
  background: rgba(0, 0, 0, 0.68);
  color: #fff;
  font-size: 10px;
  line-height: 1;
}

.wfg-vl-card__body {
  padding: 6px 1px 0;
}

.wfg-vl-card__title {
  margin: 0 0 2px;
  overflow: hidden;
  color: inherit;
  font-size: var(--wfg-vl-card-title-size-mobile, 11px);
  font-weight: 700;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.wfg-vl-card__youtube-link {
  display: inline-block;
  font-size: 10px;
  line-height: 1.2;
  text-decoration: none;
}


.wfg-vl-feature {
  display: grid;
  gap: var(--wfg-vl-content-spacing, 16px);
  margin-top: var(--wfg-vl-content-spacing, 16px);
}

.wfg-vl-landscape {
  min-width: 0;
}

.wfg-vl-landscape__open {
  position: relative;
  display: block;
  width: 100%;
  padding: 0;
  overflow: hidden;
  border: 0;
  border-radius: var(--wfg-vl-landscape-radius, 0px);
  background: #111;
  box-shadow: 0 5px 18px rgba(0, 0, 0, 0.12);
  cursor: pointer;
}

.wfg-vl-landscape__poster {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  transition: transform 200ms ease, opacity 200ms ease;
}

.wfg-vl-landscape__open:hover .wfg-vl-landscape__poster,
.wfg-vl-landscape__open:focus-visible .wfg-vl-landscape__poster {
  transform: scale(1.015);
  opacity: 0.94;
}

.wfg-vl-landscape__play {
  position: absolute;
  top: 50%;
  left: 50%;
  width: clamp(42px, 13vw, 68px);
  height: clamp(42px, 13vw, 68px);
  border-radius: 999px;
  background: var(--wfg-vl-play-bg, rgba(0,0,0,.64));
  transform: translate(-50%, -50%);
  box-shadow: 0 3px 14px rgba(0,0,0,.25);
}

.wfg-vl-landscape__play::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 54%;
  border-top: 9px solid transparent;
  border-bottom: 9px solid transparent;
  border-left: 15px solid #fff;
  transform: translate(-50%, -50%);
}

.wfg-vl-landscape__title {
  margin: 7px 1px 0;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.45;
}

.wfg-vl-feature-banner {
  display: block;
  width: 100%;
  overflow: hidden;
  border-radius: var(--wfg-vl-banner-radius, 0px);
  text-decoration: none;
}

.wfg-vl-feature-banner img {
  display: block;
  width: 100%;
  height: auto;
}

.wfg-vl-feature-banner[href]:hover img,
.wfg-vl-feature-banner[href]:focus-visible img {
  opacity: 0.9;
}

.wfg-vl-modal[hidden] {
  display: none !important;
}

.wfg-vl-modal {
  position: fixed;
  inset: 0;
  z-index: 2147483000;
  display: grid;
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  place-items: center;
  padding: 16px;
  box-sizing: border-box;
  isolation: isolate;
}

.wfg-vl-modal__backdrop {
  position: absolute;
  inset: 0;
  background: var(--wfg-vl-modal-bg, rgba(0,0,0,.88));
}

.wfg-vl-modal__dialog {
  position: relative;
  z-index: 1;
  width: min(390px, 92vw, 52dvh);
  max-height: calc(100dvh - 32px);
  margin: auto;
}

.wfg-vl-modal__close {
  position: absolute;
  top: -10px;
  right: -8px;
  z-index: 5;
  display: grid;
  width: 40px;
  height: 40px;
  padding: 0;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.55);
  border-radius: 999px;
  background: #111;
  color: #fff;
  font: inherit;
  font-size: 25px;
  line-height: 1;
  cursor: pointer;
}

.wfg-vl-modal__player {
  position: relative;
  overflow: hidden;
  aspect-ratio: 9 / 16;
  border-radius: var(--wfg-vl-modal-radius, 14px);
  background: #111;
  box-shadow: 0 20px 64px rgba(0, 0, 0, 0.52);
}

.wfg-vl-modal__dialog.is-landscape {
  width: min(960px, 94vw);
}

.wfg-vl-modal__player.is-landscape {
  aspect-ratio: 16 / 9;
}

.wfg-vl-modal__poster,
.wfg-vl-modal__iframe,
.wfg-vl-modal__youtube-host,
.wfg-vl-modal__youtube-host iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.wfg-vl-modal__player {
  background-position: center;
  background-size: cover;
}

.wfg-vl-modal__youtube-host {
  z-index: 1;
}

.wfg-vl-modal__youtube-host iframe {
  display: block;
}

.wfg-vl-modal__poster {
  z-index: 3;
  display: block;
  object-fit: cover;
  opacity: 1;
  pointer-events: none;
  transition: opacity 110ms ease;
}

.wfg-vl-modal__iframe,
.wfg-vl-modal__youtube-host {
  z-index: 1;
  opacity: 1;
}

.wfg-vl-modal__loader {
  position: absolute;
  z-index: 4;
  top: 50%;
  left: 50%;
  width: 38px;
  height: 38px;
  margin: -19px 0 0 -19px;
  border: 3px solid rgba(255,255,255,.36);
  border-top-color: #fff;
  border-radius: 50%;
  opacity: 0;
  animation: wfg-vl-spin .8s linear infinite;
  transition: opacity 160ms ease;
}

.wfg-vl-modal__player.is-loading .wfg-vl-modal__loader {
  opacity: 1;
}

.wfg-vl-modal__player.is-ready .wfg-vl-modal__poster,
.wfg-vl-modal__player.is-ready .wfg-vl-modal__loader {
  opacity: 0;
  pointer-events: none;
}

.wfg-vl-modal__player.is-ready .wfg-vl-modal__iframe,
.wfg-vl-modal__player.is-ready .wfg-vl-modal__youtube-host {
  opacity: 1;
}

.wfg-vl-modal__title {
  margin: 8px 0 0;
  color: #fff;
  text-align: center;
  font-size: 13px;
  font-weight: 700;
}

.wfg-vl-modal__youtube-link {
  display: block;
  width: fit-content;
  margin: 5px auto 0;
  color: #fff;
  font-size: 12px;
}

body.wfg-vl-modal-open {
  overflow: hidden;
}

@keyframes wfg-vl-spin {
  to { transform: rotate(360deg); }
}

@media (min-width: 600px) {
  .wfg-vl-library {
    padding-inline: var(--wfg-vl-library-padding-inline-tablet, 12px);
    --wfg-vl-cols: var(--wfg-vl-tablet-cols, 4);
    --wfg-vl-gap: 8px;
    --wfg-vl-shell-max: 100%;
    --wfg-vl-slide-width: var(--wfg-vl-tablet-slide-width, calc(25% - 9px));
  }

  .wfg-vl-category-nav {
    margin-inline: var(--wfg-vl-category-nav-margin-inline-tablet, -12px);
    padding-inline: var(--wfg-vl-category-nav-padding-inline-tablet, 12px);
  }

  .wfg-vl-row__nav {
    display: flex;
  }

  .wfg-vl-row__title {
    font-size: var(--wfg-vl-title-size-tablet, 1.2rem);
  }

  .wfg-vl-card__title {
    font-size: var(--wfg-vl-card-title-size-tablet, 12px);
  }

  .wfg-vl-modal__dialog {
    width: min(410px, 90vw, 52dvh);
  }
}

@media (min-width: 1080px) {
  .wfg-vl-library {
    /* Desktop also stays inside SWELL's parent content width. */
    width: 100% !important;
    max-width: 100% !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    padding-inline: 0 !important;
    --wfg-vl-cols: var(--wfg-vl-desktop-cols, 5);
    --wfg-vl-gap: 10px;
    --wfg-vl-shell-max: 100%;
    --wfg-vl-row-gap: 16px;
    --wfg-vl-slide-width: var(--wfg-vl-desktop-slide-width, calc(20% - 12.8px));
  }

  .wfg-vl-category-nav {
    margin-inline: 0 !important;
    padding-inline: 0 !important;
  }

  .wfg-vl-row__title {
    font-size: var(--wfg-vl-title-size-desktop, 1.35rem);
  }

  .wfg-vl-card__title {
    font-size: var(--wfg-vl-card-title-size-desktop, 13px);
  }
}

@media (prefers-reduced-motion: reduce) {
  .wfg-vl-library *,
  .wfg-vl-modal * {
    scroll-behavior: auto !important;
    transition-duration: 0.001ms !important;
    animation-duration: 0.001ms !important;
  }
}


/* Reusable content blocks inserted between category rows. */
.wfg-vl-content-block {
  width: 100%;
  margin: 0 0 var(--wfg-vl-content-spacing, 16px);
}

.wfg-vl-content-block + .wfg-vl-content-block {
  margin-top: calc(var(--wfg-vl-content-spacing, 16px) * -0.35);
}

.wfg-vl-content-block--landscape .wfg-vl-landscape,
.wfg-vl-content-block--banner .wfg-vl-feature-banner {
  width: 100%;
}

.wfg-vl-content-block--banner .wfg-vl-feature-banner {
  display: block;
  overflow: hidden;
  aspect-ratio: 16 / 3;
  border-radius: var(--wfg-vl-banner-radius, 0px);
  background: #f3f4f5;
}

.wfg-vl-content-block--banner .wfg-vl-feature-banner img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.wfg-vl-feature-swiper {
  position: relative;
  width: 100%;
  overflow: hidden;
}

.wfg-vl-feature-swiper .swiper-wrapper {
  display: flex;
}

.wfg-vl-feature-swiper .swiper-slide {
  flex: 0 0 100%;
  width: 100%;
}

.wfg-vl-feature-swiper__prev,
.wfg-vl-feature-swiper__next {
  position: absolute;
  z-index: 4;
  top: 42%;
  display: grid;
  width: 34px;
  height: 34px;
  padding: 0;
  place-items: center;
  transform: translateY(-50%);
  border: 0;
  border-radius: 999px;
  background: rgba(255,255,255,.9);
  color: #111;
  box-shadow: 0 2px 10px rgba(0,0,0,.2);
  font-size: 25px;
  line-height: 1;
  cursor: pointer;
}

.wfg-vl-feature-swiper__prev { left: 8px; }
.wfg-vl-feature-swiper__next { right: 8px; }
.wfg-vl-feature-swiper__prev:disabled,
.wfg-vl-feature-swiper__next:disabled { opacity: .35; cursor: default; }

.wfg-vl-feature-swiper__pagination {
  min-height: 18px;
  margin-top: 7px;
  text-align: center;
}

.wfg-vl-feature-swiper__pagination .swiper-pagination-bullet-active {
  background: #f78da7;
}

/* Native fallback if Swiper cannot load. */
.wfg-vl-feature-swiper.is-fallback .swiper-wrapper {
  gap: 12px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
}
.wfg-vl-feature-swiper.is-fallback .swiper-wrapper::-webkit-scrollbar { display: none; }
.wfg-vl-feature-swiper.is-fallback .swiper-slide { scroll-snap-align: start; }

@media (hover: none) {
  .wfg-vl-category-nav__button:hover {
    background-color: var(--wfg-vl-category-bg, #f78da7) !important;
  }
}

body.admin-bar .wfg-vl-library--sticky-nav .wfg-vl-category-nav:not(.is-js-managed) {
  top: 32px;
}

@media screen and (max-width: 782px) {
  body.admin-bar .wfg-vl-library--sticky-nav .wfg-vl-category-nav:not(.is-js-managed) {
    top: 46px;
  }
}

/* ==========================================
   v2.1.0: detail links / lite-youtube / single video
========================================== */

.wfg-vl-video-detail-link {
  display: inline-block;
  margin-top: 5px;
  color: #777 !important;
  font-size: 10px;
  font-weight: 400;
  line-height: 1.35;
  text-decoration: none !important;
}

.wfg-vl-video-detail-link:hover,
.wfg-vl-video-detail-link:focus-visible {
  color: var(--wfg-vl-heading-color, #f78da7) !important;
  text-decoration: underline !important;
}

.wfg-vl-landscape > .wfg-vl-video-detail-link {
  margin: 4px 1px 0;
  font-size: 11px;
}

/* lite-youtube is created inside the modal only after a user clicks a poster. */
.wfg-vl-modal__youtube-host lite-youtube {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  background-position: center;
  background-size: cover;
}

.wfg-vl-modal__youtube-host lite-youtube::after {
  height: 100%;
  padding-bottom: 0;
}

.wfg-vl-modal__youtube-host lite-youtube > iframe {
  width: 100%;
  height: 100%;
}

/* Individual video page. The page itself stays a static poster until click. */
.wfg-vl-single-video {
  width: min(100%, 960px);
  margin: 0 auto 36px;
}

.wfg-vl-single-video__player {
  position: relative;
  overflow: hidden;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #111;
  border-radius: var(--wfg-vl-modal-radius, 14px);
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.14);
}

.wfg-vl-single-video__open {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  padding: 0;
  overflow: hidden;
  border: 0;
  background: #111;
  cursor: pointer;
}

.wfg-vl-single-video__poster {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 200ms ease, opacity 200ms ease;
}

.wfg-vl-single-video__open:hover .wfg-vl-single-video__poster,
.wfg-vl-single-video__open:focus-visible .wfg-vl-single-video__poster {
  transform: scale(1.012);
  opacity: .94;
}

.wfg-vl-single-video__play {
  position: absolute;
  top: 50%;
  left: 50%;
  width: clamp(54px, 10vw, 76px);
  height: clamp(54px, 10vw, 76px);
  border-radius: 999px;
  background: var(--wfg-vl-play-bg, rgba(0,0,0,.64));
  transform: translate(-50%, -50%);
  box-shadow: 0 3px 16px rgba(0,0,0,.25);
}

.wfg-vl-single-video__play::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 54%;
  border-top: 11px solid transparent;
  border-bottom: 11px solid transparent;
  border-left: 18px solid #fff;
  transform: translate(-50%, -50%);
}

.wfg-vl-single-video__description {
  margin-top: 20px;
  font-size: 15px;
  line-height: 1.9;
}

.wfg-vl-single-video__description p {
  margin: 0 0 1em;
}

.wfg-vl-single-video__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 7px 18px;
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid rgba(0,0,0,.1);
  color: #666;
  font-size: 12px;
  line-height: 1.5;
}

.wfg-vl-single-video__content {
  margin-top: 24px;
}

@media (max-width: 767px) {
  .wfg-vl-video-detail-link {
    margin-top: 4px;
    font-size: 9px;
  }

  .wfg-vl-single-video {
    margin-bottom: 28px;
  }

  .wfg-vl-single-video__description {
    margin-top: 16px;
    font-size: 14px;
    line-height: 1.8;
  }
}

/* ==========================================
   v2.1.1: single video detail UX fixes
========================================== */

/* Storefront and similar themes may print the featured image before the
   content. The plugin owns the poster on video detail pages, so suppress the
   duplicate as a CSS fallback in addition to the PHP filter. */
body.single-video_item .post-thumbnail {
  display: none !important;
}

/* The theme's previous/next-post navigation is easy to mistake for a route
   back to the library. Replace it with the explicit buttons below. */
body.single-video_item .post-navigation,
body.single-video_item .navigation.post-navigation {
  display: none !important;
}

.wfg-vl-single-video {
  width: min(100%, var(--wfg-vl-single-content-max-width, 760px));
  margin: 0 auto var(--wfg-vl-single-margin-bottom, 38px);
}

.wfg-vl-single-video__player {
  width: min(100%, var(--wfg-vl-single-player-max-width, 420px));
  margin-inline: auto;
  aspect-ratio: 9 / 16;
  background: #111;
}

.wfg-vl-single-video__poster {
  object-fit: contain;
  background: #111;
}

.wfg-vl-single-video__back {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: var(--wfg-vl-back-button-height, 38px);
  padding: var(--wfg-vl-back-button-padding-block, 8px) var(--wfg-vl-back-button-padding-inline, 15px);
  border: 1px solid var(--wfg-vl-heading-color, #f78da7);
  border-radius: 999px;
  background: #fff;
  color: var(--wfg-vl-heading-color, #f78da7) !important;
  font-size: var(--wfg-vl-back-button-font-size, 13px);
  font-weight: 600;
  line-height: 1.3;
  text-decoration: none !important;
  transition: background-color 160ms ease, color 160ms ease, transform 160ms ease;
}

.wfg-vl-single-video__back:hover,
.wfg-vl-single-video__back:focus-visible {
  background: var(--wfg-vl-heading-color, #f78da7);
  color: #fff !important;
  text-decoration: none !important;
  transform: translateY(-1px);
}

.wfg-vl-single-video__back--top {
  margin: 0 0 16px;
}

.wfg-vl-single-video__back--bottom {
  margin: 8px 0 4px;
}

.wfg-vl-single-video__description {
  width: min(100%, var(--wfg-vl-single-text-max-width, 680px));
  margin: var(--wfg-vl-single-description-margin-top, 22px) auto 0;
}

.wfg-vl-single-video__back--bottom,
.wfg-vl-single-video__meta,
.wfg-vl-single-video__content {
  margin-left: auto;
  margin-right: auto;
}

.wfg-vl-single-video__meta,
.wfg-vl-single-video__content {
  width: min(100%, var(--wfg-vl-single-text-max-width, 680px));
}

@media (max-width: 767px) {
  .wfg-vl-single-video {
    width: 100%;
    margin-bottom: 30px;
  }

  .wfg-vl-single-video__player {
    width: min(100%, 360px);
  }

  .wfg-vl-single-video__back {
    min-height: var(--wfg-vl-back-button-height-mobile, 36px);
    padding: var(--wfg-vl-back-button-padding-block-mobile, 7px) var(--wfg-vl-back-button-padding-inline-mobile, 13px);
    font-size: var(--wfg-vl-back-button-font-size-mobile, 12px);
  }

  .wfg-vl-single-video__back--top {
    margin-bottom: 14px;
  }

  .wfg-vl-single-video__description {
    margin-top: 18px;
  }
}


/* ==========================================
   v2.1.2: compact single-video viewport sizing
========================================== */

/* Keep the complete 9:16 poster visible without requiring the visitor to
   scroll just to see the bottom of the video. 30svh as width equals roughly
   53.3svh as height for a 9:16 player. The 300px cap prevents oversized
   players on tall desktop displays. */
.wfg-vl-single-video__player {
  width: min(100%, var(--wfg-vl-single-player-max-width, 300px));
  aspect-ratio: 9 / 16;
}

@supports (width: 1svh) {
  .wfg-vl-single-video__player {
    width: min(100%, var(--wfg-vl-single-player-max-width, 300px), var(--wfg-vl-single-player-max-width-vh, 30svh));
  }
}

/* Keep the return controls visually attached to the compact player instead
   of leaving them stranded at the edge of the wider text column. */
.wfg-vl-single-video__back--top,
.wfg-vl-single-video__back--bottom {
  display: flex;
  width: max-content;
  max-width: 100%;
  margin-left: auto;
  margin-right: auto;
}

.wfg-vl-single-video__back--top {
  margin-bottom: 12px;
}

.wfg-vl-single-video__back--bottom {
  margin-top: 10px;
}

@media (max-width: 767px) {
  .wfg-vl-single-video__player {
    width: min(100%, var(--wfg-vl-single-player-max-width-mobile, 280px));
  }

  @supports (width: 1svh) {
    .wfg-vl-single-video__player {
      width: min(100%, var(--wfg-vl-single-player-max-width-mobile, 280px), var(--wfg-vl-single-player-max-width-vh, 30svh));
    }
  }
}


/* ==========================================
   v2.3.4: keep card metadata directly under each video
   Isolated with .wfg-vl-library so theme heading/link margins cannot
   stretch the card and make the links look detached from their video.
========================================== */
.wfg-vl-library .wfg-vl-card__body {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1px;
  margin: 0 !important;
  padding: 2px 1px 0 !important;
}

.wfg-vl-library .wfg-vl-card__title {
  width: 100%;
  margin: 0 !important;
  padding: 0 !important;
  line-height: 1.25;
}

.wfg-vl-library .wfg-vl-card__youtube-link,
.wfg-vl-library .wfg-vl-video-detail-link {
  display: block;
  margin: 0 !important;
  padding: 0 !important;
  line-height: 1.2;
}

.wfg-vl-library .wfg-vl-card__youtube-link + .wfg-vl-video-detail-link {
  margin-top: 6px !important;
}

/* ==========================================
   v2.3.7: SWELL thumbnail suppression + balanced detail/player sizing
========================================== */

/* The detail page owns its clickable poster. Hide any theme-level featured
   image so visitors see only one thumbnail/player. The dedicated body class
   is injected by the plugin and is independent of SWELL's body classes. */
body.wfg-vl-single-page .p-articleThumb,
body.wfg-vl-single-page .p-articleThumb__img,
body.wfg-vl-single-page .post-thumbnail,
body.wfg-vl-single-page .wp-post-image.p-articleThumb__img {
  display: none !important;
}

/* Keep the entire 9:16 poster comfortably inside the viewport. Hard caps are
   intentional here so old CSS variables cannot silently restore a large size. */
body.wfg-vl-single-page .wfg-vl-single-video__player {
  width: min(190px, 58vw, 24dvh) !important;
  max-width: 190px !important;
  max-height: none !important;
  margin-inline: auto !important;
  aspect-ratio: 9 / 16 !important;
}

body.wfg-vl-single-page .wfg-vl-single-video__poster {
  width: 100% !important;
  height: 100% !important;
  object-fit: contain !important;
}

/* Detail-page playback popup only. The library/list popup keeps its normal
   size. Since width is constrained by viewport height, the full portrait video
   remains visible even on short laptop screens. */
.wfg-vl-modal--single .wfg-vl-modal__dialog {
  width: min(400px, 76vw, 50dvh) !important;
  max-width: 400px !important;
  max-height: calc(100dvh - 32px) !important;
}

@media (max-width: 767px) {
  body.wfg-vl-single-page .wfg-vl-single-video__player {
    width: min(170px, 58vw, 23dvh) !important;
    max-width: 170px !important;
  }

  .wfg-vl-modal--single .wfg-vl-modal__dialog {
    width: min(360px, 86vw, 46dvh) !important;
    max-width: 360px !important;
  }
}



/* ==========================================
   v2.3.15: smartphone sticky category navigation
   - Keep the category buttons below SWELL's mobile header.
   - Avoid iOS/Safari compositing flicker while scrolling.
   Desktop/tablet styles are intentionally unchanged.
========================================== */
@media screen and (max-width: 767px) {
  .wfg-vl-category-nav.is-fixed {
    background: #fff !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    transform: translate3d(0, 0, 0) !important;
    -webkit-transform: translate3d(0, 0, 0) !important;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    will-change: top, left, width, transform;
  }

  .wfg-vl-category-nav.is-portaled {
    isolation: isolate;
  }
}

/* ==========================================
   v2.3.18: /videos/ title-area spacing fix
   - Only the fixed /videos/ page is affected.
   - Collapse real spacer blocks before the video library, including nested ones.
   - Tighten the SWELL H1 and its actual wrappers without changing other pages.
========================================== */

body.wfg-vl-page .wfg-vl-pageTitle--tight,
body.wfg-vl-page .wfg-vl-pageTitleWrap--tight {
  margin-top: 0 !important;
  margin-bottom: 0 !important;
  padding-top: 0 !important;
  padding-bottom: 0 !important;
}

body.wfg-vl-page .wfg-vl-postContent--tight {
  margin-top: 0 !important;
  padding-top: 0 !important;
}

/* Any Gutenberg spacer before the library is decorative spacing only on this page. */
body.wfg-vl-page .wfg-vl-leading-spacer--collapse {
  display: none !important;
  height: 0 !important;
  min-height: 0 !important;
  max-height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  overflow: hidden !important;
}

/* Wrappers around the intro heading can carry SWELL/Gutenberg padding. */
body.wfg-vl-page .wfg-vl-introWrap--tight {
  margin-top: 0 !important;
  padding-top: 0 !important;
  min-height: 0 !important;
}

body.wfg-vl-page .wfg-vl-introHeading--tight {
  margin-top: 0 !important;
  margin-bottom: 8px !important;
  padding-top: 0 !important;
  padding-bottom: 0 !important;
}

body.wfg-vl-page .wfg-vl-library {
  margin-top: 0 !important;
  padding-top: 0 !important;
}

/* Desktop: keep only a small title-to-content gap. */
@media screen and (min-width: 1080px) {
  body.wfg-vl-page .wfg-vl-pageTitle--tight {
    margin-bottom: 4px !important;
  }

  body.wfg-vl-page .wfg-vl-introHeading--tight {
    margin-bottom: 10px !important;
  }
}

/* Smartphone: make the H1 area intentionally very tight. */
@media screen and (max-width: 767px) {
  body.wfg-vl-page .wfg-vl-pageTitle--tight,
  body.wfg-vl-page .wfg-vl-pageTitleWrap--tight {
    margin: 0 !important;
    padding: 0 !important;
  }

  body.wfg-vl-page .wfg-vl-postContent--tight {
    margin-top: 0 !important;
    padding-top: 0 !important;
  }

  body.wfg-vl-page .wfg-vl-introHeading--tight {
    margin-top: 0 !important;
    margin-bottom: 6px !important;
    padding: 0 !important;
  }
}
