/* ===== FINAL OVERRIDES (strip spacing + equal widths + header safety) ===== */
header.appbar{ position:relative; z-index:10; }
header.appbar .appbar-inner{
  max-width:1280px !important;
  margin:0 auto !important;
  padding:12px 16px !important;
  display:flex !important; align-items:center !important; justify-content:space-between !important;
}
section.content .tdc-topstrip{
  display:flex !important; align-items:center !important; justify-content:space-between !important;
  gap:12px !important; margin:14px 0 10px !important; padding:0 !important; background:transparent !important; border:0 !important;
  position:relative !important; z-index:2 !important;
}
section.content .tdc-topstrip .tdc-top-left{ display:flex; align-items:center; }
section.content .tdc-topstrip .tdc-top-right{ display:flex; align-items:center; gap:8px; margin-left:auto; }

:root{ --tdc-ctrl-w: 96px; --tdc-ctrl-h: 30px; }
section.content .tdc-topstrip #afToggleTop,
section.content .tdc-topstrip .view-toggle .btn{
  width:var(--tdc-ctrl-w) !important; min-width:var(--tdc-ctrl-w) !important; max-width:var(--tdc-ctrl-w) !important;
  height:var(--tdc-ctrl-h) !important; line-height:var(--tdc-ctrl-h) !important; padding:0 !important;
  display:inline-flex !important; align-items:center !important; justify-content:center !important; white-space:nowrap !important;
}
section.content .afbar{ margin:6px 0 10px !important; }
section.content .tablecard{ background:#131618; border:1px solid rgba(255,255,255,.12); border-radius:10px; padding:10px 10px 12px; }

/* Never render view buttons inside table header */
table .view-toggle{ display:none !important; }

/* === TDC PATCH: layout + 6px corners + adv toggle visibility (2025-12-16) === */
:root{
  --tdc-radius-6: 6px;
  --tdc-blue: rgba(0,180,255,.95);
  --tdc-blue-dim: rgba(0,180,255,.35);
}

/* Force 6px radius across nav + league + toggle */
#navGames, #navProps,
.ls-league-pill, .ls-league-pill.active, .ls-league-pill.is-active,
#toggleAdvanced,
button.btn, .nav-btn {
  border-radius: var(--tdc-radius-6) !important;
}

/* Active blue glow consistency */
#navGames.is-active, #navGames.active,
#navProps.is-active, #navProps.active,
.ls-league-pill.is-active, .ls-league-pill.active,
#toggleAdvanced.is-active, #toggleAdvanced[aria-expanded="true"]{
  border-color: var(--tdc-blue) !important;
  box-shadow: 0 0 0 1px rgba(0,180,255,.30), 0 0 14px rgba(0,180,255,.22) !important;
}

/* --- IMPORTANT: override inline display:none on advancedBar/actionsBar --- */
body[data-adv-open="1"] #advancedBar,
body[data-adv-open="1"] #actionsBar{
  display: block !important;
}
body[data-adv-open="0"] #advancedBar,
body[data-adv-open="0"] #actionsBar{
  display: none !important;
}

/* Keep bar width/centering clean */
#advancedBar, #actionsBar{
  width: min(1280px, calc(100% - 220px)) !important;
  margin: 10px auto 0 !important;
}

/* Spacing: banner -> nav rows -> toggle */
header.appbar{
  padding: 12px 0 10px !important;
}
.topbar{
  margin-top: 10px !important;
}
.topnav{
  padding-top: 10px !important;
  padding-bottom: 10px !important;
  row-gap: 10px !important;
}
#toggleAdvanced{
  margin-top: 10px !important;
}

/* Brand: logo left + bold title + aligned subtitle */
header.appbar .brand{
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 10px !important;
  padding: 8px 14px !important;
}
header.appbar .brand-logo{
  width: 34px !important;
  height: 34px !important;
  display: block !important;
}
header.appbar .brand-text{
  display: flex !important;
  flex-direction: column !important;
  align-items: flex-start !important;
  line-height: 1.05 !important;
}
header.appbar .brand-title{
  font-weight: 800 !important;
  letter-spacing: .08em !important;
}
header.appbar .brand-subtitle{
  margin-top: 3px !important;
  font-size: 12px !important;
  opacity: .78 !important;
}

/* Sort arrows: smaller + no flashing transitions */
th .sort, th .sort-arrow, th .sort-arrows,
.tdc-table th .sort, .tdc-table th .sort-arrow{
  font-size: 10px !important;
  line-height: 1 !important;
  transition: none !important;
  animation: none !important;
}
/* === TDC OVERRIDE: UI POLISH (2025-12-16) === */
:root{
  --tdc-radius: 6px;
}

/* Consistent 6px corners everywhere (kills any 999px pill overrides) */
body button,
body .btn,
body .nav-btn,
body .ls-league-pill,
body #toggleAdvanced,
body #btnTable,
body #btnCards{
  border-radius: var(--tdc-radius) !important;
}

/* More breathing room between rows */
.topbar{ padding-top: 10px !important; }
.topnav{
  padding: 12px 14px !important;
  gap: 10px 10px !important;
  row-gap: 10px !important;
  align-items: center !important;
}

/* Advanced bar: CSS-driven state (JS also forces display to defeat inline styles) */
#advancedBar{
  display: none;
  width: min(1280px, calc(100% - 24px));
  margin: 10px auto 0;
  padding: 10px;
  border-radius: var(--tdc-radius);
}
body[data-adv-open="1"] #advancedBar{ display: flex !important; }
body[data-adv-open="0"] #advancedBar{ display: none !important; }

/* Brand row: logo left of text, bold title, tidy subtitle */
.brand{
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 10px !important;
  padding: 10px 0 6px !important;
}
.brand-logo{
  width: 28px !important;
  height: 28px !important;
  display: block !important;
  object-fit: contain !important;
}
.brand-text{
  display: flex !important;
  flex-direction: column !important;
  align-items: flex-start !important;
}
.brand-title{
  font-weight: 800 !important;
  letter-spacing: .6px !important;
  line-height: 1 !important;
}
.brand-subtitle{
  opacity: .75 !important;
  font-size: 12px !important;
  line-height: 1.1 !important;
  margin-top: 2px !important;
}

/* Smaller sort arrows and NO flashing/transition */
table th .sort,
table th .sort-arrows,
table th .sort-icon{
  font-size: 10px !important;
  line-height: 1 !important;
  transition: none !important;
  animation: none !important;
}
/* === END TDC OVERRIDE: UI POLISH === */

/* === TDC OVERRIDE: 6px corners everywhere (beats 999px !important) === */
:root { --tdc-r: 6px; }

/* match the same specificity as the bad rule so we win by order */
body[data-view="props"] #toggleAdvanced,
body[data-view="props"] #btnTable,
body[data-view="props"] #btnCards,
body[data-view="props"] #navGames,
body[data-view="props"] #navProps,
body[data-view="props"] .ls-league-pill,
body[data-view="games"] #navGames,
body[data-view="games"] #navProps,
body[data-view="games"] .ls-league-pill {
  border-radius: var(--tdc-r) !important;
}

/* keep “Show advanced filters” casing (don’t uppercase it) */
#toggleAdvanced { text-transform: none !important; letter-spacing: normal !important; }

/* Advanced bar default + open state */
#advancedBar { display: none; align-items: center; gap: 10px; }
body[data-adv-open="1"] #advancedBar { display: flex !important; }

/* === Brand: logo-left + bold title + tight alignment === */
header.appbar .brand{
  display:flex !important;
  flex-direction: row !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 10px !important;
  padding: 10px 0 6px !important;
}
header.appbar .brand-logo{
  width: 28px !important;
  height: auto !important;
  display:block !important;
}
header.appbar .brand-text{
  display:flex !important;
  flex-direction: column !important;
  align-items: flex-start !important;
  line-height: 1.1 !important;
}
header.appbar .brand-title{
  font-weight: 800 !important;
  letter-spacing: .14em !important;
}
header.appbar .brand-subtitle{
  opacity: .7 !important;
  font-size: 12px !important;
  margin-top: 2px !important;
}

/* === Sort arrows: small + no flashing transitions === */
table th .sort-arrow,
table th .sort,
table th .sort-indicator,
table th .sort-ind {
  font-size: 10px !important;
  line-height: 1 !important;
  transition: none !important;
}

/* === BRAND: hard-left (beats centered rules) === */
header.appbar { display: flex !important; justify-content: flex-start !important; }
header.appbar .brand{
  width: 100% !important;
  justify-content: flex-start !important;
  margin: 0 !important;
  padding: 10px 18px 6px !important;
}
header.appbar .brand-logo{ margin: 0 !important; }
header.appbar .brand-text{ align-items: flex-start !important; }

/* === SORT ARROWS: smaller + no flash (catch-all) === */
table th { transition: none !important; }
table th * { transition: none !important; }

/* common class names */
table th .sort-arrow,
table th .sort-icon,
table th .sort-indicator,
table th .sort,
table th .arrow,
table th .caret { font-size: 9px !important; line-height: 1 !important; }

/* if they are literally ▲ ▼ characters inside spans/divs */
table th span { line-height: 1 !important; }
table th span:where(:not(.player):not(.matchup)) { font-size: 12px; } /* keeps text sane */

/* if they’re SVG chevrons */
table th svg { width: 10px !important; height: 10px !important; }

/* === ADVANCED FILTERS: make sure controls actually show === */
#actionsBar,
#advancedBar{
  display:flex !important;
  flex-wrap: wrap !important;
  gap: 8px !important;
  align-items: center !important;
  padding: 8px 10px !important;
  min-height: 40px !important;
  visibility: visible !important;
  opacity: 1 !important;
  overflow: visible !important;
}

/* If anything inside is being collapsed/hidden by other CSS, force it on */
#actionsBar * ,
#advancedBar * {
  visibility: visible !important;
  opacity: 1 !important;
}

/* Common control styles (safe even if elements differ) */
#actionsBar button, #advancedBar button,
#actionsBar select, #advancedBar select,
#actionsBar input,  #advancedBar input,
#actionsBar label,  #advancedBar label{
  display: inline-flex !important;
  align-items: center !important;
  height: 30px !important;
  line-height: 1 !important;
}

/* === TABLE TYPOGRAPHY: headers bigger, body smaller === */
table thead th{
  font-size: 13px !important;
  font-weight: 800 !important;
  letter-spacing: .06em !important;
  text-transform: none !important;
  padding-top: 10px !important;
  padding-bottom: 10px !important;
}

table tbody td{
  font-size: 13px !important;
  padding-top: 10px !important;
  padding-bottom: 10px !important;
}

/* === Divider between league row and table: style existing line === */
.scoreboard-line{
  height: 2px !important;
  background: linear-gradient(90deg,
    rgba(0,180,255,.0),
    rgba(255,255,255,.55),
    rgba(0,180,255,.85),
    rgba(255,255,255,.35),
    rgba(0,180,255,.0)
  ) !important;
  border: 0 !important;
  margin: 10px 0 12px !important;
  opacity: 1 !important;
}

/* === Spacing cleanup: banner -> nav -> leagues -> toggle === */
header.appbar{
  padding: 10px 14px 8px !important;
}

.topbar{
  margin-top: 6px !important;
  padding-top: 6px !important;
}

.topnav{
  gap: 10px !important;
}


/* === kill debug boot badges === */
#tdcBootBadge,
#tdc_boot_badge{
  display: none !important;
  visibility: hidden !important;
  pointer-events: none !important;
}

/* === force advanced controls container to actually show === */
#actionsBar .actions-center{
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
}

/* === TDC OVERRIDE PATCH: banner + table + boot badge + sort arrows === */

/* Hide boot/debug badges */
#tdcBootBadge, #tdcBootDiag, [id^="tdcBoot"] { display:none !important; }

/* Banner height + divider gradient */
header.appbar {
  padding: 10px 16px !important;
  position: relative;
}
header.appbar:after{
  content:"";
  position:absolute;
  left:0; right:0; bottom:0;
  height:2px;
  background: linear-gradient(90deg,
    rgba(0,180,255,0),
    rgba(0,180,255,.95),
    rgba(255,255,255,.85),
    rgba(160,170,180,.70),
    rgba(0,180,255,0)
  );
}

/* Brand: bigger logo, thicker title, unbold subtitle */
.brand { justify-content:flex-start !important; gap:10px !important; }
.brand-logo { height: 26px !important; width:auto !important; }
.brand-title { font-size: 16px !important; font-weight: 800 !important; letter-spacing: .5px !important; }
.brand-subtitle { font-weight: 400 !important; opacity: .85 !important; }

/* Tighten spacing between banner -> nav -> league row */
.topbar { padding-top: 8px !important; }
.topnav { gap: 8px !important; }

/* Divider between league row and table (you asked for this) */
.scoreboard-line { margin-top: 10px !important; }

/* Table typography: headers bigger, body a bit smaller */
thead th { font-size: 12px !important; letter-spacing: .6px !important; }
tbody td { font-size: 12px !important; }

/* Sort arrows smaller (covers common markup + pseudo elements) */
th .sort-arrow,
th .sort,
th .sort-indicator,
th .sort-ind,
th .arrow,
th .caret { font-size: 10px !important; transform: none !important; }
th::before, th::after { font-size: 10px !important; }


/* === TDC OVERRIDE PATCH (banner + table + arrows + kill debug badges) === */

/* Hide the debug "BOOT inline ok / html parsed" overlays */
#tdcBootBadge, #tdcBootDiag { display: none !important; }

/* Banner: shorter + left aligned + stronger title, softer subtitle */
header.appbar {
  position: relative !important;
  padding: 10px 16px !important;
  min-height: 64px !important;
}
header.appbar::after{
  content:"";
  position:absolute;
  left:0; right:0; bottom:0;
  height:2px;
  background: linear-gradient(90deg,
    rgba(0,180,255,0),
    rgba(0,180,255,.85),
    rgba(255,255,255,.9),
    rgba(180,180,180,.6),
    rgba(0,180,255,0)
  );
  pointer-events:none;
}
.appbar .brand,
.appbar .brand-wrap {
  justify-content: flex-start !important;
  align-items: center !important;
  gap: 10px !important;
}
.appbar img,
.appbar .logo {
  width: 28px !important;
  height: 28px !important;
}
.appbar .brand-title,
.appbar .title {
  font-size: 18px !important;
  font-weight: 700 !important;
  letter-spacing: .02em !important;
}
.appbar .brand-subtitle,
.appbar .subtitle {
  font-weight: 400 !important;
  opacity: .8 !important;
}

/* Tighten space between banner / nav rows / league row */
.topbar { padding-top: 10px !important; margin-top: 0 !important; }
.topnav { gap: 10px !important; }
.nav-sep { margin: 0 8px !important; }

/* Never let the advanced/actions bar float/fix to the top */
#actionsBar, #advancedBar, .actions-bar {
  position: static !important;
  top: auto !important;
  left: auto !important;
  right: auto !important;
  width: auto !important;
}

/* Smaller sort arrows (and stop the huge stacked look) */
th .sort-arrow,
th .sort,
th .sort-indicator,
th .sort-ind,
th .sort-up,
th .sort-down {
  font-size: 10px !important;
  line-height: 10px !important;
  margin-left: 6px !important;
  opacity: .85 !important;
}

/* Table text sizing: headers slightly bigger, body slightly smaller */
table thead th {
  font-size: 12px !important;
  letter-spacing: .03em !important;
}
table tbody td {
  font-size: 13px !important;
}

/* === TDC OVERRIDE: keep bars in-flow, stop floating at top === */
#actionsBar,
#advancedBar {
  position: static !important;
  top: auto !important;
  right: auto !important;
  bottom: auto !important;
  left: auto !important;
  inset: auto !important;
  z-index: 0 !important;
  transform: none !important;
}

/* Advanced starts CLOSED unless JS opens it */
body:not([data-adv-open="1"]) #advancedBar { display: none !important; }
body[data-adv-open="1"] #advancedBar { display: flex !important; }

/* Kill the “boot” badges even if injected */
#__tdc_boot_badge,
#tdcBootBadge,
#tdcBootDiag,
[id^="tdcBoot"] {
  display: none !important;
}

/* Sorting arrows: smaller + tighter */
th .sort-arrow,
th .sort,
th .sort-indicator,
th .sort-ind,
th .arrow,
th .caret {
  font-size: 10px !important;
  line-height: 10px !important;
  transform: none !important;
}

/* Table sizing: header bigger, body slightly smaller */
thead th {
  font-size: 12px !important;
  letter-spacing: 0.02em !important;
}
tbody td {
  font-size: 13px !important;
}

/* Keep these bars in normal flow (no top-of-screen weirdness) */
#actionsBar,
#advancedBar {
  position: static !important;
  inset: auto !important;
  top: auto !important;
  left: auto !important;
  right: auto !important;
  bottom: auto !important;
  transform: none !important;
  z-index: 0 !important;
}

/* If app.js left inline display:none, our JS sets it explicitly */
body[data-adv-open="0"] #actionsBar,
body[data-adv-open="0"] #advancedBar { display: none !important; }
body[data-adv-open="1"] #actionsBar,
body[data-adv-open="1"] #advancedBar { display: flex !important; }

/* If content is inside actions-center, allow it when open */
body[data-adv-open="1"] #actionsBar .actions-center { display: flex !important; }

/* ===== TDC UI STABILITY PATCH ===== */

/* kill debug badges */
#__tdc_boot_badge, #tdcBootBadge { display:none !important; }

/* consistent 6px corners everywhere */
:root { --tdc-r: 6px; }
.btn, button, .ls-league-pill, .nav-btn, #toggleAdvanced { border-radius: var(--tdc-r) !important; }

/* advanced bar visibility (closed by default, open when body attr flips) */
#advancedBar { display:none; }
body[data-adv-open="1"] #advancedBar { display:flex !important; }

/* layout for advanced pills */
#advancedBar .adv-row { display:flex; gap:10px; align-items:center; flex-wrap:wrap; }

/* sort arrows ~50% (broad selectors to catch svg/icons) */
th svg, th .sort-arrow, th .sort-icon, th .sort-indicator {
  width: 10px !important;
  height: 10px !important;
  font-size: 10px !important;
}
