/* TV Imprensa — player cinema (leve) */
.tv-page {
  background: #050b14;
  color: #fff;
  padding: 0 0 2.5rem;
  min-height: 70vh;
}

.tv-page__stage {
  background:
    radial-gradient(1200px 420px at 50% -10%, rgba(26, 115, 232, 0.22), transparent 60%),
    linear-gradient(180deg, #08111d 0%, #050b14 55%);
  padding: 1rem 0 0;
}

.tv-page__shell {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(280px, 0.85fr);
  gap: 1rem;
  align-items: start;
  padding-bottom: 1.5rem;
}

.tv-player {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  background: #000;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.tv-player.is-theater {
  position: relative;
  z-index: 5;
}

/* Modo cinema: player largo, página continua com scroll para enquadrar */
body.tv-theater-on {
  overflow-x: hidden;
  overflow-y: auto;
}

body.tv-theater-on .site-header {
  position: sticky;
  top: 0;
  z-index: 50;
}

body.tv-theater-on .tv-page {
  min-height: auto;
  padding-bottom: 3rem;
}

body.tv-theater-on .tv-page__stage {
  padding-top: 0.75rem;
}

body.tv-theater-on .tv-page__shell {
  grid-template-columns: 1fr;
  max-width: min(100% - 1.5rem, 1480px);
  margin-inline: auto;
  padding-bottom: 2.5rem;
}

body.tv-theater-on .tv-side {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.85rem;
}

body.tv-theater-on .tv-player {
  width: 100%;
  max-width: none;
  margin-inline: auto;
}

body.tv-theater-on .tv-player__viewport {
  /* usa a altura útil da tela, sem cortar o enquadramento */
  aspect-ratio: auto;
  height: min(78vh, calc(100vw * 9 / 16));
  min-height: 320px;
}

@media (max-width: 980px) {
  body.tv-theater-on .tv-side {
    grid-template-columns: 1fr;
  }
  body.tv-theater-on .tv-player__viewport {
    height: auto;
    aspect-ratio: 16 / 9;
  }
}

.tv-player__viewport {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #000;
  cursor: pointer;
}

.tv-player__media,
.tv-player__frame,
.tv-player__poster,
.tv-player__shade {
  position: absolute;
  inset: 0;
  z-index: 1;
}

.tv-player__shade {
  z-index: 2;
}

.tv-player__poster {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.tv-player__frame iframe,
.tv-player__frame video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  background: #000;
  pointer-events: none; /* hover do YouTube (título/descrição) bloqueado */
}

.tv-player__hit {
  position: absolute;
  inset: 0;
  z-index: 3;
  background: transparent;
  cursor: pointer;
}

/* Fusao profissional entre videos (TV) */
.tv-player__fuse {
  position: absolute;
  inset: 0;
  z-index: 22;
  background:
    radial-gradient(ellipse at center, rgba(8, 18, 32, 0.35) 0%, #000 72%),
    #000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.45s cubic-bezier(0.4, 0, 0.2, 1);
}

.tv-player.is-fusing .tv-player__fuse {
  opacity: 1;
  pointer-events: none;
}

.tv-player.is-fusing .tv-ondemand {
  display: none !important;
}

.tv-player__shade {
  background: linear-gradient(180deg, rgba(0,0,0,.45) 0%, transparent 28%, transparent 58%, rgba(0,0,0,.78) 100%);
  opacity: 1;
  transition: opacity .25s;
  pointer-events: none;
  z-index: 2;
}

.tv-player.is-playing:not(.is-idle) .tv-player__shade,
.tv-player.is-playing:not(.is-idle) .tv-player__top,
.tv-player.is-playing:not(.is-idle) .tv-player__controls,
.tv-player.is-playing:not(.is-idle) .tv-player__bigplay {
  opacity: 0;
  pointer-events: none;
}

.tv-player.is-playing.is-idle .tv-player__shade {
  opacity: 1;
  pointer-events: none;
}

.tv-player.is-playing.is-idle .tv-player__top,
.tv-player.is-playing.is-idle .tv-player__controls {
  opacity: 1;
  pointer-events: auto;
}

.tv-player.is-playing .tv-player__bigplay { display: none; }
.tv-player.is-playing .tv-player__poster { opacity: 0; pointer-events: none; }

.tv-player__soundgate {
  position: absolute;
  left: 50%;
  bottom: 4.8rem;
  transform: translateX(-50%);
  z-index: 28;
  display: none;
  align-items: center;
  gap: 0.55rem;
  border: 0;
  border-radius: 999px;
  padding: 0.7rem 1.15rem;
  background: rgba(227, 6, 19, 0.95);
  color: #fff;
  font-family: var(--display, Montserrat, sans-serif);
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  cursor: pointer;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.45);
  animation: tvSoundPulse 1.6s ease-in-out infinite;
}

.tv-player__soundgate svg {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
}

.tv-player.is-playing:not(.is-sound-on) .tv-player__soundgate {
  display: inline-flex;
}

.tv-player.is-sound-on .tv-player__soundgate,
.tv-player.is-fusing .tv-player__soundgate,
.tv-player.is-pip .tv-player__soundgate {
  display: none !important;
}

@keyframes tvSoundPulse {
  0%, 100% { transform: translateX(-50%) scale(1); }
  50% { transform: translateX(-50%) scale(1.04); }
}

.tv-player__bigplay {
  position: absolute;
  inset: 0;
  z-index: 4;
  border: 0;
  background: transparent;
  color: #fff;
  display: grid;
  place-content: center;
  gap: 0.7rem;
  cursor: pointer;
}

.tv-player__bigplay-ring {
  width: 84px;
  height: 84px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(227, 6, 19, 0.92);
  box-shadow: 0 10px 30px rgba(227, 6, 19, 0.35);
  transition: transform .18s, filter .18s;
}

.tv-player__bigplay:hover .tv-player__bigplay-ring {
  transform: scale(1.06);
  filter: brightness(1.08);
}

.tv-player__bigplay-ring svg {
  width: 34px;
  height: 34px;
  margin-left: 3px;
}

.tv-player__bigplay-label {
  font-family: var(--display, Montserrat, sans-serif);
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-size: 0.82rem;
  text-shadow: 0 2px 10px rgba(0,0,0,.5);
}

.tv-player__brand {
  position: absolute;
  left: 0.9rem;
  top: 0.9rem;
  z-index: 30;
  width: clamp(130px, 20vw, 180px);
  height: auto;
  opacity: 0.92;
  pointer-events: none;
  filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.55));
  display: block !important;
  visibility: visible !important;
}

.tv-player.is-pip .tv-player__brand,
body.tv-theater-on .tv-player__brand,
.tv-player:fullscreen .tv-player__brand,
.tv-player:-webkit-full-screen .tv-player__brand,
.tv-player.is-fs .tv-player__brand {
  display: block !important;
  visibility: visible !important;
  opacity: 0.95;
  z-index: 40;
}

.tv-player.is-pip .tv-player__brand {
  width: 88px;
  left: 0.45rem;
  top: 0.45rem;
}

.tv-player:fullscreen .tv-player__brand,
.tv-player:-webkit-full-screen .tv-player__brand {
  left: 1.25rem;
  top: 1.25rem;
  width: clamp(150px, 14vw, 220px);
}

body.tv-theater-on .tv-player__brand {
  left: 1rem;
  top: 1rem;
  width: clamp(140px, 16vw, 200px);
}

.tv-player__livebadge {
  position: absolute;
  left: 1rem;
  top: 3.4rem;
  z-index: 5;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: rgba(227, 6, 19, 0.95);
  color: #fff;
  font-family: var(--display, Montserrat, sans-serif);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  padding: 0.35rem 0.55rem;
  border-radius: 4px;
}

.tv-player__livebadge i,
.tv-player__livejump i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 0 0 rgba(255,255,255,.7);
  animation: tvPulse 1.4s infinite;
}

@keyframes tvPulse {
  70% { box-shadow: 0 0 0 8px rgba(255,255,255,0); }
  100% { box-shadow: 0 0 0 0 rgba(255,255,255,0); }
}

.tv-player__top {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  z-index: 4;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1rem 2.5rem;
  background: linear-gradient(180deg, rgba(0,0,0,.65), transparent);
  transition: opacity .25s;
}

/* Título/descrição do vídeo não aparece no hover do mouse */
.tv-player__now {
  display: none !important;
}

.tv-player__now span {
  display: block;
  font-size: 0.7rem;
  opacity: .8;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-weight: 700;
}

.tv-player__now strong {
  display: block;
  margin-top: 0.2rem;
  font-family: var(--display, Montserrat, sans-serif);
  font-size: clamp(1rem, 2vw, 1.35rem);
  font-weight: 800;
  max-width: 28ch;
  line-height: 1.2;
}

.tv-player__top-actions {
  display: flex;
  gap: 0.35rem;
  align-items: flex-start;
}

.tv-player__controls {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 5;
  padding: 2.2rem 0.85rem 0.75rem;
  background: linear-gradient(0deg, rgba(0,0,0,.82), transparent);
  transition: opacity .25s;
}

.tv-player__progress {
  height: 4px;
  background: rgba(255,255,255,.2);
  border-radius: 99px;
  overflow: hidden;
  margin-bottom: 0.65rem;
  cursor: pointer;
}

.tv-player__progress-bar {
  height: 100%;
  width: 0%;
  background: #e30613;
}

.tv-player__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.tv-player__left,
.tv-player__right {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.tv-player__iconbtn,
.tv-player__textbtn,
.tv-player__livejump {
  border: 0;
  background: rgba(255,255,255,.08);
  color: #fff;
  border-radius: 8px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background .15s;
}

.tv-player__iconbtn {
  width: 40px;
  height: 40px;
}

.tv-player__iconbtn svg { width: 18px; height: 18px; }

.tv-player__iconbtn:hover,
.tv-player__textbtn:hover,
.tv-player__livejump:hover {
  background: rgba(255,255,255,.16);
}

.tv-player__textbtn,
.tv-player__livejump {
  height: 36px;
  padding: 0 0.75rem;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  gap: 0.35rem;
}

.tv-player__volume {
  width: 90px;
  accent-color: #e30613;
}

.tv-player__time {
  font-size: 0.78rem;
  font-weight: 600;
  opacity: .9;
  margin-left: 0.25rem;
}

.tv-player__offline {
  padding: 1rem 1.1rem 1.15rem;
  background: #0d1724;
  border-top: 1px solid rgba(255,255,255,.06);
}

.tv-player__offline strong {
  display: block;
  font-family: var(--display, Montserrat, sans-serif);
  margin-bottom: 0.25rem;
}

.tv-player__offline p {
  margin: 0;
  color: #9bb4c9;
  font-size: 0.9rem;
}

.tv-ondemand {
  display: none;
  border-top: 1px solid rgba(255,255,255,.08);
  background: #0a1522;
  padding: 0.85rem 0.9rem 1rem;
}

.tv-ondemand.is-open { display: block; }

.tv-ondemand__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.tv-ondemand__badge {
  display: inline-block;
  margin-right: 0.45rem;
  padding: 0.18rem 0.45rem;
  border-radius: 4px;
  background: #1a73e8;
  color: #fff;
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  vertical-align: middle;
}

.tv-ondemand__head strong {
  font-family: var(--display, Montserrat, sans-serif);
  font-size: 0.95rem;
  font-weight: 800;
}

.tv-ondemand__count {
  font-size: 0.78rem;
  font-weight: 700;
  color: #9bb4c9;
}

.tv-ondemand__rail {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(200px, 240px);
  gap: 0.65rem;
  overflow-x: auto;
  padding-bottom: 0.25rem;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
}

.tv-ondemand__item {
  scroll-snap-align: start;
  display: grid;
  grid-template-columns: 96px 1fr;
  gap: 0.55rem;
  align-items: center;
  text-align: left;
  border: 1px solid rgba(255,255,255,.1);
  background: rgba(255,255,255,.04);
  color: #fff;
  border-radius: 10px;
  padding: 0.4rem;
  cursor: pointer;
  transition: border-color .15s, background .15s, transform .15s;
}

.tv-ondemand__item:hover {
  background: rgba(255,255,255,.08);
  border-color: rgba(255,255,255,.22);
}

.tv-ondemand__item.is-active {
  border-color: #1a73e8;
  background: rgba(26, 115, 232, 0.18);
  box-shadow: inset 0 0 0 1px rgba(26, 115, 232, 0.35);
}

.tv-ondemand__thumb {
  position: relative;
  display: block;
  border-radius: 6px;
  overflow: hidden;
  background: #111;
}

.tv-ondemand__thumb img {
  display: block;
  width: 96px;
  height: 54px;
  object-fit: cover;
}

.tv-ondemand__thumb em {
  position: absolute;
  left: 0.25rem;
  bottom: 0.25rem;
  min-width: 1.15rem;
  height: 1.15rem;
  padding: 0 0.25rem;
  border-radius: 4px;
  background: rgba(0,0,0,.75);
  color: #fff;
  font-style: normal;
  font-size: 0.65rem;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.tv-ondemand__meta {
  min-width: 0;
  display: grid;
  gap: 0.15rem;
}

.tv-ondemand__meta strong {
  font-size: 0.8rem;
  font-weight: 800;
  line-height: 1.25;
}

.tv-ondemand__meta small {
  font-size: 0.68rem;
  color: #9bb4c9;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.tv-player.is-pip .tv-ondemand { display: none !important; }

.tv-programacao {
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
  padding: 0.95rem 1.1rem 1.05rem;
  background: linear-gradient(105deg, #0f2740 0%, #132a1f 55%, #0d1724 100%);
  border-top: 1px solid rgba(125, 255, 168, 0.18);
}

.tv-programacao__badge {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  min-height: 1.55rem;
  padding: 0 0.55rem;
  border-radius: 4px;
  background: #e8b84a;
  color: #1a1406;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  line-height: 1;
}

.tv-programacao__text strong {
  display: block;
  font-family: var(--display, Montserrat, sans-serif);
  font-size: 0.98rem;
  font-weight: 800;
  margin-bottom: 0.2rem;
}

.tv-programacao__text p {
  margin: 0;
  color: #9bb4c9;
  font-size: 0.88rem;
  line-height: 1.45;
}

body.tv-theater-on .tv-programacao {
  max-width: min(1280px, 100%);
  margin: 0 auto;
}

.tv-side {
  display: grid;
  gap: 0.85rem;
}

.tv-side__card {
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 12px;
  padding: 1.05rem 1.1rem;
}

.tv-side__card header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.65rem;
}

.tv-side__card h1,
.tv-side__card h2 {
  margin: 0;
  font-family: var(--display, Montserrat, sans-serif);
  font-weight: 800;
}

.tv-side__card h1 { font-size: 1.25rem; }
.tv-side__card h2 {
  font-size: 0.95rem;
  margin-bottom: 0.75rem;
}

.tv-side__card > p {
  margin: 0;
  color: #b7c7d6;
  font-size: 0.9rem;
  line-height: 1.5;
}

.tv-side__features {
  margin: 0.85rem 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 0.4rem;
}

.tv-side__features li {
  font-size: 0.84rem;
  color: #d5e0ea;
  padding-left: 1rem;
  position: relative;
}

.tv-side__features li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.45em;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #2fa65a;
}

.tv-side__actions {
  display: flex;
  gap: 0.5rem;
  margin-top: 1rem;
  flex-wrap: wrap;
}

.tv-side__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 0 0.9rem;
  border-radius: 8px;
  font-weight: 800;
  font-size: 0.78rem;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  background: rgba(255,255,255,.08);
  color: #fff;
}

.tv-side__btn:hover { background: rgba(255,255,255,.14); }

.tv-side__btn--wa {
  background: #25d366;
  color: #053b1f;
}

.tv-side__related ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.55rem;
}

.tv-side__related a {
  display: grid;
  grid-template-columns: 108px 1fr;
  gap: 0.65rem;
  align-items: center;
  color: #fff;
}

.tv-side__related img {
  width: 108px;
  height: 60px;
  object-fit: cover;
  border-radius: 6px;
  background: #111;
}

.tv-side__related span {
  font-size: 0.82rem;
  font-weight: 700;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.tv-side__related a:hover span { color: #7dffa8; }

/* Mini-player flutuante (PiP) — funciona com YouTube e iframe */
.tv-player.is-pip {
  position: fixed !important;
  right: 1rem;
  bottom: 1rem;
  left: auto !important;
  top: auto !important;
  width: min(400px, calc(100vw - 1.5rem)) !important;
  z-index: 10000;
  border-radius: 12px !important;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
  animation: tvPipIn .22s ease-out;
}

.tv-player.is-pip .tv-player__viewport {
  aspect-ratio: 16 / 9;
  height: auto;
  min-height: 0;
}

.tv-player.is-pip .tv-player__now strong {
  font-size: 0.85rem;
  max-width: 16ch;
}

.tv-player.is-pip .tv-player__bigplay-label,
.tv-player.is-pip .tv-player__volume,
.tv-player.is-pip .tv-player__textbtn {
  display: none;
}

.tv-player.is-pip .tv-player__bigplay-ring {
  width: 56px;
  height: 56px;
}

.tv-player.is-pip .tv-player__offline,
.tv-player.is-pip .tv-programacao,
.tv-player:fullscreen .tv-programacao,
.tv-player:-webkit-full-screen .tv-programacao {
  display: none;
}

body.tv-pip-on .tv-page__shell {
  /* mantém o espaço do player na página */
}

body.tv-pip-on .tv-page__shell > .tv-player.is-pip {
  /* o player sai do fluxo visualmente, mas o layout da página segue */
}

/* placeholder invisível via margem no stage quando pip ativo */
.tv-page__shell:has(.tv-player.is-pip)::before {
  content: "";
  display: block;
  aspect-ratio: 16 / 9;
  width: 100%;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px dashed rgba(255, 255, 255, 0.08);
}

.tv-player__iconbtn.is-active {
  background: rgba(227, 6, 19, 0.85);
}

@keyframes tvPipIn {
  from { opacity: 0; transform: translateY(12px) scale(0.96); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.tv-player:fullscreen,
.tv-player:-webkit-full-screen,
.tv-player.is-fs:fullscreen {
  width: 100vw !important;
  height: 100vh !important;
  max-width: none !important;
  border-radius: 0 !important;
  border: 0 !important;
  background: #000 !important;
}

.tv-player:fullscreen .tv-player__viewport,
.tv-player:-webkit-full-screen .tv-player__viewport {
  aspect-ratio: auto;
  width: 100%;
  height: 100%;
  min-height: 100vh;
}

.tv-player:fullscreen .tv-player__media,
.tv-player:fullscreen .tv-player__frame,
.tv-player:fullscreen .tv-player__poster,
.tv-player:fullscreen .tv-player__shade,
.tv-player:-webkit-full-screen .tv-player__media,
.tv-player:-webkit-full-screen .tv-player__frame {
  inset: 0;
  width: 100%;
  height: 100%;
}

.tv-player:fullscreen iframe,
.tv-player:fullscreen video,
.tv-player:-webkit-full-screen iframe,
.tv-player:-webkit-full-screen video {
  width: 100% !important;
  height: 100% !important;
  object-fit: contain;
}

@media (max-width: 980px) {
  .tv-page__shell { grid-template-columns: 1fr; }
  .tv-player__volume { width: 64px; }
}

@media (max-width: 560px) {
  .tv-player__bigplay-ring { width: 68px; height: 68px; }
  .tv-player__now strong { font-size: 1rem; max-width: 18ch; }
  .tv-player__volume { display: none; }
}
