/* VLN Shorts — bloque dentro del sitio (colores modo oscuro) */
.vln-shorts-page {
  --vln-shorts-bg: #121018;
  --vln-shorts-surface: #1a1624;
  --vln-shorts-surface-2: #221c30;
  --vln-shorts-border: #342c42;
  --vln-shorts-text: #f0eef4;
  --vln-shorts-muted: #a8a0b8;
  --vln-shorts-accent: #ed1919;
  --vln-shorts-brand: #2e1a46;
  --vln-shorts-watching: #ed1919;
  --vln-shorts-progress: #ed1919;

  background: var(--vln-shorts-bg);
  color: var(--vln-shorts-text);
  padding: 1.25rem 0 2.5rem;
  margin: 0;
  width: 100%;
}

.vln-shorts-layout {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 8px 12px 24px;
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
}

.vln-shorts-stage {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  align-items: start;
  justify-content: center;
}

.vln-shorts-stage__main {
  width: min(100%, 380px);
  margin: 0 auto;
}

.vln-shorts-player-wrap {
  position: relative;
  width: 100%;
}

.vln-shorts-rail__heading {
  display: none;
  margin: 0 0 12px;
  font-family: MajritTx, Merriweather, serif;
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--vln-shorts-text);
}

.vln-shorts-player {
  position: relative;
  width: 100%;
  aspect-ratio: 9 / 16;
  max-height: min(68dvh, 680px);
  background: #000;
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.45);
  border: 1px solid var(--vln-shorts-border);
  touch-action: none;
  overscroll-behavior: contain;
  user-select: none;
  -webkit-user-select: none;
  cursor: grab;
}

.vln-shorts-player:active {
  cursor: grabbing;
}

.vln-shorts-player video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  background: #000;
  will-change: transform, opacity;
}

.vln-shorts-player.is-animating {
  pointer-events: none;
}

.vln-shorts-player.is-animating video {
  transition: transform 0.38s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.28s ease;
}

.vln-shorts-player.is-slide-out-next video {
  transform: translateY(-108%);
  opacity: 0.35;
}

.vln-shorts-player.is-slide-out-prev video {
  transform: translateY(108%);
  opacity: 0.35;
}

.vln-shorts-player.is-slide-in-prep-next video {
  transition: none;
  transform: translateY(108%);
  opacity: 0.2;
}

.vln-shorts-player.is-slide-in-prep-prev video {
  transition: none;
  transform: translateY(-108%);
  opacity: 0.2;
}

.vln-shorts-player.is-slide-in video {
  transform: translateY(0);
  opacity: 1;
}

.vln-shorts-info {
  margin-top: 14px;
  padding: 0 2px;
  transition: opacity 0.22s ease, transform 0.32s cubic-bezier(0.22, 1, 0.36, 1);
}

.vln-shorts-info.is-swap {
  opacity: 0;
  transform: translateY(10px);
}

@media (prefers-reduced-motion: reduce) {
  .vln-shorts-player.is-animating video,
  .vln-shorts-info {
    transition: none !important;
  }
}
.vln-shorts-player:fullscreen,
.vln-shorts-player:-webkit-full-screen,
.vln-shorts-player.is-fullscreen {
  width: 100%;
  height: 100%;
  max-height: none;
  aspect-ratio: auto;
  border-radius: 0;
  border: 0;
  box-shadow: none;
  background: #000;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Fallback móvil (iOS/Android sin Fullscreen API en el contenedor) */
.vln-shorts-player.is-fs-fallback {
  position: fixed !important;
  inset: 0 !important;
  z-index: 2147483000 !important;
  width: 100vw !important;
  height: 100dvh !important;
  max-height: none !important;
  margin: 0 !important;
  border-radius: 0 !important;
  cursor: default;
}

.vln-shorts-player.is-fs-fallback .vln-shorts-chrome {
  opacity: 1;
  pointer-events: auto;
}

html.vln-shorts-fs-open,
html.vln-shorts-fs-open body {
  overflow: hidden !important;
  overscroll-behavior: none;
  touch-action: none;
}

.vln-shorts-player:fullscreen video,
.vln-shorts-player:-webkit-full-screen video,
.vln-shorts-player.is-fullscreen video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
}

.vln-shorts-chrome {
  position: absolute;
  inset: 0;
  z-index: 5;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.18s ease;
  background: linear-gradient(180deg, rgba(0,0,0,0.35) 0%, transparent 22%, transparent 70%, rgba(0,0,0,0.45) 100%);
}

.vln-shorts-player:hover .vln-shorts-chrome,
.vln-shorts-player.is-paused .vln-shorts-chrome,
.vln-shorts-player.is-controls .vln-shorts-chrome {
  opacity: 1;
  pointer-events: auto;
}

.vln-shorts-iconbtn {
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.45);
  color: #fff;
  display: grid;
  place-items: center;
  cursor: pointer;
  backdrop-filter: blur(6px);
  outline: none !important;
  box-shadow: none !important;
  -webkit-tap-highlight-color: transparent;
  -webkit-appearance: none;
  appearance: none;
}

.vln-shorts-iconbtn:hover,
.vln-shorts-iconbtn:focus,
.vln-shorts-iconbtn:focus-visible,
.vln-shorts-iconbtn:active {
  outline: none !important;
  box-shadow: none !important;
}

.vln-shorts-iconbtn:hover {
  background: rgba(0, 0, 0, 0.7);
}

.vln-shorts-iconbtn--mute {
  position: absolute;
  top: 12px;
  left: 12px;
}

.vln-shorts-iconbtn--mute .icon-unmuted,
.vln-shorts-iconbtn--mute .icon-muted {
  display: block;
  grid-area: 1 / 1;
}

.vln-shorts-iconbtn--mute .icon-muted,
.vln-shorts-iconbtn--mute.is-muted .icon-unmuted {
  display: none !important;
}

.vln-shorts-iconbtn--mute.is-muted .icon-muted {
  display: block !important;
}

.vln-shorts-navbtn,
.vln-shorts-play-toggle,
.vln-shorts-item {
  outline: none !important;
  box-shadow: none !important;
  -webkit-tap-highlight-color: transparent;
}

.vln-shorts-navbtn:focus,
.vln-shorts-navbtn:focus-visible,
.vln-shorts-navbtn:active,
.vln-shorts-play-toggle:focus,
.vln-shorts-play-toggle:focus-visible,
.vln-shorts-play-toggle:active,
.vln-shorts-item:focus,
.vln-shorts-item:focus-visible,
.vln-shorts-item:active {
  outline: none !important;
  box-shadow: none !important;
}

.vln-shorts-chrome__bottom {
  position: absolute;
  right: 12px;
  bottom: 22px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.vln-shorts-progress {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 3px;
  background: rgba(255, 255, 255, 0.2);
}

.vln-shorts-progress__bar {
  display: block;
  height: 100%;
  width: 0%;
  background: var(--vln-shorts-progress);
}

.vln-shorts-play-toggle {
  position: absolute;
  inset: 0;
  margin: auto;
  width: 72px;
  height: 72px;
  border: 0;
  background: transparent;
  cursor: pointer;
  z-index: 4;
  filter: drop-shadow(0 6px 16px rgba(0, 0, 0, 0.4));
}

.vln-shorts-info__title {
  margin: 0 0 8px;
  font-family: MajritTx, Merriweather, serif;
  font-size: clamp(1.05rem, 2.6vw, 1.35rem);
  line-height: 1.25;
  font-weight: 700;
  color: var(--vln-shorts-text);
}

.vln-shorts-info__byline,
.vln-shorts-info__date,
.vln-shorts-info__desc {
  margin: 0;
  font-family: GothamPro, sans-serif;
  font-size: 13px;
  line-height: 1.4;
  color: var(--vln-shorts-muted);
}

.vln-shorts-info__desc {
  margin: 0 0 8px;
  color: var(--vln-shorts-text);
  font-size: 14px;
  line-height: 1.45;
}

.vln-shorts-info__byline {
  margin-bottom: 2px;
}

.vln-shorts-info__related {
  margin: 8px 0 0;
  font-family: GothamPro, sans-serif;
  font-size: 13px;
}

.vln-shorts-info__related a {
  color: #d9cce8;
  text-decoration: underline;
}

.vln-shorts-rail__intro {
  margin: 0 0 10px;
  font-family: GothamPro, sans-serif;
  font-size: 14px;
  line-height: 1.4;
  color: var(--vln-shorts-muted);
}

.vln-shorts-navbtns {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 40%;
}

.vln-shorts-navbtn {
  width: 44px;
  height: 44px;
  border: 1px solid var(--vln-shorts-border);
  border-radius: 999px;
  background: var(--vln-shorts-surface-2);
  color: var(--vln-shorts-text);
  display: grid;
  place-items: center;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
}

.vln-shorts-navbtn:hover {
  background: var(--vln-shorts-brand);
}

.vln-shorts-navbtn:disabled {
  opacity: 0.35;
  cursor: default;
}

.vln-shorts-rail {
  background: transparent;
  min-width: 0;
}

.vln-shorts-rail__title {
  margin: 0 0 12px;
  font-family: MajritTx, Merriweather, serif;
  font-size: clamp(1.45rem, 3vw, 1.85rem);
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.15;
  color: var(--vln-shorts-text);
}

.vln-shorts-rail__group {
  border: 0;
}

.vln-shorts-rail__group > summary {
  list-style: none;
  cursor: pointer;
  color: #d9cce8;
  font-family: MarcinAntB, GothamPro, sans-serif;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 8px 0 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.vln-shorts-rail__group > summary::-webkit-details-marker {
  display: none;
}

.vln-shorts-rail__group > summary::after {
  content: "";
  width: 8px;
  height: 8px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg);
  opacity: 0.75;
  margin-top: -4px;
}

.vln-shorts-rail__group[open] > summary::after {
  transform: rotate(-135deg);
  margin-top: 2px;
}

.vln-shorts-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.vln-shorts-item {
  display: grid;
  grid-template-columns: 84px 1fr;
  gap: 12px;
  align-items: center;
  width: 100%;
  text-align: left;
  border: 1px solid transparent;
  border-radius: 12px;
  background: var(--vln-shorts-surface);
  color: var(--vln-shorts-text);
  padding: 8px;
  cursor: pointer;
  text-decoration: none !important;
  font-family: GothamPro, sans-serif;
}

.vln-shorts-item:hover {
  background: var(--vln-shorts-surface-2);
  border-color: var(--vln-shorts-border);
}

.vln-shorts-item.is-active {
  background: var(--vln-shorts-surface-2);
  border-color: var(--vln-shorts-border);
  box-shadow: inset 0 0 0 1px rgba(240, 238, 244, 0.06);
}

.vln-shorts-item__thumb {
  width: 84px;
  aspect-ratio: 9 / 12;
  border-radius: 8px;
  overflow: hidden;
  background: #0b0910 center / cover no-repeat;
  flex-shrink: 0;
}

.vln-shorts-item__thumb img,
.vln-shorts-item__thumb video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.vln-shorts-item__body {
  min-width: 0;
  padding-right: 6px;
}

.vln-shorts-item__badge {
  display: none;
  width: fit-content;
  margin: 0 0 8px;
  padding: 0;
  border-radius: 0;
  background: transparent;
  color: var(--vln-shorts-watching);
  font-family: MarcinAntB, GothamPro, sans-serif;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  line-height: 1.2;
}

.vln-shorts-item.is-active .vln-shorts-item__badge {
  display: inline-flex;
}

.vln-shorts-item__title {
  margin: 0;
  font-family: MajritTx, Merriweather, serif;
  font-size: 1rem;
  line-height: 1.25;
  font-weight: 700;
  color: var(--vln-shorts-text);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.vln-shorts-empty {
  color: var(--vln-shorts-muted);
  padding: 24px 8px;
  font-family: GothamPro, sans-serif;
}

.vln-shorts-empty strong {
  display: block;
  color: var(--vln-shorts-text);
  margin-bottom: 6px;
  font-size: 18px;
}

.vln-shorts-ads {
  display: none;
  flex-direction: column;
  gap: 16px;
  width: 300px;
}

.vln-shorts-ad {
  width: 300px;
  height: 250px;
  min-height: 250px;
  max-height: 250px;
  background: var(--vln-shorts-surface);
  border: 1px solid var(--vln-shorts-border);
  border-radius: 8px;
  display: grid;
  place-items: center;
  overflow: hidden;
  padding: 0;
  box-sizing: border-box;
}

.vln-shorts-ad #ad_300x250_main,
.vln-shorts-ad #zona-1,
.vln-shorts-ad .ads__box,
.vln-shorts-ad .ad_300x250,
.vln-shorts-ad .vln-ad-box,
.vln-shorts-ad [id^="box_"] {
  width: 300px !important;
  height: 250px !important;
  max-width: 300px;
  margin: 0 auto;
  overflow: hidden;
}

.vln-shorts-noscript {
  max-width: 720px;
  margin: 1.5rem auto 0;
  padding: 0 16px;
  color: var(--vln-shorts-text);
}

.vln-shorts-noscript video {
  width: 100%;
  max-height: 70vh;
  background: #000;
}

/* Bloque SSR indexable (debajo del player interactivo) */
.vln-shorts-seo {
  max-width: 720px;
  margin: 1.75rem auto 0;
  padding: 0 16px 1.5rem;
  color: var(--vln-shorts-text);
}

.vln-shorts-seo__title {
  margin: 0 0 10px;
  font-family: MajritTx, Merriweather, serif;
  font-size: clamp(1.15rem, 2.8vw, 1.45rem);
  line-height: 1.25;
}

.vln-shorts-seo__desc,
.vln-shorts-seo__body,
.vln-shorts-seo__link,
.vln-shorts-seo__related,
.vln-shorts-seo__archive {
  margin: 0 0 10px;
  font-family: GothamPro, sans-serif;
  font-size: 14px;
  line-height: 1.5;
  color: var(--vln-shorts-muted);
}

.vln-shorts-seo__poster {
  display: block;
  width: min(100%, 270px);
  height: auto;
  border-radius: 10px;
  margin: 0 0 12px;
  background: #000;
}

.vln-shorts-seo a {
  color: #d9cce8;
  text-decoration: underline;
}

@media (min-width: 980px) {
  .vln-shorts-layout {
    grid-template-columns: 1fr 300px;
    align-items: start;
    padding: 16px 20px 40px;
    gap: 22px;
  }

  .vln-shorts-stage {
    position: sticky;
    top: 16px;
    display: block;
  }

  .vln-shorts-stage__main {
    width: 100%;
    max-width: none;
    margin: 0;
  }

  .vln-shorts-player-wrap {
    display: grid;
    grid-template-columns: minmax(320px, 420px) auto minmax(280px, 1fr);
    gap: 22px;
    align-items: start;
  }

  .vln-shorts-player {
    max-height: min(72dvh, 720px);
  }

  .vln-shorts-info {
    max-width: 380px;
  }

  .vln-shorts-navbtns {
    margin-top: 180px;
  }

  .vln-shorts-rail {
    min-width: 0;
  }

  .vln-shorts-rail__heading {
    display: block;
    font-family: MarcinAntB, GothamPro, sans-serif;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #d9cce8;
    margin: 0 0 12px;
  }

  .vln-shorts-list {
    max-height: min(74dvh, 760px);
    overflow-y: auto;
    padding-right: 4px;
    scrollbar-width: thin;
    scrollbar-color: var(--vln-shorts-border) transparent;
  }

  .vln-shorts-ads {
    display: flex;
    position: sticky;
    top: 16px;
  }

  .vln-shorts-item {
    grid-template-columns: 96px 1fr;
  }

  .vln-shorts-item__thumb {
    width: 96px;
  }

  .vln-shorts-rail-toggle {
    display: none !important;
  }

  .vln-shorts-rail__panel {
    display: contents;
  }
}

@media (min-width: 1200px) {
  .vln-shorts-player-wrap {
    grid-template-columns: 440px auto minmax(320px, 1fr);
  }
}


.vln-shorts-rail-toggle {
  display: none;
}

@media (max-width: 979px) {
  .vln-shorts-page {
    padding: 0.4rem 0 1.5rem;
  }

  .vln-shorts-layout {
    padding: 4px 0 20px;
    gap: 0;
    max-width: none;
  }

  .vln-shorts-stage,
  .vln-shorts-stage__main {
    width: 100%;
    max-width: none;
    margin: 0;
    display: block;
  }

  /* [abrir] [player] [↑↓] — controles FUERA del video */
  .vln-shorts-player-wrap {
    display: grid !important;
    grid-template-columns: 36px minmax(0, 300px) 44px;
    grid-template-rows: auto;
    align-items: center;
    justify-content: center;
    gap: 6px;
    width: 100%;
    max-width: 400px;
    margin: 0 auto;
    padding: 0 8px;
    box-sizing: border-box;
    position: relative;
  }

  .vln-shorts-player {
    grid-column: 2;
    grid-row: 1;
    width: 100%;
    max-width: 300px;
    aspect-ratio: 9 / 16;
    height: auto;
    max-height: min(56dvh, 520px);
    margin: 0;
    border-radius: 18px;
    touch-action: none;
    overscroll-behavior: contain;
    box-shadow: 0 12px 36px rgba(0, 0, 0, 0.4);
  }

  .vln-shorts-info {
    width: 100%;
    max-width: 300px;
    margin: 14px auto 0;
    padding: 0 14px;
    box-sizing: border-box;
  }

  .vln-shorts-info__title {
    font-size: clamp(1.05rem, 4.5vw, 1.25rem);
    line-height: 1.3;
  }

  .vln-shorts-navbtns {
    grid-column: 3;
    grid-row: 1;
    position: relative !important;
    right: auto;
    top: auto;
    transform: none !important;
    margin: 0;
    z-index: 8;
    gap: 0;
    padding: 5px 3px;
    border-radius: 999px;
    background: rgba(32, 36, 48, 0.92);
    border: 0;
    backdrop-filter: none;
    justify-self: center;
  }

  .vln-shorts-navbtn {
    width: 38px;
    height: 38px;
    border: 0;
    background: transparent;
    box-shadow: none;
    color: #fff;
  }

  .vln-shorts-navbtn:hover {
    background: rgba(255, 255, 255, 0.1);
  }

  .vln-shorts-rail-toggle {
    display: grid !important;
    place-items: center;
    grid-column: 1;
    grid-row: 1;
    position: relative !important;
    left: auto !important;
    top: auto !important;
    transform: none !important;
    z-index: 14;
    width: 32px;
    height: 40px;
    margin: 0;
    border: 0;
    border-radius: 8px;
    background: rgba(32, 36, 48, 0.92);
    color: #fff;
    cursor: pointer;
    outline: none !important;
    -webkit-tap-highlight-color: transparent;
    justify-self: center;
    transition: none;
  }

  /* Drawer overlay SOLO sobre el player (no empuja layout) */
  .vln-shorts-rail {
    grid-column: 2;
    grid-row: 1;
    position: relative !important;
    left: auto !important;
    top: auto !important;
    bottom: auto !important;
    width: 100% !important;
    height: 100% !important;
    z-index: 12;
    overflow: hidden;
    pointer-events: none;
    visibility: hidden;
    align-self: stretch;
    justify-self: stretch;
  }

  .vln-shorts-rail__panel {
    display: block !important;
    box-sizing: border-box;
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: min(78%, 220px);
    height: 100%;
    max-height: none;
    margin: 0;
    padding: 16px 12px;
    background: rgba(12, 18, 36, 0.94);
    border: 0;
    border-radius: 18px 0 0 18px;
    overflow-x: hidden;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    transform: translateX(-105%);
    transition: transform 0.28s cubic-bezier(0.22, 1, 0.36, 1);
    pointer-events: none;
    backdrop-filter: blur(10px);
  }

  .vln-shorts-layout.is-rail-open .vln-shorts-rail {
    visibility: visible;
    pointer-events: auto;
  }

  .vln-shorts-layout.is-rail-open .vln-shorts-rail__panel {
    transform: translateX(0);
    pointer-events: auto;
  }

  .vln-shorts-layout.is-rail-open .vln-shorts-rail-toggle {
    position: absolute !important;
    grid-column: 2;
    grid-row: 1;
    left: min(78%, 220px);
    top: 50%;
    transform: translate(-50%, -50%) !important;
    z-index: 16;
    width: 28px;
    height: 44px;
    border-radius: 8px;
    background: rgba(12, 18, 36, 0.96);
    justify-self: start;
  }

  .vln-shorts-rail__heading {
    display: block;
    margin: 0 0 14px;
    font-family: MajritTx, Merriweather, Georgia, serif;
    font-size: 1.35rem;
    font-weight: 700;
    line-height: 1.15;
    color: #f0d85a;
  }

  .vln-shorts-rail__title,
  .vln-shorts-rail__intro {
    display: none !important;
  }

  .vln-shorts-list {
    max-height: none;
    gap: 12px;
  }

  .vln-shorts-item {
    grid-template-columns: 48px 1fr;
    gap: 10px;
    padding: 0;
    border: 0 !important;
    border-radius: 0;
    background: transparent !important;
    align-items: start;
  }

  .vln-shorts-item.is-active {
    background: transparent !important;
    border: 0 !important;
  }

  .vln-shorts-item__thumb {
    width: 48px;
    aspect-ratio: 1;
    border-radius: 6px;
    overflow: hidden;
  }

  .vln-shorts-item__thumb img,
  .vln-shorts-item__thumb video {
    width: 100%;
    height: 100%;
    object-fit: cover;
  }

  .vln-shorts-item__badge {
    margin-bottom: 2px;
  }

  .vln-shorts-item__title {
    font-size: 0.86rem;
    line-height: 1.25;
    -webkit-line-clamp: 3;
    color: #fff;
  }

  .vln-shorts-ads {
    display: none;
  }
}

/* Asegurar fondo del contenedor del tema alrededor del bloque */
body.vln-shorts-view #content.herald-site-content,
body.archive.post-type-archive-vln_short #content.herald-site-content,
body.single-vln_short #content.herald-site-content,
body.vln-shorts-view main#app,
body.archive.post-type-archive-vln_short main#app,
body.single-vln_short main#app,
body.vln-shorts-view {
  background: var(--vln-shorts-bg, #121018) !important;
  background-color: var(--vln-shorts-bg, #121018) !important;
}

/* Footer también oscuro en Shorts (refuerzo si el theme toggle no alcanzó) */
html.vln-shorts-forced-dark .footer__d,
html.vln-shorts-forced-dark .footer,
body.vln-shorts-view .footer__d,
body.vln-shorts-view .footer {
  background: #121018;
  color: #f0eef4;
  border-color: #342c42;
}

