/* iPii.TV Live TV final layer v19.74
   Scoped to the unified app's Live TV route. */

html:has(.live-page),
body:has(.live-page) {
  background: #070605;
}

body:has(.live-page) {
  --canvas: #070605;
  --panel: rgba(253, 243, 243, 0.03);
  --hair: rgba(253, 243, 243, 0.08);
}

body:has(.live-page) .topbar {
  background: rgba(7, 6, 5, 0.97);
  border-bottom-color: rgba(253, 243, 243, 0.08);
}

body:has(.live-page) .desktop-nav {
  background: rgba(13, 11, 10, 0.98);
  border-color: rgba(253, 243, 243, 0.08);
}

body:has(.live-page) .live-toolbar,
body:has(.live-page) .channel-panel,
body:has(.live-page) .player-controls {
  background: rgba(253, 243, 243, 0.03);
  border-color: rgba(253, 243, 243, 0.08);
  box-shadow: none;
}

body:has(.live-page) .player-screen {
  background: #090807;
}

body:has(.live-page) .channel-row {
  border-bottom-color: rgba(253, 243, 243, 0.08);
}

body:has(.live-page) .channel-row:hover {
  background: rgba(253, 243, 243, 0.04);
}

body:has(.live-page) .channel-row.is-active {
  background: rgba(138, 29, 29, 0.14);
  box-shadow: inset 2px 0 0 rgba(138, 29, 29, 0.72);
}

body:has(.live-page) .live-page :is(button, input, select):focus-visible {
  outline: 1px solid #8a1d1d;
  outline-offset: 2px;
  box-shadow: 0 0 0 4px rgba(138, 29, 29, 0.26);
}

body:has(.live-page) .channel-list {
  scrollbar-color: rgba(253, 243, 243, 0.20) transparent;
  scrollbar-width: thin;
}

@media (min-width: 981px) {
  body:has(.live-page) main {
    padding-top: 144px;
    padding-bottom: 24px;
  }

  body:has(.live-page) .live-page {
    display: grid;
    gap: 6px;
  }

  body:has(.live-page) .live-page > .page-head {
    display: flex;
    min-height: 40px;
    padding: 0;
    margin: 0;
    justify-content: flex-end;
    align-items: center;
    border: 0;
  }

  body:has(.live-page) .live-page > .page-head > :not(.head-actions) {
    display: none;
  }

  body:has(.live-page) .head-actions {
    width: auto;
    margin: 0;
    gap: 8px;
  }

  body:has(.live-page) .head-actions .button {
    min-height: 40px;
    height: 40px;
  }

  body:has(.live-page) .live-toolbar {
    position: static;
    top: auto;
    min-height: 52px;
    padding: 4px;
    margin: 0;
    grid-template-columns: minmax(280px, 1fr) minmax(220px, 280px) auto;
    gap: 6px;
  }

  body:has(.live-page) .live-toolbar .search-field,
  body:has(.live-page) .live-toolbar .select-field,
  body:has(.live-page) .live-toolbar > .button {
    min-height: 42px;
    height: 42px;
  }

  body:has(.live-page) .module-context {
    min-height: 24px;
    height: 24px;
    padding: 0 4px;
    margin: 0;
  }

  body:has(.live-page) .live-layout {
    min-height: 0;
    align-items: start;
    grid-template-columns: minmax(0, 1fr) minmax(340px, 0.48fr);
    gap: 10px;
  }

  body:has(.live-page) .player-shell {
    align-self: start;
    min-height: 0;
    height: auto;
    grid-template-rows: auto auto;
    overflow: hidden;
    border: 1px solid rgba(253, 243, 243, 0.08);
    border-radius: 14px;
    background: #090807;
  }

  body:has(.live-page) .player-screen {
    width: 100%;
    min-height: 0;
    aspect-ratio: 16 / 9;
    border: 0;
    border-radius: 0;
  }

  body:has(.live-page) .player-controls {
    position: static;
    min-height: 68px;
    border-top: 1px solid rgba(253, 243, 243, 0.08);
    border-radius: 0;
  }

  body:has(.live-page) .channel-panel {
    align-self: start;
    height: clamp(490px, calc(100vh - 278px), 680px);
    min-height: 0;
    overflow: hidden;
    grid-template-rows: auto minmax(0, 1fr);
  }

  body:has(.live-page) .channel-list {
    min-height: 0;
    height: auto;
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-gutter: stable;
  }
}

@media (max-width: 980px) {
  body:has(.live-page) .live-page {
    padding-bottom: calc(96px + env(safe-area-inset-bottom));
  }

  body:has(.live-page) .player-shell,
  body:has(.live-page) .channel-panel {
    background: rgba(253, 243, 243, 0.03);
    box-shadow: none;
  }

  body:has(.live-page) .player-controls button,
  body:has(.live-page) .channel-favorite {
    min-width: 44px;
    min-height: 44px;
  }
}

@media (prefers-reduced-motion: reduce) {
  body:has(.live-page) .live-page *,
  body:has(.live-page) .live-page *::before,
  body:has(.live-page) .live-page *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}

