/* lm-fix1dec.css v1 (owner 1 Dec 2026): crop fixes on the player site, LIME Original look.
   Audit: claude/header-crop-audit-1-dec.md. CSS only, no script, no server change.
   Remove: delete the <link> tag in public/index.html. */

/* 1. Header, signed-in player, 1201-1519 px wide.
   The buttons on the right (462 px) and the menu (506 px) do not shrink, so "Log out" was cut
   and the profile icon was pushed off screen. In this range the search box becomes the search icon. */
@media (min-width: 1201px) and (max-width: 1519px) {
  header:has(#btnOut) .hdrsearch { display: none !important; }
  header:has(#btnOut) #authArea .sbar {
    display: inline-flex !important; align-items: center; justify-content: center;
    min-width: 36px !important; width: 36px !important; padding: 0 !important;
  }
  header:has(#btnOut) #authArea .sbar span,
  header:has(#btnOut) #authArea .sbar kbd { display: none !important; }
}

/* 2. Live score box. Until the provider's scoreboard reports its own height (lm-scoresize.js sets
   data-lm-h), a box narrower than 900 px shows the one-column board: score, tabs, then the court.
   That needs about 0.58 x its width (measured: 414 px at 722 px), not the 0.30 that lm-scoreframe.js guesses. */
#lmScf { container-type: inline-size; }
@container (min-width: 640px) and (max-width: 767px) {
  #lmScf iframe:not([data-lm-h]) { min-height: 58cqw; }
}
/* measured 1 Dec: the board turns two-column at 768 px and then needs 0.32 x its width */
/* v7: two-column board height = about 103 px + 0.1875 x width (768 -> 247, Banana 784 -> 250, 995 -> 290) */
@container (min-width: 768px) {
  #lmScf iframe:not([data-lm-h]) { min-height: calc(103px + 18.75cqw); max-height: calc(109px + 18.75cqw); }
}

/* 3. Suspended market: keep the runner name readable above the "Suspended" cover (Original look only). */
html:not(.skin-ex):not(.skin-lx) .mkt .row > .rn { position: relative; z-index: 2; }

/* 4. Long names end with "..." where they were cut with no sign. */
.h2-team > span, .pm-row .nm, #lmQuick .q > span {
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%;
}

/* 5. Room at the end of every page so the chat button never sits on the last button of a page. */
@media (min-width: 900px) {
  #app { padding-bottom: 96px !important; }
}

/* 6. Starting Soon card: long team names end with "..." (name wrapped in .lbn by premium8.js v13). */
.lb-row .tm > b > .lbn { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }

/* 7. LIME Exchange look, 1201-1519 px: the search box (223 px) did not shrink, so the profile link ran 63 px off screen. */
@media (min-width: 1201px) and (max-width: 1519px) {
  html.skin-lx #lxTop .lx-srch { min-width: 0; flex: 0 1 140px; }
  html.skin-lx #lxTop .lx-srch input { min-width: 0; width: 100%; }
}

/* 8. doc1: Live TV head - "Source 2" button beside Hide (second video source from the provider docs). */
.lm-tvhead .lm-tvsrc { margin-left: auto; }
.lm-tvhead .lm-tvsrc + .lm-tvx { margin-left: 6px; }

/* 9. lm-scorefit.js: frame laid out 768 px wide (two-column board) and drawn smaller to fit a 600-767 px box. */
#lmScf iframe[data-lm-fit] { min-height: 248px !important; width: 768px !important; max-width: none !important; transform-origin: 0 0; }

/* 10. One-column board (box under 768 px, not fitted): it needs about 151 px + 0.373 x width (368 -> 288, 582 -> 368); stops the empty strip under the court at 480-599 px. */
@container (max-width: 767px) {
  #lmScf iframe:not([data-lm-h]):not([data-lm-fit]) { max-height: calc(151px + 37.3cqw); }
}
