/* TV/remote affordances. Desktop hover behaviour remains unchanged. */
@media (hover:none), (pointer:coarse) {
  body.studio-theme a:focus,
  body.studio-theme button:focus,
  body.studio-theme [role="button"]:focus,
  body.studio-theme [tabindex]:focus {
    outline:3px solid var(--studio-color-link,#69b6ff)!important;
    outline-offset:4px;
    box-shadow:0 0 0 5px color-mix(in srgb,var(--studio-color-link,#69b6ff) 24%,transparent);
  }
  body.studio-theme .studio-rank-card:focus,
  body.studio-theme .studio-taste-card:focus,
  body.studio-theme .studio-cine-card.front:focus,
  body.studio-theme .story-wave-card:focus-within,
  body.studio-theme .studio-exact-grid>[data-studio-slide]:focus-within,
  body.studio-theme [data-movie-frame]:focus-within {
    border-color:var(--studio-color-link,#69b6ff)!important;
    box-shadow:0 0 0 3px color-mix(in srgb,var(--studio-color-link,#69b6ff) 35%,transparent),0 14px 34px #0006;
  }
  body.studio-theme .studio-taste-card:focus .studio-taste-card__open,
  body.studio-theme .studio-taste-card:focus-within .studio-taste-card__open,
  body.studio-theme .story-wave-card:focus-within .story-wave-actions,
  body.studio-theme .story-wave-card:focus-within .story-wave-direct {
    opacity:1;
    transform:none;
    pointer-events:auto;
  }
}

/* Keep common poster and trailer boxes usable when aspect-ratio is absent. */
@supports not (aspect-ratio:1/1) {
  body.studio-theme .studio-card-media,
  body.studio-theme .a2-discovery-media,
  body.studio-theme .studio-rank-card__art,
  body.studio-theme .studio-taste-card__art {
    position:relative;
    height:0;
    padding-bottom:150%;
  }
  body.studio-theme .studio-card-media>img,
  body.studio-theme .a2-discovery-media>img {
    position:absolute;
    inset:0;
  }
  body.studio-theme .studio-rank-card__art>img,
  body.studio-theme .studio-taste-card__art>img {
    position:absolute;
    inset:0;
  }
  body.studio-theme .mt-player-frame,
  body.studio-theme .w146-player {
    min-height:240px;
  }
}

html[data-tv-no-aspect-ratio] body.studio-theme .studio-card-media,
html[data-tv-no-aspect-ratio] body.studio-theme .a2-discovery-media,
html[data-tv-no-aspect-ratio] body.studio-theme .studio-rank-card__art,
html[data-tv-no-aspect-ratio] body.studio-theme .studio-taste-card__art {
  position:relative;
  height:0;
  padding-bottom:150%;
}
html[data-tv-no-aspect-ratio] body.studio-theme .studio-card-media>img,
html[data-tv-no-aspect-ratio] body.studio-theme .a2-discovery-media>img,
html[data-tv-no-aspect-ratio] body.studio-theme .studio-rank-card__art>img,
html[data-tv-no-aspect-ratio] body.studio-theme .studio-taste-card__art>img {
  position:absolute;
  inset:0;
}

/* Keep the shell clearance and footer colours when :has() is unavailable. */
html[data-tv-legacy-css] body.studio-theme .studio-safe-page,
html[data-tv-legacy-css] body.studio-theme .studio-catalog-hero,
html[data-tv-legacy-css] body.studio-theme .detail-hero,
html[data-tv-legacy-css] body.studio-theme .watch-wrap,
html[data-tv-legacy-css] body.studio-theme .download-hero {
  padding-top:var(--studio-shell-clearance)!important;
}
html[data-tv-legacy-css] body.is-studio-guest .studio-exact-latest {
  border:0!important;
  box-shadow:none!important;
  background:var(--theme-canvas)!important;
}
html[data-tv-legacy-css] body.studio-theme .studio-exact-footer.studio-footer-compact,
html[data-tv-legacy-css] body.studio-theme .studio-compact-waves {
  background:var(--studio-color-canvas,#020713)!important;
}

body.studio-theme.studio-watch-page .w146[data-watch-page] .w146-player.is-expanded-player {
  height:100vh!important;
}
@supports (height:100dvh) {
  body.studio-theme.studio-watch-page .w146[data-watch-page] .w146-player.is-expanded-player {
    height:100dvh!important;
  }
}

@supports not (height:100dvh) {
  body.studio-theme .universal-work-sheet,
  body.studio-theme .catalog-presentation-story_path dialog.mt-focus-host {
    max-height:calc(100vh - 24px);
  }
}
