
/* KOSOVA TV V3238 — PUBLIC OTT UX
   Additive UI only. Playback engine is untouched. */

:root{
  --ktv-ott-radius:18px;
  --ktv-ott-radius-sm:12px;
  --ktv-ott-line:rgba(255,255,255,.08);
  --ktv-ott-panel:rgba(12,15,20,.96);
  --ktv-ott-soft:rgba(255,255,255,.055);
  --ktv-ott-text:#fff;
  --ktv-ott-muted:rgba(255,255,255,.62);
  --ktv-ott-accent:#ef233c;
}

/* Player drawer: desktop */
#live .player-drawer,
.player-overlay .player-drawer{
  width:min(430px,34vw);
  max-width:430px;
  min-width:340px;
  background:
    radial-gradient(circle at 30% 0%,rgba(239,35,60,.10),transparent 34%),
    var(--ktv-ott-panel);
  border-left:1px solid var(--ktv-ott-line);
  box-shadow:-22px 0 60px rgba(0,0,0,.34);
  backdrop-filter:blur(20px);
  -webkit-backdrop-filter:blur(20px);
}

#live.drawer-open .player-drawer,
.player-overlay.drawer-open .player-drawer{
  transform:translateX(0);
}

.ktv-drawer-pro{
  display:flex;
  flex-direction:column;
  min-height:0;
  height:100%;
}

.ktv-drawer-head{
  position:sticky;
  top:0;
  z-index:8;
  padding:14px 14px 10px;
  background:linear-gradient(180deg,rgba(12,15,20,.99) 70%,rgba(12,15,20,.90));
  border-bottom:1px solid var(--ktv-ott-line);
}

.ktv-drawer-kicker{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  margin-bottom:10px;
}

.ktv-drawer-title{
  display:flex;
  flex-direction:column;
  gap:2px;
}

.ktv-drawer-title b{
  color:var(--ktv-ott-text);
  font-size:15px;
  letter-spacing:.01em;
}

.ktv-drawer-title small{
  color:var(--ktv-ott-muted);
  font-size:11px;
}

.ktv-drawer-count{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-width:34px;
  height:26px;
  padding:0 9px;
  border-radius:999px;
  background:var(--ktv-ott-soft);
  border:1px solid var(--ktv-ott-line);
  color:#fff;
  font-size:11px;
  font-weight:800;
}

.ktv-drawer-search-wrap{
  position:relative;
  margin-bottom:10px;
}

.ktv-drawer-search-wrap::before{
  content:"⌕";
  position:absolute;
  left:12px;
  top:50%;
  transform:translateY(-52%);
  color:rgba(255,255,255,.52);
  pointer-events:none;
}

#drawerSearch{
  width:100%;
  min-height:42px;
  padding:0 12px 0 34px;
  border-radius:12px;
  border:1px solid var(--ktv-ott-line);
  background:rgba(255,255,255,.05);
  color:#fff;
  outline:none;
  transition:.18s ease;
}

#drawerSearch:focus{
  border-color:rgba(239,35,60,.7);
  box-shadow:0 0 0 3px rgba(239,35,60,.12);
  background:rgba(255,255,255,.07);
}

.ktv-category-row{
  display:flex;
  gap:7px;
  overflow-x:auto;
  scrollbar-width:none;
  padding:1px 0 2px;
  scroll-snap-type:x proximity;
}

.ktv-category-row::-webkit-scrollbar{display:none}

.ktv-category-chip{
  flex:0 0 auto;
  scroll-snap-align:start;
  min-height:34px;
  padding:0 12px;
  border:1px solid var(--ktv-ott-line);
  border-radius:999px;
  background:rgba(255,255,255,.045);
  color:rgba(255,255,255,.72);
  font-size:11px;
  font-weight:800;
  cursor:pointer;
  transition:.16s ease;
  white-space:nowrap;
}

.ktv-category-chip:hover{
  background:rgba(255,255,255,.09);
  color:#fff;
}

.ktv-category-chip.active{
  background:var(--ktv-ott-accent);
  border-color:var(--ktv-ott-accent);
  color:#fff;
  box-shadow:0 8px 22px rgba(239,35,60,.22);
}

#drawerList{
  padding:10px 10px 18px;
  overflow-y:auto;
  overscroll-behavior:contain;
  scrollbar-width:thin;
}

#drawerList .drawer-channel{
  width:100%;
  min-height:64px;
  display:grid;
  grid-template-columns:48px 1fr auto;
  align-items:center;
  gap:11px;
  padding:8px 10px;
  margin:0 0 7px;
  border:1px solid transparent;
  border-radius:14px;
  background:rgba(255,255,255,.035);
  color:#fff;
  text-align:left;
  transition:transform .14s ease,background .14s ease,border-color .14s ease;
}

#drawerList .drawer-channel:hover{
  transform:translateY(-1px);
  background:rgba(255,255,255,.07);
  border-color:var(--ktv-ott-line);
}

#drawerList .drawer-channel.active{
  background:linear-gradient(90deg,rgba(239,35,60,.19),rgba(255,255,255,.055));
  border-color:rgba(239,35,60,.38);
  box-shadow:inset 3px 0 0 var(--ktv-ott-accent);
}

#drawerList .drawer-channel img,
#drawerList .drawer-fallback{
  width:48px;
  height:48px;
  object-fit:contain;
  border-radius:11px;
  background:rgba(255,255,255,.055);
  border:1px solid var(--ktv-ott-line);
}

#drawerList .drawer-fallback{
  display:grid;
  place-items:center;
  font-size:11px;
  font-weight:900;
}

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

#drawerList .drawer-channel b{
  display:block;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
  font-size:13px;
  line-height:1.2;
}

#drawerList .drawer-channel small{
  display:block;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
  color:var(--ktv-ott-muted);
  font-size:10px;
}

#drawerList .drawer-channel em{
  justify-self:end;
  min-width:42px;
  height:24px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding:0 8px;
  border-radius:999px;
  background:rgba(239,35,60,.13);
  border:1px solid rgba(239,35,60,.22);
  color:#fff;
  font-size:9px;
  font-style:normal;
  font-weight:900;
  letter-spacing:.04em;
}

#drawerList .drawer-channel.locked em{
  background:rgba(255,188,61,.12);
  border-color:rgba(255,188,61,.24);
}

.ktv-drawer-empty{
  min-height:190px;
  display:grid;
  place-items:center;
  text-align:center;
  color:var(--ktv-ott-muted);
  padding:24px;
}

.ktv-drawer-empty b{
  display:block;
  color:#fff;
  margin-bottom:6px;
}

/* Main public polish */
.channel-card,
.rail-card,
.guide-card,
.poster-card{
  border-radius:var(--ktv-ott-radius) !important;
}

.channel-card.selected{
  outline:2px solid rgba(239,35,60,.55);
  outline-offset:2px;
}

#live .player-shell{
  border-radius:22px;
  overflow:hidden;
}

#sourceLabel{
  max-width:100%;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}

/* Tablet */
@media (max-width:1100px){
  #live .player-drawer,
  .player-overlay .player-drawer{
    width:min(390px,44vw);
    min-width:320px;
  }
}

/* Mobile: drawer becomes bottom sheet */
@media (max-width:720px){
  #live .player-drawer,
  .player-overlay .player-drawer{
    position:absolute;
    left:0;
    right:0;
    top:auto;
    bottom:0;
    width:100%;
    min-width:0;
    max-width:none;
    height:min(74vh,680px);
    border-left:0;
    border-top:1px solid var(--ktv-ott-line);
    border-radius:20px 20px 0 0;
    transform:translateY(105%);
    box-shadow:0 -24px 60px rgba(0,0,0,.48);
  }

  #live.drawer-open .player-drawer,
  .player-overlay.drawer-open .player-drawer{
    transform:translateY(0);
  }

  .ktv-drawer-head{
    padding:12px 12px 9px;
  }

  .ktv-drawer-head::before{
    content:"";
    display:block;
    width:40px;
    height:4px;
    margin:0 auto 10px;
    border-radius:99px;
    background:rgba(255,255,255,.25);
  }

  #drawerList{
    padding:8px 8px calc(22px + env(safe-area-inset-bottom));
  }

  #drawerList .drawer-channel{
    min-height:60px;
    grid-template-columns:44px 1fr auto;
    border-radius:13px;
  }

  #drawerList .drawer-channel img,
  #drawerList .drawer-fallback{
    width:44px;
    height:44px;
  }

  .ktv-category-chip{
    min-height:32px;
    padding:0 11px;
  }
}

/* Small phones */
@media (max-width:420px){
  #live .player-drawer,
  .player-overlay .player-drawer{
    height:78vh;
  }

  .ktv-drawer-title b{font-size:14px}
  .ktv-drawer-title small{font-size:10px}
  #drawerList .drawer-channel b{font-size:12px}
}
