/* ========================================================================
   TV GUIDE — Early-2000s DirecTV look.
   Sharp corners. Grey page + blue list block. Nothing else.
   ======================================================================== */

:root {
  /* Guide interior palette (the blue list block) */
  --c-bg-0:        #04102f;
  --c-bg-1:        #06174a;
  --c-bg-2:        #0a2f7a;

  /* Row bands — raised contrast for visible separation */
  --c-row-a:       #0a1f4e;
  --c-row-b:       #0f2a68;
  --c-row-border:  #000000;
  --c-row-hi:      rgba(255, 255, 255, 0.06);

  /* Page bg (outside the list) — grey, darker at top */
  --c-page-top:    #3a3d45;
  --c-page-mid:    #6d727b;
  --c-page-bot:    #a9adb5;

  --c-border:      rgba(160, 195, 255, 0.22);
  --c-border-strong: rgba(255, 255, 255, 0.18);

  /* Text */
  --c-text:        #ffffff;
  --c-text-dim:    #d6e0f2;
  --c-text-mute:   #8ea7d0;

  --c-cyan:        #5ab9ff;
  --c-yellow:      #ffc419;
  --c-yellow-soft: #ffd83d;
  --c-red:         #ff2e24;
  --c-hd:          #ffffff;

  /* Type */
  --f-display: 'Barlow Condensed', system-ui, sans-serif;
  --f-body:    'Barlow', system-ui, sans-serif;

  /* Geometry */
  --row-h:     46px;
  --ch-col-w:  240px;
  --slot-w:    260px;
}

/* ---------- Reset / base ---------- */
* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
  font-family: var(--f-body);
  color: var(--c-text);
  background:
    linear-gradient(180deg, var(--c-page-top) 0%, var(--c-page-mid) 55%, var(--c-page-bot) 100%);
  background-attachment: fixed;
  min-height: 100vh;
  overflow: hidden;                /* page never scrolls; only the grid scrolls */
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Subtle grain on the grey */
body::before {
  content: "";
  position: fixed; inset: 0;
  pointer-events: none;
  opacity: 0.04;
  z-index: 1;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
  mix-blend-mode: overlay;
}

button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }

/* ---------- App shell ---------- */
.app {
  position: relative;
  z-index: 2;
  max-width: 100%;
  margin: 0 auto;
  padding: 14px 0 8px;            /* bottom gutter so last row + scrollbar show */
  display: flex;
  flex-direction: column;
  gap: 0;
  height: 100vh; height: 100dvh;     /* dvh = true viewport, fixes chopped bottom */
}

/* ---------- Info bar — 3 columns aligned with the grid below ---------- */
.info-bar {
  display: grid;
  grid-template-columns: var(--ch-col-w) 1fr auto;    /* SAME columns as grid below */
  gap: 0;
  align-items: center;                                 /* vertically center all content */
  padding: 6px 18px 10px;
  background: transparent;
  border: none;
  box-shadow: none;
  flex-shrink: 0;                    /* never compress — always fully visible */
}

.info-left {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-right: 12px;
}
.brand-mark { width: 40px; height: auto; }
.day-time {white-space:nowrap;
  font-family: var(--f-display);
  font-weight: 600;
  font-size: 16px;
  letter-spacing: 0.5px;
  color: var(--c-text);
  text-shadow: 0 1px 2px rgba(0,0,0,0.5);
}

.info-mid {
  min-width: 0;                      /* allows child text-ellipsis to work */
  padding-right: 16px;
}
.now-top-row {
  display: flex;
  align-items: baseline;
  gap: 16px;
}
.now-title {
  font-family: var(--f-display);
  font-weight: 700;
  font-size: 30px;
  letter-spacing: 0.3px;
  line-height: 1.1;
  color: var(--c-text);
  text-shadow: 0 1px 3px rgba(0,0,0,0.55);
  flex: 1;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.rating {
  padding: 2px 10px;
  border: 1px solid var(--c-text);
  font-family: var(--f-display);
  font-weight: 600;
  letter-spacing: 0.6px;
  color: var(--c-text);
  font-size: 13px;
  flex-shrink: 0;
  text-shadow: 0 1px 2px rgba(0,0,0,0.5);
}
.now-slot {
  margin-top: 4px;
  font-family: var(--f-display);
  font-weight: 600;
  font-size: 16px;
  letter-spacing: 0.4px;
  color: var(--c-text);
  text-shadow: 0 1px 2px rgba(0,0,0,0.5);
}
.now-desc {
  margin-top: 7px;
  font-size: 14.5px;
  color: var(--c-text);
  max-width: 760px;
  line-height: 1.4;
  text-shadow: 0 1px 2px rgba(0,0,0,0.5);
}

.info-right { display: flex; align-items: flex-start; }
.pip {
  position: relative;
  width: 340px;
  height: 192px;
  overflow: hidden;
  background: #000;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.55);
  border: 1px solid rgba(0, 0, 0, 0.35);
  cursor: pointer;
}
.pip video { width: 100%; height: 100%; object-fit: cover; display: block; }
.pip-badge {
  position: absolute; top: 10px; left: 10px;
  background: var(--c-red);
  color: #fff;
  font-family: var(--f-display);
  font-weight: 700;
  font-size: 11px;
  letter-spacing: 1.2px;
  padding: 3px 8px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.6);
  pointer-events: none;
}
.pip-fs {
  position: absolute; top: 8px; right: 8px;
  width: 34px; height: 34px;
  background: rgba(0, 0, 0, 0.6);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  z-index: 2;
  transition: background 120ms ease;
}
.pip-fs:hover { background: rgba(0,0,0,0.85); }

/* ---------- Scrollable grid container — THE blue block ---------- */
.grid-wrap {
  position: relative;
  flex: 1;                         /* fill remaining space — no bottom margin */
  min-height: 0;
  overflow: auto;
  background: var(--c-bg-0);
  border: 1px solid #000;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.5);
  scroll-behavior: smooth;
}
.grid-wrap::-webkit-scrollbar { width: 12px; height: 12px; }
.grid-wrap::-webkit-scrollbar-track { background: #020820; }
.grid-wrap::-webkit-scrollbar-thumb { background: var(--c-cyan); }
.grid-wrap::-webkit-scrollbar-thumb:hover { background: #7cc6ff; }

/* ---------- Time header: SOLID opaque background, high z-index (fixes overlap) ---------- */
.time-header {
  display: flex;
  position: sticky;
  top: 0;
  z-index: 20;
  background: #04102f;
  border-bottom:1px solid #000;
  box-shadow: 0 2px 0 rgba(0,0,0,0.6);
  font-family: var(--f-display);
  font-weight: 600;
}
.time-header .date {
  width: var(--ch-col-w);
  flex-shrink: 0;
  padding: 12px 16px;
  font-size: 14px;
  color: var(--c-text);
  letter-spacing: 0.6px;
  border-right: 2px solid #000;
  background: #04102f;
  /* Pin to top-left corner on both-axis scroll */
  position: sticky;
  left: 0;
  z-index: 21;
}
.time-header .slots {
  display: flex;
  background: #04102f;
}
.time-header .slot {
  width: var(--slot-w);
  flex: 0 0 var(--slot-w);
  padding: 12px 14px;
  font-size: 14px;
  color: var(--c-text);
  border-right: 1px solid var(--c-border);
  background: #04102f;
  letter-spacing: 0.3px;
}

/* ---------- Grid rows ---------- */
.grid {
  display: flex;
  flex-direction: column;
  position: relative;        /* positioning context for .now-line */
}

.row {
  display: flex;
  align-items: stretch;
  border-bottom: 1px solid var(--c-row-border);
  min-height: var(--row-h);
  min-width: 100%;
}
.row:nth-child(odd)  { background: var(--c-row-a); }
.row:nth-child(even) { background: var(--c-row-b); }
.row:hover           { background: var(--c-row-hi); }

.ch-cell {
  width: var(--ch-col-w);
  flex-shrink: 0;
  display: flex; align-items: center; gap: 0;
  padding: 0 14px;
  border-right: 2px solid #000;
  font-family: var(--f-display);
  background: linear-gradient(90deg, #05123b 0%, #071a50 100%);
  cursor: pointer;
  /* Pin to left edge on horizontal scroll so channel identity stays visible */
  position: sticky;
  left: 0;
  z-index: 3;
  transition: background 120ms ease;
}
.ch-cell:hover { background: linear-gradient(90deg, #07195a 0%, #0a256f 100%); }
.ch-num {
  font-weight: 700;
  font-size: 15px;
  color: var(--c-text);
  letter-spacing: 0.3px;
  min-width: 18px;
  text-align: center;
}
.ch-logo {
  width: 34px; height: 34px;
  background: linear-gradient(135deg, rgba(255,255,255,0.14), rgba(255,255,255,0.04));
  border: 1px solid rgba(255,255,255,0.18);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  overflow: hidden;
  font-family: var(--f-display);
  font-size: 11px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.78);
  letter-spacing: 0.5px;
}
.ch-logo img { width: 100%; height: 100%; object-fit: contain; display: block; }
.ch-name {
  font-weight: 600;
  font-size: 13px;
  color: var(--c-text);
  letter-spacing: 0.6px;
  text-transform: uppercase;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
}

.slots-row { display: flex; position: relative; flex: 1; }

.program {
  position: relative;
  padding: 0 14px;
  display: flex; align-items: center; gap: 6px;
  border-right: 1px solid var(--c-border);
  font-family: var(--f-display);
  font-weight: 500;
  font-size: 15px;
  color: var(--c-text);
  white-space: nowrap;
  overflow: hidden;
  cursor: pointer;
  transition: background 120ms ease, color 120ms ease;
  justify-content: flex-start;
}
.program::before {
  content: "<";
  margin-right: 2px;
  color: var(--c-text-mute);
  font-weight: 400;
  opacity: 0;
}
.program.cont::before { opacity: 1; }
.program .title {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
  max-width: calc(100% - 44px);
}
.program .hd-badge {
  display: inline-flex;
  align-items: center;
  padding: 1px 5px;
  border: 1px solid var(--c-hd);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1px;
  color: var(--c-hd);
  opacity: 0.9;
  flex-shrink: 0;
}
.program:hover { background: rgba(90, 185, 255, 0.1); }
.program.selected {
  background: rgba(255, 196, 25, 0.14);
  color: var(--c-yellow);
  box-shadow: inset 0 0 0 2px var(--c-yellow);
}
.program.selected::before,
.program.selected .title { color: var(--c-yellow); }
.program.selected .hd-badge { color: var(--c-yellow); border-color: var(--c-yellow); opacity: 1; }

/* ---------- Now-line: fine red line, top to bottom ---------- */
.now-line {
  position: absolute;
  top: 0; bottom: 0;
  width: 2px;
  background: var(--c-red);
  pointer-events: none;
  z-index: 2;
  left: 0;
}

/* ---------- Entrance animation ---------- */
@keyframes fadeUp { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
.grid-wrap { animation: fadeUp 400ms ease-out both; }

/* ---------- Responsive fallback ---------- */
@media (max-width: 820px) {
  :root { --ch-col-w: 140px; --slot-w: 200px; --row-h: 42px; }
  .info-bar { grid-template-columns: 1fr; }
  .info-right { justify-content: space-between; }
  .pip { width: 220px; height: 124px; }
  .now-title { font-size: 22px; }
  .ch-logo { width: 28px; height: 28px; }
}

/* ---------- Fullscreen video styles ---------- */
#video:fullscreen,
#video:-webkit-full-screen {
  width: 100vw; height: 100vh; object-fit: contain; background: #000;
}

/* ---------- Anti-adblock notice (minimal, non-intrusive) ---------- */
.adblock-notice {
  position: fixed;
  bottom: 18px;
  left: 50%;
  transform: translateX(-50%);
  max-width: 440px;
  padding: 10px 14px;
  background: #04102f;
  color: #ffffff;
  font-family: var(--f-display);
  font-size: 14px;
  letter-spacing: 0.3px;
  border: 1px solid #ffc419;
  box-shadow: 0 6px 20px rgba(0,0,0,0.6);
  cursor: pointer;
  z-index: 200;
  animation: fadeUp 260ms ease-out both;
}
.adblock-notice::after {
  content: "  ×";
  color: var(--c-text-mute);
  font-weight: 700;
}



/* now-line show-start label */
.now-line::before {
  content: attr(data-show-start);
  position: absolute;
  top: -22px;
  left: -28px;
  background: var(--c-red);
  color: #fff;
  padding: 2px 6px;
  border-radius: 3px;
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
  letter-spacing: 0.3px;
  pointer-events: none;
}
.now-line[data-show-start=""]::before { display: none; }

/* === GRID FIX v2 (forced bright blue continuous rows) === */
.slots-row { min-width: 3120px !important; }
.row:nth-child(odd) .slots-row { background: #1c4890 !important; }
.row:nth-child(even) .slots-row { background: #163872 !important; }
.program:not([data-row]) { background: transparent !important; border: none !important; }
.program:not([data-row]) .title { opacity: 0.25 !important; }


/* ===== Category Navigation Bar ===== */
.cat-bar{display:flex;align-items:center;gap:0;background:var(--c-bg-1);border-bottom:1px solid var(--c-yellow);height:var(--row-h);padding:0 18px;flex-shrink:0;position:relative;z-index:50;overflow:visible;}
.cat-btn{font-family:var(--f-display);font-weight:400;font-size:14px;letter-spacing:.5px;color:var(--c-yellow);padding:0 14px;height:100%;display:flex;align-items:center;cursor:pointer;border:none;background:transparent;transition:background 150ms;white-space:nowrap;}
.cat-btn:hover,.cat-btn.active{background:rgba(255,196,25,.15);}
.cat-dropdown{position:absolute;top:100%;left:0;right:0;background:var(--c-bg-0);border:1px solid var(--c-yellow);border-top:none;max-height:420px;overflow-y:auto;z-index:100;display:none;padding:12px;}
.cat-dropdown.open{display:block;}
.cat-grid{display:grid;grid-template-columns:repeat(7,1fr);gap:8px;}
.cat-ch{display:flex;flex-direction:column;align-items:center;gap:4px;padding:8px 4px;cursor:pointer;border-radius:4px;transition:background 150ms;}
.cat-ch:hover{background:rgba(255,196,25,.1);}
.cat-ch-logo{width:48px;height:36px;object-fit:contain;background:rgba(255,255,255,.05);border-radius:2px;}
.cat-ch-name{font-family:var(--f-display);font-size:11px;color:var(--c-text-dim);text-align:center;max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;width:100%;}
.zone-regions{display:grid;grid-template-columns:repeat(7,1fr);gap:8px;margin-bottom:12px;}
.zone-region-btn{font-family:var(--f-display);font-weight:400;font-size:13px;color:var(--c-yellow);padding:10px 8px;text-align:center;cursor:pointer;background:var(--c-bg-1);border:1px solid var(--c-border);transition:background 150ms;border-radius:2px;}
.zone-region-btn:hover,.zone-region-btn.active{background:rgba(255,196,25,.15);}
@media(max-width:768px){.cat-btn{font-size:11px;padding:0 8px;}.cat-grid,.zone-regions{grid-template-columns:repeat(4,1fr);}}
@media(max-width:480px){.cat-grid,.zone-regions{grid-template-columns:repeat(3,1fr);}}

/* Search in category bar */
.cat-search-wrap{position:relative;margin-left:8px;display:flex;align-items:center;height:100%;}
.cat-search{font-family:var(--f-display);font-size:14px;color:var(--c-text);background:var(--c-bg-0);border:1px solid var(--c-yellow);padding:4px 12px;width:220px;height:30px;outline:none;border-radius:2px;}
.cat-search::placeholder{color:var(--c-text-mute);}
.cat-search:focus{border-color:var(--c-yellow-soft);background:var(--c-bg-1);}
.cat-search-results{position:absolute;top:100%;right:0;width:320px;max-height:360px;overflow-y:auto;background:var(--c-bg-0);border:1px solid var(--c-yellow);display:none;z-index:110;}
.cat-search-results.open{display:block;}
.cat-search-item{padding:8px 12px;color:var(--c-text-dim);font-family:var(--f-display);font-size:13px;cursor:pointer;border-bottom:1px solid var(--c-border);}
.cat-search-item:hover{background:rgba(255,196,25,.1);color:var(--c-yellow);}
.cat-search-nf{padding:12px;color:var(--c-red);font-family:var(--f-display);font-size:13px;text-align:center;}

/* === ELIMINATE old controls === */
.info-bar ~ .cat-bar{margin-top:0;}
.info-bar{margin-bottom:0;padding-bottom:6px;}
#gridWrap{margin-top:0;padding-top:0;}
/*REMOVED dup .brand-mark 75px*/







/* === SINGLE-OVERRIDE === */
#brand img,.brand-mark{width:40px!important;height:auto!important;border:0!important;outline:0!important;box-shadow:none!important;}
#brand,#brand *,.brand,.brand *,.info-bar,.info-bar *,.info-left,.info-left *{border:0!important;outline:0!important;box-shadow:none!important;}
#brand{min-width:40px!important;display:inline-block!important;}
.info-bar{grid-template-columns:50px 1fr auto!important;gap:0!important;overflow:visible!important;}
/* DIS-v3-row */
.day-time{white-space:nowrap!important;font-size:12px!important;}
.info-left button{display:none!important;}
/* DIS-v3-kid */
/* DIS-v3-svg */
#catBar{margin-top:0!important;}
.cat-bar{border-bottom:1px solid var(--c-yellow)!important;}
#gridWrap{margin-top:0!important;}
.cat-btn{font-weight:400!important;}
.zone-region-btn{color:#fff!important;border:none!important;background:var(--c-bg-1)!important;}
.zone-region-btn:hover{background:rgba(255,255,255,.12)!important;}
#timeHeader .search-wrap,#timeHeader input[type=text],#timeHeader input[type=search]{display:none!important;}
.time-header .search-wrap,.time-header input{display:none!important;}
hr{display:none!important;}
#igLoadingOverlay,#igLoadingOverlay *{font-family:var(--f-display)!important;font-weight:400!important;letter-spacing:2px!important;}

/* === CH-SPACING === */
.row .ch-num,.row .num{min-width:36px!important;text-align:right!important;padding-right:8px!important;display:inline-block!important;}
.row .ch-logo,.row .logo,.row img{margin:0 8px!important;vertical-align:middle!important;width:32px!important;height:auto!important;}
.row .ch-name,.row .name{padding-left:4px!important;}
.row td:first-child,.row .channel-cell,.row>div:first-child{display:flex!important;align-items:center!important;gap:8px!important;}

/* logo-day-time-fix-v4 -- 28px logo, restored date, no white line */
.info-left{display:flex!important;flex-direction:column!important;align-items:flex-start!important;justify-content:flex-start!important;gap:2px!important;padding:2px 12px 2px 0!important;overflow:visible!important;border:0!important;outline:0!important;background:transparent!important;box-shadow:none!important;}
#brand,.info-left .brand{display:block!important;line-height:0!important;margin:0!important;padding:0!important;overflow:hidden!important;width:28px!important;min-width:28px!important;max-width:28px!important;height:auto!important;border:0!important;outline:0!important;box-shadow:none!important;background:transparent!important;cursor:default!important;}
#brand img,#brand svg,.info-left .brand img,.info-left .brand svg,.info-left .brand-mark{display:block!important;width:28px!important;height:auto!important;border:0!important;outline:0!important;box-shadow:none!important;background:transparent!important;margin:0!important;padding:0!important;}
#uiov-date{display:block!important;position:static!important;white-space:nowrap!important;font-family:var(--f-display)!important;font-weight:600!important;font-size:11px!important;color:var(--c-text)!important;margin:1px 0 0 0!important;padding:0!important;border:0!important;outline:0!important;background:transparent!important;line-height:1.2!important;text-shadow:0 1px 1px rgba(0,0,0,0.6)!important;letter-spacing:0.3px!important;text-align:left!important;}
.info-left::before,.info-left::after,#brand::before,#brand::after,#uiov-date::before,#uiov-date::after{content:none!important;display:none!important;border:0!important;background:transparent!important;}
.info-bar{grid-template-columns:60px 1fr auto!important;border:0!important;background:transparent!important;}
.info-bar *{border-top:0!important;border-bottom:0!important;}

/* logo-day-time-fix-v5 -- 240px col1 grid + 28px SVG hard; date LOCKED */
.info-bar{grid-template-columns:var(--ch-col-w,240px) 1fr auto!important;gap:0!important;overflow:visible!important;border:0!important;background:transparent!important;align-items:start!important;}
.info-left{width:var(--ch-col-w,240px)!important;min-width:var(--ch-col-w,240px)!important;max-width:var(--ch-col-w,240px)!important;box-sizing:border-box!important;padding:4px 8px!important;overflow:visible!important;}
#brand{width:28px!important;height:28px!important;max-width:28px!important;max-height:28px!important;overflow:hidden!important;}
#brand svg,#brand img,#brand>*{width:28px!important;height:28px!important;max-width:28px!important;max-height:28px!important;display:block!important;}
.info-bar > *:not(.info-left){min-width:0!important;box-sizing:border-box!important;padding:4px 8px!important;overflow:hidden!important;position:static!important;}
.info-center,.info-middle,.info-now,.info-program,.now-playing,.current-program,.mini-player,#miniPlayer,#info-now,#programNow,#nowPlaying,#info-center,#info-right,.info-right{position:static!important;margin:0!important;left:auto!important;right:auto!important;transform:none!important;}

/* logo-day-time-fix-v6 -- 28px IMG attribute-selector catch-all */
#brand,#brand>img,#brand img{width:28px!important;height:28px!important;max-width:28px!important;max-height:28px!important;min-width:0!important;min-height:0!important;overflow:hidden!important;}
#brand img[width],#brand img[style],#brand>img[width],#brand>img[style]{width:28px!important;height:28px!important;}

/* logo-fix-v7 -- 72px wide logo, auto height; date LOCKED */
#brand{width:72px!important;height:auto!important;max-width:72px!important;max-height:none!important;min-width:72px!important;overflow:visible!important;}
#brand img,#brand>img,#brand img[width],#brand img[style]{width:72px!important;height:auto!important;max-width:72px!important;max-height:none!important;display:block!important;}

/* programme-info-fix-v8 -- expand centre info; logo+date LOCKED */
#info-now,.info-now,#info-center,.info-center,.info-middle,.now-playing,#nowPlaying,#nowProgram,.program-info{display:flex!important;flex-direction:column!important;justify-content:center!important;align-items:center!important;padding:8px 16px!important;text-align:center!important;}
.now-title,#nowTitle,#info-now .title,.info-now .title,#nowProgram .title{font-size:24px!important;font-weight:600!important;color:#fff!important;line-height:1.2!important;letter-spacing:0.5px!important;font-family:var(--f-display,Barlow Condensed)!important;}
.now-time,#nowTime,.program-time,#programTime{font-size:16px!important;color:var(--c-text-dim,#d6e0f2)!important;font-family:var(--f-body,Barlow,Arial)!important;margin-top:2px!important;}
.now-rating,#nowRating{font-size:14px!important;color:#fff!important;background:rgba(255,255,255,.15)!important;padding:3px 10px!important;border-radius:4px!important;display:inline-block!important;font-weight:600!important;margin-top:4px!important;}

/* row-height-enforcement-v9 */
.row,#grid .row{height:var(--row-h,46px)!important;max-height:var(--row-h,46px)!important;min-height:var(--row-h,46px)!important;overflow:hidden!important;align-items:center!important;}
.row .ch-logo,.row .logo,.row img,#grid .row img{width:32px!important;height:32px!important;max-height:32px!important;object-fit:contain!important;}

/* === grid-directv-v2 LOCKED 2026-05-28 (matches DirecTV reference) === */
/* (1) rows-inside-rows: stretch children to full row height; (4) blue band fills full row width */
.row, #grid .row {
  align-items: stretch !important;
  position: static !important;
  background: #2f5896 !important;
  border-bottom: 1px solid rgba(0,0,0,0.45) !important;
}
.row:nth-child(odd), .row:nth-child(even) { background: #2f5896 !important; }

/* (2)+(3) channel column: dark navy, white text, pinned left */
.ch-cell, .row .ch-cell {
  background: #0a1828 !important;
  align-self: stretch !important;
  position: sticky !important;
  left: 0 !important;
  z-index: 6 !important;
  border-right: 2px solid #000 !important;
}
.ch-num, .row .ch-num, .ch-name, .row .ch-name { color: #ffffff !important; }

/* (1)+(4) slots-row transparent (row blue shows through), full height + width */
.slots-row, .row .slots-row,
.row:nth-child(odd) .slots-row, .row:nth-child(even) .slots-row {
  background: transparent !important;
  align-items: stretch !important;
  align-self: stretch !important;
  min-width: 3120px !important;
}

/* (1) program cells fill full row height; thin vertical separators */
.program, .row .program {
  background: transparent !important;
  align-self: stretch !important;
  height: auto !important;
  border-right: 1px solid rgba(255,255,255,0.16) !important;
}

/* (3) selected: cyan outline + soft-yellow discreet fill */
.program.selected, .row .program.selected {
  box-shadow: inset 0 0 0 2px var(--c-cyan) !important;
  background: rgba(255, 216, 61, 0.22) !important;
  color: #ffffff !important;
}
.program.selected .title { color: #ffffff !important; }

/* (2) time-header channel cell pinned left */
.time-header .date { position: sticky !important; left: 0 !important; z-index: 22 !important; }

/* === grid-directv-v3 LOCKED 2026-05-28 (continuous band + hard column pin) === */
/* Continuous: row band already on .row; ensure slots-row never paints a short strip and grid stretches full content width */
.grid, #grid { min-width: max-content !important; }
.row, #grid .row { width: max-content !important; min-width: 100% !important; background: #2f5896 !important; }
.slots-row, .row .slots-row { background: transparent !important; min-width: 3120px !important; flex: 1 0 auto !important; }
/* Hard column pin: sticky against grid-wrap; tall z-index, opaque dark bg so nothing bleeds under */
.ch-cell, .row .ch-cell { position: sticky !important; left: 0 !important; z-index: 8 !important; background: #0a1828 !important; }
.time-header .date, .time-header #channelsLabel { position: sticky !important; left: 0 !important; z-index: 24 !important; background: #04102f !important; }

/* === grid-directv-v4 LOCKED 2026-05-28 (fix col pin: v9 overflow:hidden on .row was breaking sticky) === */
.row, #grid .row { overflow: visible !important; }
.ch-cell, .row .ch-cell, .row > .ch-cell {
  position: sticky !important;
  left: 0 !important;
  z-index: 10 !important;
  background: #0a1828 !important;
}
.time-header .date, .time-header #channelsLabel {
  position: sticky !important;
  left: 0 !important;
  z-index: 25 !important;
  background: #04102f !important;
}
