/* Desktop / laptop layout v2 (Mohan 23 Nov 2026). Loaded after desktop-app.css.
   Only html.webdesk-app.desk-v2 (set by desk-layout-v2.js in a browser >= 1024px).
   Phone web and the Play app never get these rules. */
/* Phones / small windows: the injected desktop panels never show. */
#dl-side, #dl-right { display: none !important; }

@media (min-width: 1024px) {
  html.desk-v2 { --dl-side: 232px; --dl-top: 64px; --dl-right: 300px; }

  /* ── Page grid: one top bar, channel column on the left ─────────────── */
  html.desk-v2 .pv-page {
    /* Mohan t1093u: logo | channel box | +Post Home News Local Profile | ... | weather | day-night & tools */
    grid-template-columns: var(--dl-side) auto auto minmax(0, 1fr) auto auto !important;
    grid-template-rows: var(--dl-top) auto minmax(0, 1fr) auto !important;
    grid-template-areas:
      "logo ch   nav  gap  wx   tools"
      "side tick tick tick tick tick"
      "side main main main main main"
      "strip strip strip strip strip strip" !important;
  }
  html.desk-v2 .pv-page::before {            /* top bar background + bottom rule */
    content: ""; grid-row: 1; grid-column: 1 / -1; z-index: 0;
    background: var(--dl-topbg, #fff); border-bottom: 1px solid rgba(11, 29, 58, 0.1);
  }
  html.desk-v2 .pv-page > header,
  html.desk-v2 .pv-page > header > .pv-top { display: contents !important; }
  html.desk-v2 .pv-page > header .pv-logo {
    grid-area: logo; align-self: center; justify-self: start; z-index: 1;
    margin-left: 18px; height: 42px !important; max-width: 190px;
  }
  html.desk-v2 .pv-page > header .pv-tools { grid-area: tools; align-self: center; z-index: 1; padding: 0 16px 0 6px; gap: 8px; }
  html.desk-v2 .pv-page > header .pv-loc { display: contents !important; }
  html.desk-v2 .pv-page > header .pv-channel-box {
    grid-area: ch; z-index: 1; align-self: center; margin: 0 0 0 4px !important;
    width: auto !important; min-width: 230px; max-width: 290px; height: 44px; flex: none !important;
  }
  html.desk-v2 .pv-page > header .pv-weather-box {
    grid-area: wx; z-index: 1; align-self: center; margin: 0 !important; height: 44px; width: auto !important; flex: none !important;
  }

  /* ── Nav (the phone tab bar) laid flat in the top bar ───────────────── */
  html.desk-v2 .pv-page > .pv-bottom,
  html.desk-v2 .pv-page > div:has([data-testid="anantapur-nav"]) {
    grid-area: nav !important; z-index: 2 !important; align-self: stretch;
    flex-direction: row !important; background: transparent !important; border: 0 !important;
  }
  html.desk-v2 [data-testid="anantapur-nav"] {
    height: var(--dl-top) !important; padding: 0 0 0 14px !important;
    flex-direction: row !important; align-items: center !important; gap: 4px !important;
    background: transparent !important; border: 0 !important; color: #0b1f4d;
  }
  html.desk-v2 [data-testid="anantapur-nav"] > button {
    min-height: 40px !important; height: 40px; padding: 6px 14px !important; gap: 7px !important;
    border-radius: 999px !important; color: #33415c !important; font-size: 14px !important;
  }
  html.desk-v2 [data-testid="anantapur-nav"] > button > span:first-child { font-size: 17px !important; }
  html.desk-v2 [data-testid="anantapur-nav"] > button:hover { background: rgba(11, 31, 77, 0.07) !important; color: #0b1f4d !important; }
  html.desk-v2 [data-testid="anantapur-nav"] > button[style*="font-weight: 800"],
  html.desk-v2 [data-testid="anantapur-nav"] > button[style*="font-weight:800"] {
    background: rgba(208, 2, 27, 0.1) !important; color: #b00018 !important; box-shadow: none !important;
  }
  html.desk-v2 [data-testid="anantapur-nav"] [style*="position: absolute"] {
    width: auto !important; margin: 0 10px 0 0 !important; flex-direction: row !important; gap: 6px; order: -1;
  }
  html.desk-v2 [data-testid="anantapur-nav"] [style*="position: absolute"] > *:not([data-testid="home-post"]) { display: none !important; }
  html.desk-v2 [data-testid="home-post"] { width: 40px !important; height: 40px !important; font-size: 22px !important; box-shadow: 0 3px 10px rgba(208, 2, 27, 0.35) !important; }

  /* ── Left column: state selector + all channels ─────────────────────── */
  html.desk-v2 #dl-side {
    grid-area: side; min-height: 0; display: flex !important; flex-direction: column;
    background: #07101f; color: #e8edf7; border-right: 1px solid rgba(255, 255, 255, 0.06);
  }
  html.desk-v2 .dl-side-head { padding: 14px 12px 8px; display: flex; flex-direction: column; gap: 8px; flex-shrink: 0; }
  html.desk-v2 .dl-side-kicker { font: 800 11px/1.2 'Barlow Condensed', sans-serif; letter-spacing: 1.2px; color: #FFB800; }
  html.desk-v2 .dl-state, html.desk-v2 .dl-find {
    width: 100%; box-sizing: border-box; height: 38px; border-radius: 10px; padding: 0 10px;
    background: rgba(255, 255, 255, 0.07); border: 1.5px solid rgba(255, 255, 255, 0.14); color: #fff;
    font: 700 13px 'Barlow Condensed', 'Noto Sans Telugu', sans-serif; outline: none;
  }
  html.desk-v2 .dl-state { cursor: pointer; border-color: rgba(255, 184, 0, 0.5); }
  html.desk-v2 .dl-state option { color: #0b1226; }
  html.desk-v2 .dl-find:focus, html.desk-v2 .dl-state:focus { border-color: #FFB800; }
  html.desk-v2 .dl-count { font: 700 12px 'Barlow Condensed', sans-serif; color: rgba(255, 255, 255, 0.6); }
  html.desk-v2 .dl-list { flex: 1; min-height: 0; overflow-y: auto; padding: 2px 8px 16px; scrollbar-width: thin; scrollbar-color: rgba(255, 255, 255, 0.25) transparent; }
  html.desk-v2 .dl-ch {
    display: flex; align-items: center; gap: 9px; padding: 7px 8px; border-radius: 9px;
    color: #dbe3f3; text-decoration: none; transition: background-color 0.12s ease;
  }
  html.desk-v2 .dl-ch:hover { background: rgba(255, 255, 255, 0.08); color: #fff; }
  html.desk-v2 .dl-ch.on { background: linear-gradient(135deg, rgba(208, 2, 27, 0.55), rgba(122, 0, 16, 0.55)); color: #fff; box-shadow: inset 3px 0 0 #FFB800; }
  html.desk-v2 .dl-dot { width: 7px; height: 7px; border-radius: 50%; background: #2bd36b; flex: none; box-shadow: 0 0 0 3px rgba(43, 211, 107, 0.15); }
  html.desk-v2 .dl-names { display: flex; flex-direction: column; min-width: 0; }
  html.desk-v2 .dl-names b { font: 700 13.5px/1.2 'Barlow Condensed', sans-serif; letter-spacing: 0.2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  html.desk-v2 .dl-names small { font: 600 11.5px/1.3 'Noto Sans Telugu', sans-serif; color: rgba(255, 255, 255, 0.6); }

  /* ── Hero bigger, chips under it, slim right column ─────────────────── */
  html.desk-v2 .od-block {
    grid-template-columns: minmax(0, 1fr) var(--dl-right) !important;
    grid-template-areas: "player right" "rows rows" "news news" !important;
    grid-template-rows: auto auto auto !important;
    background: #06101f !important;
  }
  html.desk-v2 .od-block > [data-testid="ondemand-player"] { grid-area: player; min-width: 0; }
  html.desk-v2 .od-block .od-player {
    width: 100% !important; max-width: 100% !important; max-height: none !important;
    aspect-ratio: 16 / 9; justify-self: stretch !important;
  }
  html.desk-v2 .od-block > .od-rows {
    grid-area: rows; max-height: none !important; min-height: 0 !important; height: auto !important;
    padding: 10px 16px 12px !important; gap: 0 !important; border-top: 1px solid rgba(255, 255, 255, 0.06);
  }
  html.desk-v2 .od-row { flex-direction: row !important; align-items: center !important; gap: 12px !important; padding: 6px 0 !important; }
  html.desk-v2 .od-row-label { flex: 0 0 96px !important; text-align: center; }
  html.desk-v2 .od-chips { flex: 1 1 auto !important; width: auto !important; }
  html.desk-v2 .od-block > .od-sec { grid-area: news; }
  html.desk-v2 #dl-right {
    grid-area: right; min-width: 0; min-height: 0; display: flex !important; flex-direction: column; gap: 10px;
    padding: 12px; box-sizing: border-box; background: #0b1a33; border-left: 1px solid rgba(255, 255, 255, 0.06); overflow: hidden;
  }
  html.desk-v2 .dl-brk { flex: 1 1 auto; min-height: 0; overflow: hidden; display: flex; flex-direction: column; }
  html.desk-v2 .dl-brk-h { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
  html.desk-v2 .dl-live { background: #D0021B; color: #fff; font: 900 12px 'Barlow Condensed', sans-serif; letter-spacing: 1px; padding: 3px 8px; border-radius: 6px; animation: dlPulse 1.6s ease-in-out infinite; }
  html.desk-v2 .dl-brk-sub { color: #FFB800; font: 800 13px 'Noto Sans Telugu', sans-serif; }
  html.desk-v2 .dl-brk-list { list-style: none; margin: 0; padding: 0; overflow-y: auto; min-height: 0; counter-reset: b; scrollbar-width: thin; }
  html.desk-v2 .dl-brk-list li {
    counter-increment: b; position: relative; padding: 7px 4px 7px 26px; color: #eef2fb;
    font: 700 13.5px/1.45 'Noto Sans Telugu', sans-serif; border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  }
  html.desk-v2 .dl-brk-list li::before { content: counter(b); position: absolute; left: 2px; top: 8px; width: 18px; height: 18px; border-radius: 50%; background: rgba(255, 184, 0, 0.16); color: #FFB800; font: 800 11px/18px 'Barlow Condensed', sans-serif; text-align: center; }
  html.desk-v2 .dl-quote { flex: none; border-radius: 12px; padding: 10px 12px; background: linear-gradient(135deg, #1a2a52, #2a1440); border: 1px solid rgba(255, 184, 0, 0.35); }
  html.desk-v2 .dl-quote-h { color: #FFB800; font: 800 11px 'Barlow Condensed', 'Noto Sans Telugu', sans-serif; letter-spacing: 1px; }
  html.desk-v2 .dl-quote-te { margin: 6px 0 4px; color: #fff; font: 700 13.5px/1.5 'Noto Sans Telugu', sans-serif; }
  html.desk-v2 .dl-quote-en { margin: 0; color: rgba(255, 255, 255, 0.72); font: italic 500 12px/1.4 system-ui, sans-serif; }
  html.desk-v2 .dl-quote-by { margin-top: 5px; color: #9fb3dc; font: 700 11.5px 'Barlow Condensed', sans-serif; text-align: right; }
  html.desk-v2 .pv-page.dl-dark::before { border-bottom-color: rgba(255, 255, 255, 0.08); }
  html.desk-v2 .pv-page.dl-dark [data-testid="anantapur-nav"] > button { color: #c9d4ea !important; }
  html.desk-v2 .pv-page.dl-dark [data-testid="anantapur-nav"] > button:hover { background: rgba(255, 255, 255, 0.08) !important; color: #fff !important; }
  html.desk-v2 .pv-page.dl-dark [data-testid="anantapur-nav"] > button[style*="font-weight: 800"] { background: rgba(208, 2, 27, 0.3) !important; color: #fff !important; }
  @keyframes dlPulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.65; } }
}
@media (min-width: 1024px) and (max-width: 1279px) {
  html.desk-v2 { --dl-side: 200px; --dl-right: 250px; }
  html.desk-v2 .pv-page > header .pv-weather-box { display: none !important; }
  html.desk-v2 .pv-page > header .pv-channel-box { min-width: 170px; }
  html.desk-v2 [data-testid="anantapur-nav"] > button { padding: 6px 9px !important; font-size: 13px !important; }
}
@media (min-width: 1280px) and (max-width: 1439px) {
  html.desk-v2 { --dl-side: 216px; --dl-right: 270px; }
  html.desk-v2 .pv-page > header .pv-channel-box { min-width: 200px; }
}
@media (min-width: 1920px) {
  html.desk-v2 { --dl-side: 260px; --dl-right: 340px; }
}
@media (prefers-reduced-motion: reduce) { html.desk-v2 .dl-live { animation: none; } }
