.tv-trailer-host { width: 100%; height: 100%; color: #f4ecd8; background: #141017; container-type: inline-size; }
.tv-trailer-host[hidden] { display: none; }
.tv-trailer { width: 100%; height: 100%; min-width: 0; display: grid; grid-template-rows: auto minmax(200px, 1fr) auto; overflow: auto; font-family: var(--font-body, Manrope), Arial, sans-serif; background: #141017; }
.tv-trailer *, .tv-trailer *::before, .tv-trailer *::after { box-sizing: border-box; }
.tv-trailer button, .tv-trailer a { font: inherit; font-size: 13px; min-height: 44px; color: inherit; }
.tv-trailer button { cursor: pointer; }
.tv-trailer button:disabled { opacity: .5; cursor: default; }
.tv-trailer button:focus-visible, .tv-trailer a:focus-visible { outline: 2px solid #dcc2ee; outline-offset: -3px; }
.tv-trailer-header { position: sticky; top: 0; z-index: 3; min-height: 53px; display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 4px 20px; border-bottom: 1px solid #ffffff16; background: #141017; }
.tv-trailer-heading { min-width: 0; display: flex; align-items: baseline; gap: 12px; }
.tv-trailer-title { margin: 0; font-size: 19px; font-weight: 650; letter-spacing: -.03em; line-height: 1.2; }
.tv-trailer-edition { color: #c3b5cd; font-size: 12px; }
.tv-trailer-back { flex: 0 0 auto; border: 0; padding: 6px 0 6px 10px; background: transparent; font-weight: 600 !important; }
.tv-trailer-stage { position: relative; min-width: 0; min-height: 200px; display: grid; place-items: center; overflow: hidden; background: #08070a; }
.tv-trailer-video { position: absolute; inset: 0; min-width: 200px; min-height: 200px; }
.tv-trailer-iframe { display: block; border: 0; width: 100%; height: 100%; }
.tv-trailer-placeholder { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; padding: 24px; background: #100d14; text-align: center; }
.tv-trailer-placeholder[hidden] { display: none; }
.tv-trailer-standby { font-size: clamp(29px, 5cqw, 55px); line-height: 1; font-weight: 600; letter-spacing: -.055em; color: #dcc2ee; }
.tv-trailer-stage-message { margin: 0; font-size: 14px; line-height: 1.5; color: #bbabc5; }
.tv-trailer-footer { padding: 2px 20px 9px; border-top: 1px solid #ffffff16; }
.tv-trailer-transport { display: flex; gap: 12px; align-items: center; min-width: 0; }
.tv-trailer-play, .tv-trailer-eject { min-width: 86px; flex: 0 0 auto; padding: 5px 12px; border: 0; border-radius: 5px; background: transparent; font-weight: 600 !important; }
.tv-trailer-play { color: #edd9fb !important; padding-left: 0; text-align: left; }
.tv-trailer-eject { color: #c7b8d1 !important; border-left: 1px solid #ffffff21; border-radius: 0; }
.tv-trailer-external { margin-left: auto; display: inline-flex; align-items: center; justify-content: flex-end; text-decoration: none; color: #bba6c8 !important; white-space: nowrap; }
.tv-trailer-status { margin: 0; color: #af9cbc; font-size: 11px; line-height: 1.4; overflow-wrap: anywhere; }
.tv-trailer-host[data-playback=error] .tv-trailer-status { color: #eac3b4; }
@media (hover: hover) {
  .tv-trailer button:hover:not(:disabled), .tv-trailer a:hover { color: #fff !important; }
}
@container (max-width: 560px) {
  .tv-trailer-header { padding: 4px 14px; gap: 10px; }
  .tv-trailer-heading { flex-direction: column; gap: 2px; }
  .tv-trailer-title { font-size: 18px; }
  .tv-trailer-edition { font-size: 11px; }
  .tv-trailer-footer { padding: 2px 14px max(10px, env(safe-area-inset-bottom)); }
  .tv-trailer-transport { gap: 6px; }
  .tv-trailer-play, .tv-trailer-eject { min-width: 76px; padding-inline: 8px; }
  .tv-trailer-play { padding-left: 0; }
  .tv-trailer button, .tv-trailer a { font-size: 12px; }
}
@media (max-height: 500px) {
  .tv-trailer-header { min-height: 46px; padding-block: 0; }
  .tv-trailer-footer { padding-bottom: 5px; }
  .tv-trailer-heading { flex-direction: row; align-items: baseline; gap: 10px; }
  .tv-trailer-title { font-size: 17px; }
}
/* A 320px landscape viewport still gives YouTube its required 200px height.
   Keep both actions visible; detailed loading/error messages may scroll. */
@media (max-height: 360px) and (orientation: landscape) {
  .tv-trailer-header { min-height: 44px; border-bottom: 0; padding-block: 0; }
  .tv-trailer-footer { padding-top: 0; padding-bottom: max(5px, calc(env(safe-area-inset-bottom) - 8px)); border-top: 0; }
  .tv-trailer-host:is([data-playback=idle],[data-playback=ready],[data-playback=playing],[data-playback=paused],[data-playback=buffering],[data-playback=ended]) .tv-trailer-status {
    position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap;
  }
}
