/* FlowTV uses the theme's palette, typefaces and controls. */
.flowtv__inner { width: calc(100% - 32px); max-width: none; margin-inline: auto; padding-block: 16px 80px; }
/* /player is a focused TV-style view. LUK restores the ordinary page header and content. */
body.pc-player-preview:not(.pc-player-preview--closed) .site-header,
body.pc-player-preview:not(.pc-player-preview--closed) .site-footer,
body.pc-player-preview:not(.pc-player-preview--closed) .flowtv__intro-description,
body.pc-player-preview:not(.pc-player-preview--closed) [data-flowtv-details],
body.pc-player-preview:not(.pc-player-preview--closed) .flowtv__about { display: none; }
body.pc-player-preview:not(.pc-player-preview--closed) { background: var(--pc-black); }
body.pc-player-preview:not(.pc-player-preview--closed) .flowtv--player-preview { min-height: 100dvh; background: var(--pc-black); }
body.pc-player-preview:not(.pc-player-preview--closed) .flowtv--player-preview .flowtv__inner { padding-block: 16px; }
.flowtv__player-panel { flex: 0 0 auto; min-width: 0; }
.flowtv__mobile-player-bar { display: none; }
.flowtv--player-preview .flowtv__player-panel-bar { box-sizing: border-box; display: flex; align-items: center; justify-content: space-between; width: 100%; height: 40px; gap: 12px; margin-bottom: 12px; padding: 5px 12px; background: var(--pc-bermuda); border: 1px solid rgb(255 255 255 / 45%); border-radius: 4px; }
.flowtv--player-preview .flowtv__player-panel-bar .flowtv__player-brand { margin-left: 0; transform: translateY(-2px); }
.flowtv__player-brand { display: flex; align-items: center; min-width: 0; margin: 0 0 0 -2px; }
.flowtv__player-brand img { display: block; width: min(200px, 100%); height: auto; }
.flowtv__player-close { position: static; flex: 0 0 auto; min-width: 0; min-height: 0; padding: 6px 9px; font-size: .7rem; line-height: 1.15; }
.flowtv--player-preview .flowtv__player-panel-bar .flowtv__player-close { transform: translateX(5px); }
.flowtv__now-playing { margin: 0; padding: 8px 0 12px; border-bottom: 1px solid rgb(233 235 227 / 20%); color: var(--pc-off-white); }
.flowtv__player-welcome { margin: 0; transform: translateX(2px); color: var(--pc-off-white); font-size: .9rem; font-weight: 400; line-height: 1.3; }
.flowtv__player-welcome-line, .flowtv__player-welcome-brand { display: block; white-space: nowrap; }
.flowtv__player-welcome-brand { font-weight: 700; }
.flowtv__now-playing .eyebrow { margin: 0 0 4px; color: var(--pc-mustard); font-size: .7rem; }
.flowtv__now-program { display: block; margin: 0; overflow: hidden; color: var(--pc-off-white); text-overflow: ellipsis; white-space: nowrap; font-size: .9rem; font-weight: 700; text-decoration: none; }
.flowtv__now-program:is(:hover, :focus-visible) { color: var(--pc-mustard); text-decoration: underline; text-underline-offset: .15em; }
.flowtv__now-program[aria-disabled="true"] { pointer-events: none; }
.flowtv__now-title { margin: 2px 0 0; font-size: .82rem; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.flowtv__sponsor { display: block; margin-top: 12px; color: var(--pc-off-white); text-decoration: none; }
.flowtv__sponsor .eyebrow { display: block; margin: 0; color: var(--pc-mustard); font-size: .7rem; }
.flowtv__sponsor-content { display: block; margin-top: 6px; min-height: 0; }
.flowtv__sponsor-logo { display: block; width: auto; max-width: 161.28px; height: auto; max-height: 46.08px; object-fit: contain; }
.flowtv__sponsor:is(:hover, :focus-visible) { color: var(--pc-mustard); text-decoration: underline; text-underline-offset: .15em; }
.flowtv__episode-sponsor { max-width: 280px; margin-top: 24px; padding-top: 16px; border-top: 1px solid rgb(22 22 21 / 20%); color: var(--pc-black); }
.flowtv__episode-sponsor .eyebrow { color: var(--pc-terracotta); }
.flowtv__now-playing .flowtv__filter { box-sizing: border-box; width: 100%; margin: 20px 0 0; }
.flowtv__flow-moving { transition: transform 420ms cubic-bezier(.2, .7, .2, 1); }
.flowtv--player-preview .flowtv__now-playing .flowtv__filter select { box-sizing: border-box; min-height: 40px; height: 40px; padding-block: 5px; background-color: var(--pc-bermuda); color: var(--pc-off-white); border-color: rgb(255 255 255 / 45%); }
body.pc-player-preview--closed .flowtv__player-close { display: none; }
/* Playback uses the viewport width; editorial text retains the theme measure. */
.flowtv__details, .flowtv__intro-description, .flowtv__status { width: min(calc(100% - var(--pc-layout-inset)), var(--pc-wide)); margin-inline: auto; }
.flowtv__viewer { display: grid; grid-template-columns: minmax(0, 1fr); grid-template-areas: "filter" "player" "controls" "provider" "episodes"; width: min(100%, var(--pc-flowtv-viewer-width, 100%)); margin-inline: auto; }
.flowtv__stage { grid-area: player; position: relative; width: 100%; min-width: 0; }
/* The frame never changes its ratio while the YouTube source changes. */
.flowtv__screen { width: 100%; min-width: 0; aspect-ratio: 16 / 9; overflow: hidden; background: transparent; }
.flowtv__youtube, .flowtv__youtube > *, .flowtv__screen .youtube-consent, .flowtv__intro { width: 100%; height: 100%; aspect-ratio: auto; }
.flowtv__screen, .flowtv__screen .youtube-consent, .flowtv__screen video, .flowtv__screen iframe { border-radius: var(--pc-image-radius); }
.flowtv__stage:fullscreen { width: 100%; height: 100%; display: grid; place-items: center; background: var(--pc-black); }
.flowtv__stage:fullscreen .flowtv__screen { position: relative; width: min(100vw, calc(100vh * 16 / 9)); border-radius: 0; }
.flowtv__fullscreen-exit { position: absolute; top: 16px; right: 16px; z-index: 4; }
.flowtv__screen .youtube-consent,
.flowtv__intro { width: 100%; aspect-ratio: 16 / 9; }
.flowtv__intro > video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; background: var(--pc-black); }
.flowtv__youtube[hidden], .flowtv__intro[hidden], .flowtv__details[hidden], .flowtv__intro-description[hidden], .flowtv [hidden] { display: none; }
.flowtv__arrow { position: absolute; top: 50%; transform: translateY(-50%); z-index: 3; border-radius: 50%; background: var(--pc-off-white); color: var(--pc-bermuda); transition: opacity .2s ease, background-color .2s ease; }
.flowtv__arrow--previous { left: 16px; }
.flowtv__arrow--next { right: 16px; }
.flowtv__arrow:hover { background: var(--pc-mustard); color: var(--pc-black); }
.flowtv__arrow:disabled { opacity: .4; cursor: default; }
@media (hover: hover) and (pointer: fine) {
  .flowtv__arrow { opacity: 0; pointer-events: none; }
  .flowtv__stage:hover .flowtv__arrow:not(:disabled),
  .flowtv__arrow:focus-visible { opacity: 1; pointer-events: auto; }
}
.flowtv__controls { grid-area: controls; flex: 0 0 auto; margin-top: 8px; padding: 6px; border: 1px solid rgb(233 235 227 / 20%); border-radius: var(--pc-image-radius); background: rgb(233 235 227 / 4%); }
.pc-player-controls { display: flex; flex-wrap: nowrap; align-items: center; justify-content: center; gap: 10px; min-height: 32px; }
.pc-player-control { display: inline-flex; flex: 0 0 32px; align-items: center; justify-content: center; width: 32px; height: 32px; margin: 0; padding: 0; border: 1px solid rgb(233 235 227 / 35%); border-radius: 50%; background: var(--pc-black); color: var(--pc-off-white); cursor: pointer; transition: background-color .15s ease, border-color .15s ease, color .15s ease; }
.pc-player-control svg { display: block; flex-shrink: 0; width: 18px; height: 18px; pointer-events: none; }
@media (hover: hover) and (pointer: fine) {
  .pc-player-control:hover:not(:disabled) { background: var(--pc-mustard); border-color: var(--pc-mustard); color: var(--pc-black); }
}
.pc-player-control:focus-visible:not(:disabled) { background: var(--pc-mustard); border-color: var(--pc-mustard); color: var(--pc-black); }
@media (hover: none), (pointer: coarse) {
  .flowtv__controls .pc-player-control { touch-action: manipulation; }
}
.pc-player-control:disabled { opacity: .4; cursor: default; }
/* FlowTV has its own controls below the frame, including autoplay recovery. */
.flowtv__screen .youtube-player__sound,
.flowtv__screen [data-youtube-fallback-play],
.flowtv__screen [data-youtube-fallback] img,
.flowtv__screen [data-youtube-fallback] .youtube-consent__overlay { display: none; }
.flowtv__screen .youtube-consent,
.flowtv__screen [data-youtube-fallback] { background: var(--pc-black); }
/* Branded recovery only after an explicit stop or a playback failure.
   Normal startup, pause, buffering and episode changes keep the video surface. */
.flowtv__screen [data-youtube-server-player][data-playback-state="fallback"],
.flowtv__screen [data-youtube-server-player][data-playback-state="fallback"] [data-youtube-fallback] {
  background: var(--pc-black) url('../images/editorial/videobaggrund.png') center / cover no-repeat;
}
.flowtv__provider { grid-area: provider; justify-self: center; display: flex; flex-wrap: wrap; align-items: baseline; justify-content: center; gap: 0 8px; width: max-content; max-width: calc(100vw - 32px); min-width: 0; margin-top: 8px; }
.flowtv__provider > .youtube-player__info,
.flowtv__provider > .youtube-consent__stop { margin: 0; }
.flowtv__provider > .youtube-consent__stop { order: 0; }
.flowtv__provider > .youtube-player__info { order: 1; }
.flowtv__queue { grid-area: episodes; display: flex; flex-direction: column; min-width: 0; min-height: 0; margin-top: 16px; }
.flowtv__filter { grid-area: filter; flex: 0 0 auto; margin: 0 0 8px; }
.flowtv__filter select { width: 100%; min-width: 0; background-color: var(--pc-bermuda); color: var(--pc-off-white); border-color: rgb(255 255 255 / 45%); }
.flowtv__strip { position: relative; display: flex; gap: 16px; min-width: 0; min-height: 0; overflow-x: auto; overflow-anchor: none; overscroll-behavior: contain; scroll-snap-type: x proximity; scrollbar-color: var(--pc-mustard) var(--pc-black); padding: 4px 4px 14px; margin: 0 -4px; }
.flowtv__thumb { position: relative; flex: 0 0 calc((100% - 64px) / 5); min-width: 180px; aspect-ratio: 16 / 9; overflow: hidden; border-radius: var(--pc-image-radius); color: var(--pc-off-white); text-decoration: none; scroll-snap-align: start; background: var(--pc-black); }
.flowtv__thumb > img { width: 100%; height: 100%; object-fit: cover; }
.flowtv__thumb-copy { position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: flex-end; padding: 32px 12px 10px; background: linear-gradient(0deg, rgb(22 22 21 / 95%), rgb(22 22 21 / 25%) 70%, transparent); }
.flowtv__thumb-label { font-size: .75rem; line-height: 1.2; color: var(--pc-mustard); margin-bottom: 4px; }
.flowtv__thumb-title { font-size: 1rem; font-weight: 700; line-height: 1.15; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
/* Paint the marker inside the thumbnail so the scroll viewport cannot clip it. */
.flowtv__thumb:is(:hover, :focus-visible) { outline: 2px solid var(--pc-mustard); outline-offset: -2px; }
.flowtv__thumb[aria-current="true"] { outline: 3px solid var(--pc-mustard); outline-offset: -3px; }
.flowtv__thumb-playing { position: absolute; top: 8px; left: 8px; display: none; padding: 2px 6px; background: var(--pc-mustard); color: var(--pc-black); font-size: .7rem; font-weight: 700; line-height: 1.3; border-radius: var(--pc-radius); }
.flowtv__thumb[aria-current="true"] .flowtv__thumb-playing { display: block; }
.flowtv__status { color: var(--pc-mustard); margin: 0; }
.flowtv__status:empty { display: none; }
.flowtv__status:not(:empty) { margin-block: 12px; }
/* Reuse the episode page grid and the shared, unmodified information-box styles. */
.flowtv__details { margin-top: 64px; }
.flowtv__description { grid-column: span 2; min-width: 0; margin-top: 0; }
.flowtv__description h2 { font-size: clamp(1.6rem, 3vw, 2.4rem); line-height: 1.12; }
.flowtv .entry-content a:not(.button) { color: var(--pc-mustard); }
.flowtv .episode-detail__body a.episode-description__chapter-link { color: var(--pc-off-white); }
.flowtv__intro-description { margin-top: 64px; }
.flowtv__about { display: grid; align-items: center; min-height: 600px; margin: 0; padding-block: 96px; background-color: var(--pc-diner); background-image: var(--pc-gradient-diner); color: var(--pc-black); }
.flowtv__about-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(240px, 320px); align-items: center; gap: clamp(40px, 6vw, 96px); }
.flowtv__about-copy { min-width: 0; }
.flowtv__about-copy > :first-child { margin-top: 0; }
.flowtv__about-copy > :last-child { margin-bottom: 0; }
.flowtv__about-actions { display: flex; flex-wrap: wrap; gap: 12px var(--pc-button-gap); margin-top: 24px; }
.flowtv__about :is(h1, h2) { color: var(--pc-bermuda); }
.flowtv__about h1 { font-size: clamp(1.7rem, 3vw, 2.5rem); line-height: 1.15; }
.flowtv__about h2 { margin-top: 48px; font-size: clamp(1.4rem, 2vw, 1.8rem); line-height: 1.2; }
.flowtv__about p { max-width: 900px; }
.flowtv .flowtv__about a:not(.button) { color: var(--pc-bermuda); text-decoration: underline; text-underline-offset: .15em; }
.flowtv .flowtv__about a:not(.button):hover { color: var(--pc-black); }
.flowtv__about-icon { display: block; width: 100%; height: auto; }
@media (min-width: 800px) and (hover: hover) and (pointer: fine) {
  /* Video and episode chooser are one 16:9-aligned unit. */
  .flowtv__viewer { grid-template-columns: var(--pc-flowtv-stage-width, minmax(0, 1fr)) var(--pc-flowtv-sidebar-width, clamp(200px, 22vw, 280px)); grid-template-areas: "player episodes" "provider ."; column-gap: 16px; }
  .flowtv__queue { height: var(--pc-flowtv-video-height, 65dvh); margin-top: 0; }
	.flowtv__player-panel { margin-bottom: 8px; }
  .flowtv__queue > :is(.flowtv__filter, .flowtv__controls) { width: var(--pc-flowtv-poster-width, calc(100% - 30px)); margin-left: var(--pc-flowtv-poster-inset, 3px); }
  .flowtv:not(.flowtv--player-preview) .flowtv__queue > .flowtv__filter { margin-bottom: 0; }
  .flowtv:not(.flowtv--player-preview) .flowtv__queue > .flowtv__controls { margin-top: 8px; margin-bottom: 5px; }
  .flowtv__strip { flex: 1 1 auto; flex-direction: column; gap: 12px; overflow-x: hidden; overflow-y: auto; scroll-snap-type: y proximity; scroll-padding-block: 3px; margin: 0; padding: 3px 12px 3px 3px; }
  .flowtv__thumb { flex: 0 0 auto; min-width: 0; width: 100%; }
}
/* Stack the focused player before the sidebar becomes too narrow, and in tall desktop windows. */
@media (min-width: 800px) and (max-width: 1280px) and (hover: hover) and (pointer: fine), (min-width: 800px) and (orientation: portrait) and (hover: hover) and (pointer: fine) {
  .flowtv--player-preview .flowtv__viewer {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas: "player" "controls" "provider" "episodes";
  }
  .flowtv--player-preview .flowtv__queue { height: auto; margin-top: 16px; }
  .flowtv--player-preview .flowtv__queue > :is(.flowtv__filter, .flowtv__controls) { width: 100%; margin-left: 0; }
  .flowtv--player-preview .flowtv__strip {
    flex-direction: row;
    gap: 16px;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-snap-type: x proximity;
    scroll-padding-inline: 3px;
    margin: 0;
    padding: 3px;
  }
  .flowtv--player-preview .flowtv__thumb { flex: 0 0 clamp(180px, 32vw, 280px); width: auto; }
}
@media (max-width: 940px) {
  .flowtv__description { grid-column: auto; }
}
@media (max-width: 799px), (hover: none) and (pointer: coarse) {
  .flowtv:not(.flowtv--player-preview) .flowtv__viewer { grid-template-areas: "filter" "player" "controls" "provider" "episodes" "details" "description"; }
  .flowtv:not(.flowtv--player-preview) .flowtv__viewer > [data-flowtv-details],
  .flowtv:not(.flowtv--player-preview) .flowtv__viewer .flowtv__details:not([hidden]) { display: contents; }
  .flowtv:not(.flowtv--player-preview) .flowtv__viewer .flowtv__details > .single-aside { grid-area: details; min-width: 0; margin-top: 24px; }
  .flowtv:not(.flowtv--player-preview) .flowtv__viewer .flowtv__description { grid-area: description; width: 100%; margin-top: 32px; }

  .flowtv--player-preview .flowtv__viewer { grid-template-areas: "player-brand" "player" "controls" "provider" "episodes"; }
  .flowtv--player-preview .flowtv__mobile-player-bar { grid-area: player-brand; display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 40px; margin-bottom: 8px; }
  .flowtv--player-preview .flowtv__mobile-player-brand { display: flex; align-items: center; min-width: 0; margin: 0; }
  .flowtv--player-preview .flowtv__mobile-player-brand img { display: block; width: min(200px, 100%); height: auto; }
  .flowtv--player-preview .flowtv__player-panel-bar { display: none; }
  .flowtv__inner { width: calc(100% - 32px); max-width: none; padding-top: 16px; }
  .flowtv__stage { width: 100%; }
  .flowtv__controls { box-sizing: border-box; width: 100%; margin-top: 8px; margin-inline: 0; border-radius: var(--pc-image-radius); }
  .flowtv__filter, .flowtv__queue { margin-inline: 0; }
  .flowtv__strip { margin-inline: 0; padding-inline: 0; }
  .flowtv__details, .flowtv__intro-description, .flowtv__status { width: calc(100% - 32px); margin-inline: auto; }
  .flowtv__screen, .flowtv__screen .youtube-consent, .flowtv__screen video, .flowtv__screen iframe { border-radius: var(--pc-image-radius); }
  .flowtv__thumb { flex-basis: calc((100% - 32px) / 3); }
  .flowtv__about { min-height: 0; padding-block: 64px; }
  .flowtv__about-layout { grid-template-columns: minmax(0, 1fr); gap: 32px; }
  .flowtv__about-icon { order: -1; width: 160px; justify-self: center; }
}
@media (max-width: 560px) {
  .flowtv__inner { padding-top: 16px; }
  .flowtv__arrow--previous { left: 8px; }
  .flowtv__arrow--next { right: 8px; }
  .flowtv__thumb { flex-basis: 64%; min-width: 0; }
  .flowtv__details, .flowtv__intro-description, .flowtv__status { width: calc(100% - 32px); margin-inline: auto; }
}
/* Keep the episode strip usable in short windows and landscape phones. */
@media (max-height: 600px) {
  .flowtv__inner { padding-top: 16px; }
  .flowtv__thumb-label { display: none; }
  .flowtv__thumb-copy { padding: 20px 8px 6px; }
  .flowtv__thumb-title { font-size: .875rem; }
}
@media (max-height: 600px) and (min-width: 800px) and (hover: hover) and (pointer: fine) {
  .flowtv__filter select { min-height: 44px; padding-block: 6px; }
  .flowtv__controls { margin-top: 6px; padding: 4px; }
}
@media (max-height: 600px) and (max-width: 799px) {
  .flowtv__thumb { flex: 0 0 clamp(96px, 25dvh, 150px); min-width: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .flowtv__strip { scroll-behavior: auto; }
  .flowtv__arrow { transition: none; }
  .pc-player-control { transition: none; }
}

/* Touch navigation must not depend on Safari's sticky :hover state. */
@media (hover: none), (pointer: coarse), (max-width: 799px) {
  .flowtv__stage .flowtv__arrow { opacity: 0; visibility: hidden; pointer-events: none; }
  .flowtv__stage--navigation-visible .flowtv__arrow:not(:disabled),
  .flowtv__stage .flowtv__arrow:focus-visible { opacity: 1; visibility: visible; pointer-events: auto; }
}
/* Viewport fallback keeps playback and controls together on iPhone. */
html.pc-player-expanded, .pc-player-expanded body { overflow: hidden; }
.flowtv__stage.flowtv__stage--expanded {
  position: fixed; inset: 0; z-index: 100000; width: 100%; height: 100vh; height: 100dvh;
  margin: 0; padding: max(48px, env(safe-area-inset-top)) 0 max(54px, env(safe-area-inset-bottom));
  display: flex; align-items: center; justify-content: center; background: var(--pc-black);
}
.flowtv__stage--expanded .flowtv__screen { flex: 0 0 auto; width: min(100%, calc((100vh - 102px) * 16 / 9)); width: min(100%, calc((100dvh - 102px) * 16 / 9)); }
.flowtv__stage--expanded .flowtv__controls { position: absolute; bottom: env(safe-area-inset-bottom, 0px); left: 0; width: 100%; margin: 0; border-radius: 0; }
.flowtv__stage--expanded .flowtv__fullscreen-exit { top: max(8px, env(safe-area-inset-top)); right: max(12px, env(safe-area-inset-right)); width: 40px; height: 40px; }


/* FlowTV episode switch cover: selected episode imagery while YouTube loads. */
.flowtv__youtube { position: relative; }
.flowtv__transition-cover {
  position: absolute;
  inset: 0;
  z-index: 2;
  overflow: hidden;
  pointer-events: none;
}
.flowtv__transition-cover[hidden] { display: none; }
.flowtv__transition-cover img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* PLAY: hide supplementary provider text; footer retains cookie information. */
.flowtv:not(.flowtv--player-preview) .flowtv__provider { display: none; }

/* Match the PLAY control spacing on mobile. */
@media (max-width: 799px), (hover: none) and (pointer: coarse) {
  .flowtv:not(.flowtv--player-preview) .flowtv__queue { margin-top: 4px; }
}

/* PLAY: no divider above episode information on mobile. */
@media (max-width: 799px), (hover: none) and (pointer: coarse) {
  .flowtv .flowtv__details > .single-aside { border-top: 0; }
}

/* Follow the active programme from the player controls. */
.flowtv__follow { text-decoration: none; color: var(--pc-mustard); }
.flowtv__follow[hidden] { display: none; }
