/* Biblioteca TV: panel amplio y señales en tarjetas legibles. */
#worldTvLiveStage.live-workspace {
  grid-template-columns: minmax(370px, 420px) minmax(0, 1fr) !important;
  gap: 20px !important;
  align-items: start !important;
}

#worldTvLiveStage .home-popular-sidebar {
  grid-column: 1 !important;
  position: sticky !important;
  top: 16px;
  display: flex !important;
  flex-direction: column !important;
  min-width: 0 !important;
  max-height: calc(100vh - 32px) !important;
  overflow: hidden !important;
  border: 1px solid #294b5c !important;
  border-radius: 18px !important;
  background: linear-gradient(160deg, #111e2b 0%, #091018 76%) !important;
  box-shadow: 0 18px 42px rgba(0, 0, 0, .28) !important;
}

#worldTvLiveStage .popular-head {
  padding: 18px 16px 10px !important;
}

#worldTvLiveStage .popular-head h2 {
  margin: 5px 0 4px !important;
  font-size: 1.22rem !important;
}

#worldTvLiveStage .popular-head > span {
  color: #9fb4c4 !important;
  font-size: .78rem !important;
  line-height: 1.35 !important;
}

#worldTvLiveStage .home-channel-modes {
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  gap: 7px !important;
  padding: 0 16px 10px !important;
}

#worldTvLiveStage .home-channel-modes button {
  min-height: 33px !important;
  padding: 0 5px !important;
  border-radius: 8px !important;
  font-size: .72rem !important;
}

#worldTvLiveStage #homePopularSearch {
  width: calc(100% - 32px) !important;
  margin: 0 16px 12px !important;
  min-height: 38px !important;
  border-radius: 10px !important;
}

#worldTvLiveStage .home-popular-list {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  align-content: start !important;
  gap: 10px !important;
  min-height: 250px !important;
  max-height: calc(100vh - 290px) !important;
  padding: 2px 16px 14px !important;
  overflow: auto !important;
  background: transparent !important;
}

#worldTvLiveStage .home-popular-list > .home-list-summary,
#worldTvLiveStage .home-popular-list > .home-groups-title,
#worldTvLiveStage .home-popular-list > .home-group-picker,
#worldTvLiveStage .home-popular-list > .home-popular-back,
#worldTvLiveStage .home-popular-list > .home-popular-load-more,
#worldTvLiveStage .home-popular-list > p {
  grid-column: 1 / -1 !important;
}

#worldTvLiveStage .home-channel-row {
  position: relative !important;
  display: block !important;
  min-width: 0 !important;
}

#worldTvLiveStage .home-channel-row .home-channel-card {
  position: relative !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: flex-start !important;
  justify-content: flex-end !important;
  width: 100% !important;
  height: auto !important;
  min-height: 142px !important;
  aspect-ratio: 1.12 / 1 !important;
  padding: 12px !important;
  overflow: hidden !important;
  border: 1px solid #304d60 !important;
  border-radius: 13px !important;
  background: linear-gradient(145deg, #172a38, #0b151f) !important;
  color: #f4f9ff !important;
  text-align: left !important;
  transition: transform .18s ease, border-color .18s ease, background .18s ease !important;
}

#worldTvLiveStage .home-channel-row .home-channel-card:hover,
#worldTvLiveStage .home-channel-row.is-selected .home-channel-card {
  transform: translateY(-2px) !important;
  border-color: #22d8b7 !important;
  background: linear-gradient(145deg, #123b3e, #0d1c25) !important;
  box-shadow: 0 10px 20px rgba(0, 0, 0, .25) !important;
}

#worldTvLiveStage .home-channel-logo {
  display: grid !important;
  place-items: center !important;
  width: 66px !important;
  height: 48px !important;
  margin: 0 auto auto 0 !important;
  overflow: hidden !important;
  border: 1px solid rgba(202, 224, 240, .28) !important;
  border-radius: 10px !important;
  background: #f4f7fa !important;
}

#worldTvLiveStage .home-channel-logo img {
  width: 100% !important;
  height: 100% !important;
  object-fit: contain !important;
}

#worldTvLiveStage .home-channel-text {
  display: block !important;
  min-width: 0 !important;
  width: 100% !important;
  margin-top: 10px !important;
}

#worldTvLiveStage .home-channel-name {
  display: block !important;
  overflow: hidden !important;
  color: #fff !important;
  font-size: .84rem !important;
  font-weight: 850 !important;
  line-height: 1.2 !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

#worldTvLiveStage .home-channel-meta {
  display: block !important;
  overflow: hidden !important;
  margin-top: 3px !important;
  color: #9bb4c5 !important;
  font-size: .68rem !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

#worldTvLiveStage .channel-number-badge {
  position: absolute !important;
  top: 10px !important;
  right: 10px !important;
  padding: 3px 6px !important;
  border-radius: 6px !important;
  background: #0da78f !important;
  color: #021411 !important;
  font-size: .63rem !important;
  font-weight: 900 !important;
}

#worldTvLiveStage .home-channel-fav {
  position: absolute !important;
  right: 9px !important;
  bottom: 9px !important;
  z-index: 2 !important;
  width: 27px !important;
  height: 27px !important;
  margin: 0 !important;
  border-radius: 8px !important;
  background: rgba(5, 14, 22, .88) !important;
}

#worldTvLiveStage .premium-note {
  margin: 0 !important;
  padding: 12px 16px 14px !important;
  border-top: 1px solid #203b4b !important;
  background: #0a131b !important;
}

#worldTvLiveStage .home-live-player {
  grid-column: 2 !important;
  min-width: 0 !important;
}

@media (max-width: 980px) {
  #worldTvLiveStage.live-workspace {
    grid-template-columns: 1fr !important;
  }
  #worldTvLiveStage .home-popular-sidebar {
    position: relative !important;
    top: auto !important;
    max-height: none !important;
  }
  #worldTvLiveStage .home-live-player {
    grid-column: 1 !important;
  }
  #worldTvLiveStage .home-popular-list {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    max-height: 510px !important;
  }
}

@media (max-width: 620px) {
  #worldTvLiveStage .home-popular-list {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    padding: 2px 12px 12px !important;
  }
  #worldTvLiveStage .home-channel-row .home-channel-card {
    min-height: 126px !important;
  }
  #worldTvLiveStage .home-channel-modes,
  #worldTvLiveStage .popular-head {
    padding-left: 12px !important;
    padding-right: 12px !important;
  }
  #worldTvLiveStage #homePopularSearch {
    width: calc(100% - 24px) !important;
    margin-left: 12px !important;
    margin-right: 12px !important;
  }
}

.cine-sync-shared {
  margin-top: 10px;
  min-height: 38px;
  padding: 0 14px;
  border: 1px solid #1ed9b6;
  border-radius: 9px;
  background: #0d5348;
  color: #eafffa;
  font-weight: 850;
  cursor: pointer;
}
.cine-sync-shared:hover { background: #0e7a67; }
html:not([data-admin="yes"]) .cine-sync-shared { display: none; }
