/* ===== Player · Live TV ===== */
.view-player-live .live-grid{
  display:grid;
  grid-template-columns: 1fr 2fr;  
  gap:18px;
  height: calc(100vh - 120px);
}

.view-player-live .live-sidebar{
  background: var(--card-2);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  display:flex; flex-direction:column;
  overflow:hidden;
}
.view-player-live .live-sidebar__header{
  padding:14px 16px; font-weight:800;
  border-bottom:1px solid rgba(255,255,255,.06);
}
.view-player-live .live-list{
  padding:10px; display:flex; flex-direction:column; gap:10px; overflow:auto;
}

.view-player-live .ch-item{
  display:grid; grid-template-columns:56px 1fr; align-items:center; gap:10px;
  width:100%; padding:10px 12px; min-height:64px;
  border-radius:14px; background:var(--card); box-shadow:var(--shadow);
  text-align:left; cursor:pointer;
}
.view-player-live .ch-item .ch-logo{
  width:56px; height:56px; border-radius:10px; object-fit:contain; background:#0f0e18;
}
.view-player-live .ch-item .ch-title{
  font-weight:800; color:var(--txt);
  white-space:nowrap; overflow:hidden; text-overflow:ellipsis;
}
.view-player-live .ch-item.is-focused{
  border:1px solid var(--brand, #3aff00);
  box-shadow:0 0 0 2px color-mix(in srgb, var(--brand, #7f5af0) 40%, transparent);
}
.view-player-live .ch-item.is-active{ outline:3px solid var(--focus); }

.view-player-live .live-main{
  display:grid;
  grid-template-rows: auto 1fr;  
  gap:18px; min-height:0;
}

.view-player-live .live-top{
  display:grid;
  grid-template-columns: 1.5fr 1.5fr;
  gap:18px; align-items:start;
}

.view-player-live .live-video{
  background:#000; border-radius:var(--radius); box-shadow:var(--shadow);
  overflow:hidden; aspect-ratio:16 / 9;   
}
.view-player-live .live-video > video{
  width:100%; height:100%; display:block;
  object-fit:contain;                
}

@supports not (aspect-ratio: 16/9){
  .view-player-live .live-video{ position:relative; }
  .view-player-live .live-video::before{ content:""; display:block; padding-top:56.25%; }
  .view-player-live .live-video > video{ position:absolute; inset:0; }
}

.view-player-live .live-ads{
  background:var(--card);
  border-radius:var(--radius);
  box-shadow:var(--shadow);
  overflow:hidden;   
  display:flex; align-items:center; justify-content:center;
  position: relative;
}
.view-player-live .live-ads::after{
  position:absolute; top:8px; right:12px;
  font-size:11px; color:rgba(255,255,255,.35);
}

.view-player-live .live-ads__img{
  width:100%;
  height:100%;
  object-fit:contain;
  background:#0f0e18;
  will-change: transform, opacity;
}

@keyframes adInL2R {
  from { transform: translateX(-12%); opacity: 0; }
  to   { transform: translateX(0%);   opacity: 1; }
}
.view-player-live .live-ads__img.ad-enter{
  animation: adInL2R 480ms ease-out both;
}

.view-player-live .live-bottom{
  background:var(--card-2); border-radius:var(--radius); box-shadow:var(--shadow);
  padding:14px; display:grid; grid-template-rows:auto 1fr; gap:10px; overflow:hidden;
}
.view-player-live .epg-now__row{ display:grid; grid-template-columns:180px 1fr; gap:10px; }
.view-player-live .epg-now__time{ font-weight:800; color:var(--accent); }
.view-player-live .epg-now__title{ font-weight:800; }
.view-player-live .epg-now__desc{ color:var(--muted); margin-top:4px; grid-column:1 / -1; }
.view-player-live .epg-list{ overflow:auto; display:flex; flex-direction:column; gap:8px; }
.view-player-live .epg-row{
  display:grid; grid-template-columns:180px 1fr; gap:10px;
   border-radius:12px; padding:10px 12px;
}
.view-player-live .epg-time{ color:var(--muted); font-weight:700; }
.view-player-live .epg-title{ font-weight:700; }

.view-player-live [data-focusable].is-focus::after{ border-radius:16px; }

@media (max-width: 1400px){
  .view-player-live .live-grid{ grid-template-columns:0.8fr 2.2fr; }
}
@media (max-width: 1100px){
  .view-player-live .live-grid{ grid-template-columns:0.8fr; grid-template-rows:auto auto; }
}

.view-player-live .live-list [data-focusable].is-focus::after{
  content: none !important;
}

.view-player-live .live-list .ch-item.is-focused{
  outline: none;
  border: 2px solid var(--brand, #7f5af0);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--brand, #7f5af0) 35%, transparent);
}

.view-player-live .live-list .ch-item.is-active{
  outline: 3px solid var(--brand, #7a5cff);
}

.view-player-live .live-list .ch-item.is-active.is-focused{
  border-color: transparent;
  box-shadow: none;
}

.backchip{
  width:40px; height:40px;
  display:inline-flex; align-items:center; justify-content:center;
  border-radius:12px; cursor:pointer;
  background: var(--panel-bg, rgba(255,255,255,0.06));
  border: 1px solid var(--panel-border, rgba(255,255,255,0.12));
}
.backchip img{ width:20px; height:20px; display:block; }

.backchip:focus, .backchip:focus-visible { outline: none; }
.ch-item:focus, .ch-item:focus-visible { outline: none; }

.backchip.is-focus{
  outline:2px solid var(--brand, #7a5cff);
  outline-offset:2px;
}

.ch-item.is-focus{
  outline:2px solid var(--focus);
  outline-offset:2px;
}

.view-player-live .ch-item .ch-fs-emoji {
  flex: 0 0 auto;
  font-size: 18px;
  line-height: 1;
  color: #fff;
  opacity: .9;
  margin-left: 6px;
}

/* Scrollbar */
.view-player-live .live-list::-webkit-scrollbar{ width:8px; }
.view-player-live .live-list::-webkit-scrollbar-track{ background:#000; }
.view-player-live .live-list::-webkit-scrollbar-thumb{ background:#0099ff; border-radius:4px; }

.view-player-live .live-bottom .epg-list::-webkit-scrollbar{ width:8px; }
.view-player-live .live-bottom .epg-list::-webkit-scrollbar-track{ background:#000; }
.view-player-live .live-bottom .epg-list::-webkit-scrollbar-thumb{ background:#0099ff; border-radius:4px; }

#liveVideo::-webkit-media-controls,
#liveVideo::-webkit-media-controls-enclosure,
#liveVideo::-webkit-media-controls-panel,
#liveVideo::-webkit-media-controls-play-button,
#liveVideo::-webkit-media-controls-mute-button,
#liveVideo::-webkit-media-controls-fullscreen-button {
  display: none !important;
}

.player-area { position: relative; width: 100%; height: 100%; }
#liveVideo   { width: 100%; height: 100%; display: block; object-fit: cover; }

.player-area:fullscreen,
.player-area:-webkit-full-screen {
  width: 100vw;
  height: 100vh;
}

.player-area .live-controls{
  position: absolute;
  right: 16px;
  bottom: 16px;
  z-index: 10;
  display: flex;
  gap: 8px;
}

.ctrl-btn.is-focus { outline: 3px solid var(--brand, #7a5ef6); outline-offset: 2px; border-radius: 12px; }

/* === Favoritos === */

.view-player-live .live-controls .fav-btn{
  display: inline-grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: transparent;
  transition: background-color .18s ease, box-shadow .18s ease, filter .18s ease;
}

.view-player-live .live-controls .fav-btn img{
  width: 22px;
  height: 22px;
  filter: brightness(0) invert(1) contrast(100%) saturate(0) !important;
  opacity: .96;
  transition: filter .18s ease, transform .12s ease, opacity .18s ease;
}

.view-player-live .live-controls .fav-btn.is-added{
  background: rgba(239, 68, 68, .18);
  box-shadow: 0 0 0 2px rgba(239, 68, 68, .70) inset;
}
.view-player-live .live-controls .fav-btn.is-added img{
  filter: invert(15%) sepia(98%) saturate(7440%) hue-rotate(-5deg) brightness(95%) contrast(110%);
  transform: scale(1.05);
}

.player-area .fav-btn.is-added.is-focus{
  box-shadow: 0 0 0 3px rgba(239, 68, 68, .9) inset;
}

.ch-item.is-fav { outline: 2px solid #ffdf00; }

.view-player-live .live-ads{
  position: relative !important;   
  aspect-ratio: 16 / 9;            
  padding: 0 !important;           
  overflow: hidden;                
}

.view-player-live .live-ads__img{
  position: absolute !important;
  inset: 0;          
  width: 100%;
  height: 100%;
  object-fit: cover !important;  
  display: block;
}

@supports not (aspect-ratio: 16/9){
  .view-player-live .live-ads { position: relative !important; }
  .view-player-live .live-ads::before{
    content: "";
    display: block;
    padding-top: 56.25%;
  }
  .view-player-live .live-ads__img{ position: absolute !important; inset: 0; }
}

/* ======================================================
   NORMALIZACIÓN UNIVERSAL (WO4 → 23+)
   ====================================================== */

.view-player-live .ch-item{
  display: -webkit-box !important;
  display: -webkit-flex !important;
  display: flex !important;
  -webkit-box-align: center;
          align-items: center;
  gap: 12px;
  width: 100%;
  padding: 12px 14px;
  min-height: 72px;        
  border-radius: 14px;
  background: var(--card, #0b0f18);
  box-shadow: var(--shadow, 0 2px 10px rgba(0,0,0,.25));
  overflow: hidden;         
  text-align: left;
  cursor: pointer;
}

.view-player-live .ch-item .ch-logo{
  -webkit-box-flex: 0;
          flex: 0 0 60px;    
  width: 60px; height: 60px;
  border-radius: 10px;
  background: #0f0e18;
  object-fit: contain;
  display: block;
  max-width: 100%; max-height: 100%;
}

.view-player-live .ch-item .ch-title{
  -webkit-box-flex: 1;
          flex: 1 1 auto;
  min-width: 0;       
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.15;
  color: var(--txt, #fff) !important; 
  font-weight: 800;
  font-size: 16px;
}

.view-player-live .ch-item > .ch-logo,
.view-player-live .ch-item > .ch-title{
  grid-column: unset !important;
}

.view-player-live .player-area {
  background: #000 !important;   
  border-radius: var(--radius);
  overflow: hidden;
  position: relative;
}

.view-player-live .player-area > video {
  background: #000 !important;  
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
}

.player-area:fullscreen,
.player-area:-webkit-full-screen {
  background: #000 !important;
}

.player-area { position: relative; }              
.player-area #liveVideo { position: relative; z-index: 0; }

.player-loader{
  position: absolute !important;
  top: 0; right: 0; bottom: 0; left: 0;      
  z-index: 9999 !important;
  background: rgba(0,0,0,.7);
  visibility: hidden;
  opacity: 0;
  pointer-events: none;                      
}

.player-loader.is-visible{
  visibility: visible !important;
  opacity: 1 !important;
}

.player-loader .spinner-wrap{
  position: absolute;
  top: 50%;
  left: 50%;
  -webkit-transform: translate(-50%, -50%);
          transform: translate(-50%, -50%);
}

.player-loader .spinner{
  width: 64px;
  height: 64px;
  border: 6px solid rgba(255,255,255,.3);
  border-top-color: #fff;
  border-radius: 50%;
  -webkit-animation: spinLoader 1s linear infinite;
          animation: spinLoader 1s linear infinite;
}

.player-area:fullscreen .player-loader,
.player-area:-webkit-full-screen .player-loader{
  position: absolute !important;
  top: 0; right: 0; bottom: 0; left: 0;
}

@-webkit-keyframes spinLoader { to { -webkit-transform: rotate(360deg); } }
@keyframes spinLoader { to { transform: rotate(360deg); } }

.player-area:fullscreen,
.player-area:-webkit-full-screen{
  background:#000 !important;
  border-radius:0 !important;
}
.player-area:fullscreen > video,
.player-area:-webkit-full-screen > video{
  width:100% !important;
  height:100% !important;
  object-fit:contain !important;
}

.fs-sim .player-area,
.player-area.is-fs-sim{
  position: fixed !important;
  top:0 !important; left:0 !important; right:0 !important; bottom:0 !important;
  width:100vw !important; height:100vh !important;
  z-index: 99999 !important;
  background:#000 !important;
  border-radius:0 !important;
}
.fs-sim .player-area > video,
.player-area.is-fs-sim > video{
  width:100% !important;
  height:100% !important;
  object-fit:contain !important;  
}
.fs-sim .live-controls{
  position:absolute; right:16px; bottom:16px; z-index:100000;
}

.fs-sim .player-loader,
.player-area.is-fs-sim .player-loader{
  position:absolute !important;
  top:0;left:0;right:0;bottom:0;
}
