
/* KOSOVA TV V3243 — CLEAN ONE UI
   CSS-only. No DOM rewrites. No playback changes. */

:root{
  --k-bg:#05080d;
  --k-panel:#0b1119;
  --k-panel2:#101823;
  --k-line:rgba(255,255,255,.09);
  --k-line2:rgba(255,255,255,.14);
  --k-text:#f7f9fc;
  --k-muted:#8f9bab;
  --k-red:#ff2348;
  --k-redsoft:rgba(255,35,72,.14);
}

html,body{
  background:#05080d;
}

/* PLAYER SHELL */
#live .player-shell{
  width:min(1500px,calc(100vw - 30px)) !important;
  height:min(900px,calc(100vh - 30px)) !important;
  border:1px solid var(--k-line2) !important;
  border-radius:22px !important;
  overflow:hidden !important;
  background:var(--k-bg) !important;
  box-shadow:0 30px 100px rgba(0,0,0,.55) !important;
}

#live .player-top,
#live .player-header{
  min-height:62px !important;
  border-bottom:1px solid var(--k-line) !important;
  background:#080d13 !important;
}

#live .video-wrap{
  background:#000 !important;
}

#live video{
  background:#000 !important;
}

/* DESKTOP DRAWER — KEEP ORIGINAL DOM */
#live .player-drawer{
  width:390px !important;
  min-width:390px !important;
  max-width:390px !important;
  background:linear-gradient(180deg,#0c121a,#081018) !important;
  border-left:1px solid var(--k-line) !important;
  overflow:hidden !important;
}

#live .player-drawer > *{
  box-sizing:border-box;
}

#drawerSearch{
  width:100% !important;
  height:42px !important;
  border:1px solid var(--k-line2) !important;
  border-radius:12px !important;
  background:#0f1824 !important;
  color:#fff !important;
  padding:0 13px !important;
  outline:none !important;
}

#drawerSearch:focus{
  border-color:rgba(255,35,72,.62) !important;
  box-shadow:0 0 0 3px rgba(255,35,72,.10) !important;
}

/* category chips */
.player-drawer .cat-tab,
.player-drawer [data-cat],
.player-drawer .ktv-category-chip,
.player-drawer .ktv-v3239-cat{
  min-height:32px !important;
  padding:0 11px !important;
  border-radius:999px !important;
  border:1px solid var(--k-line) !important;
  background:#111a25 !important;
  color:#aab4c1 !important;
  white-space:nowrap !important;
}

.player-drawer .cat-tab.active,
.player-drawer [data-cat].active,
.player-drawer .ktv-category-chip.active,
.player-drawer .ktv-v3239-cat.active{
  background:var(--k-red) !important;
  border-color:var(--k-red) !important;
  color:#fff !important;
}

/* CHANNEL LIST MUST ALWAYS BE VISIBLE */
#drawerList{
  display:block !important;
  visibility:visible !important;
  opacity:1 !important;
  min-height:140px !important;
  overflow-y:auto !important;
  padding:9px !important;
  background:transparent !important;
  scrollbar-width:thin;
  scrollbar-color:rgba(255,255,255,.18) transparent;
}

#drawerList .drawer-channel{
  display:grid !important;
  grid-template-columns:46px minmax(0,1fr) auto !important;
  align-items:center !important;
  gap:10px !important;
  width:100% !important;
  min-height:62px !important;
  margin:0 0 7px !important;
  padding:8px 9px !important;
  border-radius:14px !important;
  border:1px solid transparent !important;
  background:#101923 !important;
  color:#fff !important;
  text-align:left !important;
}

#drawerList .drawer-channel:hover{
  background:#141e2a !important;
  border-color:var(--k-line2) !important;
}

#drawerList .drawer-channel.active{
  background:linear-gradient(90deg,rgba(255,35,72,.18),#121a24 72%) !important;
  border-color:rgba(255,35,72,.55) !important;
  box-shadow:inset 3px 0 0 var(--k-red) !important;
}

#drawerList .drawer-channel img,
#drawerList .drawer-fallback{
  width:46px !important;
  height:46px !important;
  border-radius:11px !important;
  object-fit:contain !important;
  background:#f1f3f5 !important;
}

#drawerList .drawer-channel > span:not(.drawer-fallback){
  min-width:0 !important;
  display:flex !important;
  flex-direction:column !important;
  gap:3px !important;
}

#drawerList .drawer-channel b{
  overflow:hidden !important;
  text-overflow:ellipsis !important;
  white-space:nowrap !important;
  font-size:12px !important;
}

#drawerList .drawer-channel small{
  overflow:hidden !important;
  text-overflow:ellipsis !important;
  white-space:nowrap !important;
  color:var(--k-muted) !important;
  font-size:9px !important;
}

#drawerList .drawer-channel em{
  min-width:40px !important;
  height:22px !important;
  display:inline-flex !important;
  align-items:center !important;
  justify-content:center !important;
  padding:0 7px !important;
  border-radius:999px !important;
  background:var(--k-redsoft) !important;
  border:1px solid rgba(255,35,72,.28) !important;
  color:#fff !important;
  font-size:8px !important;
  font-style:normal !important;
  font-weight:800 !important;
}

/* NOW PLAYING / FOOTER */
#live .ktv-v3239-nowbar,
#live .now-playing,
#live .player-meta{
  border-top:1px solid var(--k-line) !important;
  background:#091018 !important;
}

/* TABLET */
@media (max-width:1180px) and (min-width:761px){
  #live .player-shell{
    width:calc(100vw - 16px) !important;
    height:calc(100vh - 16px) !important;
    border-radius:18px !important;
  }

  #live .player-drawer{
    width:350px !important;
    min-width:350px !important;
    max-width:350px !important;
  }
}

/* MOBILE / PWA */
@media (max-width:760px){
  #live{
    padding:0 !important;
    background:#02050a !important;
  }

  #live .player-shell{
    width:100vw !important;
    height:100dvh !important;
    min-height:100dvh !important;
    border:0 !important;
    border-radius:0 !important;
    box-shadow:none !important;
  }

  #live .player-top,
  #live .player-header{
    min-height:56px !important;
    padding-left:10px !important;
    padding-right:10px !important;
  }

  #live .video-wrap{
    background:#000 !important;
  }

  #live video{
    width:100% !important;
    height:auto !important;
    max-height:34dvh !important;
    aspect-ratio:16/9 !important;
    object-fit:contain !important;
  }

  /* Original drawer becomes safe bottom sheet */
  #live .player-drawer{
    position:absolute !important;
    left:0 !important;
    right:0 !important;
    bottom:0 !important;
    top:auto !important;
    width:100% !important;
    min-width:0 !important;
    max-width:none !important;
    height:76dvh !important;
    border-left:0 !important;
    border-top:1px solid var(--k-line2) !important;
    border-radius:22px 22px 0 0 !important;
    background:linear-gradient(180deg,#0b1119,#081018) !important;
    box-shadow:0 -24px 80px rgba(0,0,0,.58) !important;
    overflow:hidden !important;
    z-index:60 !important;
  }

  #live .player-drawer:before{
    content:"" !important;
    display:block !important;
    width:44px !important;
    height:4px !important;
    margin:8px auto 4px !important;
    border-radius:999px !important;
    background:rgba(255,255,255,.24) !important;
  }

  #drawerSearch{
    height:42px !important;
    font-size:12px !important;
  }

  #drawerList{
    min-height:180px !important;
    padding:8px 8px calc(18px + env(safe-area-inset-bottom)) !important;
  }

  #drawerList .drawer-channel{
    grid-template-columns:42px minmax(0,1fr) auto !important;
    min-height:58px !important;
    gap:9px !important;
    padding:7px 8px !important;
    border-radius:13px !important;
  }

  #drawerList .drawer-channel img,
  #drawerList .drawer-fallback{
    width:42px !important;
    height:42px !important;
    border-radius:10px !important;
  }
}

@media (max-width:420px){
  #live video{
    max-height:31dvh !important;
  }

  #live .player-drawer{
    height:79dvh !important;
    border-radius:20px 20px 0 0 !important;
  }
}
