/* ===== TV · List ===== */
.view-tv-list .list-title { font-weight: 800; }

.view-tv-list { --tv-cols: 5; } 

.view-tv-list .grid-tv {
  display: grid;
  grid-template-columns: repeat(var(--tv-cols), minmax(0, 1fr));
  gap: 16px;
}

.view-tv-list .tv-card {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 12px 14px;
  min-height: 96px; 
  @supports (min-height: clamp(1px, 1vh, 1px)) {
    min-height: clamp(76px, 9vh, 112px);
  }
  text-align: left;
}

.view-tv-list .tv-card__logo{
  width: 64px;          
  height: 64px;        
  border-radius: 12px;
  object-fit: cover;
  background: #0f0e18;
  flex: 0 0 auto;
  display: block;
  max-width: none;     
}

@supports (width: clamp(1px, 1vw, 1px)) {
  .view-tv-list .tv-card__logo{
    width: clamp(52px, 5vw, 72px);
    height: clamp(52px, 5vw, 72px);
  }
}

.view-tv-list .tv-card__title {
  font-weight: 800;
  color: var(--txt);
  font-size: clamp(14px, 1.05vw, 20px);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.view-tv-list .tv-card__title{
  min-width: 0;        
  flex: 1 1 auto;      
}

.view-tv-list .tv-card__title{ font-size: 16px; }
@supports (font-size: clamp(1px, 1vw, 1px)) {
  .view-tv-list .tv-card__title{ font-size: clamp(14px, 1.05vw, 20px); }
}

.view-tv-list [data-focusable].is-focus::after {
  border-radius: calc(var(--radius) + 6px);
}

@media (max-width: 1800px) { .view-tv-list { --tv-cols: 4; } }
@media (max-width: 1500px) { .view-tv-list { --tv-cols: 3; } }
@media (max-width: 1100px) { .view-tv-list { --tv-cols: 2; } }
@media (max-width: 760px)  { .view-tv-list { --tv-cols: 1; } }


/* ===== TV · Categories ===== */
.view-tv-cats { --tv-cat-cols: 5; }

.view-tv-cats .list {
  display: grid;
  grid-template-columns: repeat(var(--tv-cat-cols), minmax(0, 1fr));
  gap: 14px;
}

.view-tv-cats .list-item {
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  min-height: clamp(60px, 7vh, 110px);
  padding: 16px 14px;
  border-radius: var(--radius);
  background: var(--card);
  box-shadow: var(--shadow);
}

.view-tv-cats .list-item__title {
  font-weight: 700;
  color: var(--txt);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.view-tv-cats .count-badge { display: none; }

.view-tv-cats [data-focusable].is-focus::after {
  border-radius: calc(var(--radius) + 6px);
}

@media (max-width: 1366px) { .view-tv-cats { --tv-cat-cols: 4; } }
@media (max-width: 1100px) { .view-tv-cats { --tv-cat-cols: 3; } }
@media (max-width: 800px)  { .view-tv-cats { --tv-cat-cols: 2; } }

.list-toprow { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }

.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.is-focus {
  outline: 2px solid var(--brand, #7a5cff);
  outline-offset: 2px;
}

.modal-backdrop[hidden], .modal[hidden] { display: none; }

.modal-backdrop {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.55);
  backdrop-filter: blur(1px);
  z-index: 9998;
}

.modal {
  position: fixed; inset: 0;
  display: grid; place-items: center;
  z-index: 9999;
}

.modal__card {
  width: min(520px, 92vw);
  background: var(--bg);
  color: var(--txt, #fff);
  border-radius: calc(var(--radius, 12px) + 2px);
  box-shadow: 0 12px 45px rgba(0,0,0,0.35);
  padding: 20px 18px;
  outline: none;
}

.modal__title {
  margin: 0 0 8px 0;
  font-size: clamp(18px, 1.2vw, 22px);
  font-weight: 800;
}

.modal__msg { margin: 0 0 16px 0; opacity: .9; }

.modal__actions { display: flex; gap: 10px; justify-content: flex-end; }

.btn {
  padding: 10px 14px;
  background: var(--panel-bg, rgba(255,255,255,0.06));
  border: 1px solid var(--panel-border, rgba(255,255,255,0.12));
  border-radius: 10px;
  font-weight: 700;
}
.btn-primary {
  background: var(--brand, #7a5cff);
  border-color: transparent;
  color: #fff;
}

.modal [data-modal-focus].is-focus,
.modal [data-modal-focus]:focus-visible {
  outline: 2px solid var(--brand, #7a5cff);
  outline-offset: 2px;
  border-radius: 12px;
}

body.modal-open .view-tv-list {
  pointer-events: none;
  user-select: none;
}

/* TV · Categories*/
.view-tv-cats .list-item { 
  position: relative; 
  overflow: visible; 
  padding: 0;                  

}
.view-tv-cats .list-item__wrap { 
  display: flex;           
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: inherit;   
  padding: 16px 14px;  
  border-radius: inherit;
  box-sizing: border-box;
}

.view-tv-cats .list-item__wrap.is-focus::after,
.view-tv-cats .list-item__wrap:focus-visible::after {
  content: "";
  position: absolute;
  inset: -3px;        
  border: var(--ring-width, 3px) solid var(--ring, #ffd54f);
  border-radius: calc(var(--radius) + 6px);
  pointer-events: none;
  box-shadow: 0 0 8px 2px var(--ring, #ffd54f);
  z-index: 5;
}

.view-tv-cats .list-item__wrap.is-focus {
  outline: 2px solid var(--ring, #ffd54f);
  outline-offset: 2px;
}

#liveAds {
  min-height: 100%;        
  display: grid;            
  place-items: center;
  z-index: 1;  
}
#tvAdImg.ad-enter { animation: adEnter .35s ease-out; }
@keyframes adEnter { from { opacity: 0; transform: scale(.98); } to { opacity: 1; transform: scale(1); } }


