/*
 * lob-app.css — App-level overrides on top of Material Kit 3 PRO
 */

/* Compact navbar for a data-heavy admin tool */
.navbar {
  padding-top: 0.5rem;
  padding-bottom: 0.5rem;
}

.navbar .nav-link {
  font-size: 0.8125rem;
}

/* Tighter page heading */
.container-fluid.py-4 > .row.mb-3 h5 {
  font-size: 1rem;
  font-weight: 600;
  color: #344767;
}

/* Card content padding consistent with Paper Dashboard feel */
.card .card-body {
  padding: 1.25rem;
}

/* Compact data table rows — fits more rows on screen */
.table > :not(caption) > * > * {
  padding: 0.28rem 0.6rem;
  font-size: 0.8rem;
  line-height: 1.3;
}

.table thead th {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-weight: 600;
}

/* Bootstrap-table search box — light indigo tint so it reads against the white card */
.bootstrap-table .fixed-table-toolbar .search input,
.fixed-table-toolbar .search .form-control {
  background-color: #eef2ff;
  border-color: #c5cae9;
  border-radius: 0.5rem;
  font-size: 0.8125rem;
}

.bootstrap-table .fixed-table-toolbar .search input:focus,
.fixed-table-toolbar .search .form-control:focus {
  background-color: #e8eaf6;
  border-color: #7986cb;
  box-shadow: 0 0 0 2px rgba(121,134,203,0.25);
}

/* Chartist chart labels */
.ct-chart .ct-label {
  font-size: 0.75rem;
}

/* Alert spacing */
.alert {
  margin-bottom: 1rem;
}

/* Form labels */
.form-label {
  font-size: 0.875rem;
  font-weight: 500;
  color: #344767;
}

/* Table row hover for data tables */
.table tbody tr:hover {
  background-color: rgba(94, 114, 228, 0.04);
}

/* ── Admin-only nav items ──────────────────────────────────────────────────
   Leagues, Reports, and System are admin-only. They get a warm red icon and
   a subtly different label color to distinguish them from shared items.    */

.nav-admin-item > a .nav-admin-icon {
  color: #e53935;       /* Material red-600 */
  opacity: 0.75;
}

.nav-admin-item > a {
  color: #5c1a1a !important;  /* deep red-tinted text */
}

/* ── Phone: bottom tab bar (Home, Score, Teams, Players, More) ───────────────
   Below lg the navbar menu is hidden; this bar and the More sheet replace it. */

.lob-tabbar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1030;
  display: flex;
  background: #fff;
  border-top: 1px solid rgba(0, 0, 0, 0.08);
  box-shadow: 0 -2px 12px rgba(0, 0, 0, 0.06);
  padding-bottom: env(safe-area-inset-bottom);
}

.lob-tab {
  flex: 1 1 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  min-height: 56px;
  padding: 6px 2px;
  border: 0;
  background: none;
  color: #7b809a;
  font-size: 0.6875rem;
  font-weight: 500;
  text-decoration: none;
}

.lob-tab .material-symbols-rounded { font-size: 1.375rem; }
.lob-tab.active { color: #344767; font-weight: 700; }
.lob-tab.active .material-symbols-rounded { font-variation-settings: 'FILL' 1; }

@media (max-width: 991.98px) {
  body.lob-has-tabbar { padding-bottom: calc(64px + env(safe-area-inset-bottom)); }
  .lob-who { max-width: 55vw; }
}

.lob-more.offcanvas-bottom {
  height: auto;
  max-height: 80vh;
  border-top-left-radius: 1rem;
  border-top-right-radius: 1rem;
}

/* ── ui.php partials ─────────────────────────────────────────────────────── */

.lob-row .min-width-0, .min-width-0 { min-width: 0; }
.lob-row:last-child { border-bottom: 0 !important; }
.lob-stats > .col + .col { border-left: 1px solid rgba(0, 0, 0, 0.06); }
.lob-empty-icon { font-size: 2.5rem; }

.lob-toasts { right: 0; bottom: 0; z-index: 1090; }
@media (max-width: 991.98px) {
  .lob-toasts { left: 0; bottom: calc(64px + env(safe-area-inset-bottom)); }
}

/* Save/Cancel kept in view at the bottom of long forms (above the phone tab bar) */
.lob-sticky-actions {
  position: sticky;
  bottom: 0;
  z-index: 5;
  background: rgba(255, 255, 255, 0.95);
  border-top: 1px solid rgba(0, 0, 0, 0.06);
  padding: 0.75rem 1rem;
  /* edge to edge: the page container's side padding is half the gutter (0.75rem); -1.25rem made phones scroll sideways */
  margin: 1rem calc(var(--bs-gutter-x, 1.5rem) * -.5) -1.25rem;
}
@media (max-width: 991.98px) {
  .lob-sticky-actions { bottom: calc(64px + env(safe-area-inset-bottom)); }
}

/* Staff sign-in: illustration panel on large screens */
.lob-signin-art {
  background: linear-gradient(195deg, rgba(66, 66, 74, 0.6), rgba(25, 25, 25, 0.6)),
              url('/assets/img/Cover-1.jpeg') center / cover no-repeat;
}

/* Vertical divider between shared and admin-only sections */
.nav-admin-divider {
  display: inline-block;
  width: 1px;
  height: 1.25rem;
  background-color: rgba(0, 0, 0, 0.15);
  margin: 0 0.25rem;
}

/* ── Responsive tables ───────────────────────────────────────────────────────
   page_footer.php wraps every table that has no scrolling wrapper in
   .lob-table-scroll. Wide tables scroll sideways inside their card on a phone
   instead of widening the page. */
.lob-table-scroll,
.table-responsive {
  display: block;
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
/* bootstrap-table's own scroller (its CSS isn't loaded, so set what it needs) */
.bootstrap-table .fixed-table-container,
.bootstrap-table .fixed-table-body {
  max-width: 100%;
  overflow-x: auto;
}
/* A card holding a scrolling table must not grow wider than the screen */
.card, .card-body, .card-header { min-width: 0; }
.row > [class*="col"] { min-width: 0; }

@media (max-width: 991.98px) {
  /* Headings stay on one line (the table scrolls); cells may wrap */
  .table thead th, .table > thead > tr > td { white-space: nowrap; }
  .lob-table-scroll > .table, .table-responsive > .table { margin-bottom: 0; }
  /* Old tables with a fixed width attribute shrink to their content and scroll */
  table[width] { width: auto !important; }
  /* Charts and images never wider than their card */
  .ct-chart, .ct-chart svg, .card img { max-width: 100%; }
}

/* Phase 3: numbers that tick (clocks, scores) keep their width */
.lob-tnum { font-variant-numeric: tabular-nums; }

/* Chartist 0.11 layout rules (its stylesheet isn't loaded): labels sit in flex boxes, so centre
   the x-axis labels under their bars and right-align the y-axis labels */
.ct-label { fill: rgba(0, 0, 0, .55); color: rgba(0, 0, 0, .6); font-size: .7rem; line-height: 1; }
.ct-label.ct-horizontal.ct-end { display: flex; justify-content: flex-start; align-items: flex-start; text-align: left; }
.ct-chart-bar .ct-label.ct-horizontal.ct-end { justify-content: center; text-align: center; }
.ct-label.ct-vertical.ct-start { display: flex; justify-content: flex-end; align-items: flex-end; text-align: right; }
.ct-grid { stroke: rgba(0, 0, 0, .1); stroke-width: 1px; stroke-dasharray: 2px; }

/* A long table in its own scroll box: about a screen tall, headings stay at the top, and the
   sideways scrollbar sits at the bottom of the box instead of the bottom of the list */
.lob-scroll-box { max-height: 70vh; overflow: auto; }
.lob-scroll-box thead th { position: sticky; top: 0; z-index: 1; background: #fff; box-shadow: inset 0 -1px 0 #dee2e6; }
.lob-scroll-box td, .lob-scroll-box th { white-space: normal; }   /* wrap, so the table stays narrow; .text-nowrap still works */
.text-xxs { font-size: .65rem; line-height: 1.1; }

/* Skill level review card: even columns, numbers right-aligned (user, 2026-11-13) */
.lob-review { table-layout: fixed; width: 100%; font-size: .72rem; }
.lob-review th { font-size: .62rem; text-transform: uppercase; letter-spacing: .02em; color: #7b809a; font-weight: 600; padding: .2rem .25rem; border-bottom-width: 1px; }
.lob-review td { padding: .15rem .25rem; color: #344767; border-bottom: 1px solid #f0f2f5; }
.lob-review th:first-child, .lob-review td:first-child { width: 52%; text-align: left; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lob-review th:not(:first-child), .lob-review td:not(:first-child) { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }

/* The staff navbar is coloured by role, so it's always clear which view you're in (user, 2026-11-13):
   admin dark, operator blue, coordinator green. Admin-only menus stay marked, in amber. */
.lob-nav-role { --lob-r1: #42424a; --lob-r2: #191919; background-image: linear-gradient(195deg, var(--lob-r1), var(--lob-r2)) !important; background-color: var(--lob-r2) !important; }
.lob-nav-operator { --lob-r1: #49a3f1; --lob-r2: #1a73e8; }
.lob-nav-coordinator { --lob-r1: #66bb6a; --lob-r2: #43a047; }
.lob-nav-role .navbar-brand, .lob-nav-role > .container-fluid > .lob-who,
.lob-nav-role .navbar-nav > .nav-item > .nav-link, .lob-nav-role .nav-link.text-muted { color: #fff !important; }
.lob-nav-role .navbar-nav > .nav-item > .nav-link .material-symbols-rounded { opacity: .85 !important; color: #fff; }
/* The current section: one even bar under the icon and the word together. A text underline also ran under the
   icon's ligature at a different height (user, 2026-11-18). */
.lob-nav-role .navbar-nav > .nav-item > .nav-link.active { text-decoration: none; position: relative; }
.lob-nav-role .navbar-nav > .nav-item > .nav-link.active::after { content: ""; position: absolute; left: .5rem; right: .5rem; bottom: .1rem;
  height: 2px; border-radius: 2px; background: currentColor; }
.lob-nav-role .nav-admin-item > a { color: #ffe0b2 !important; }
.lob-nav-role .nav-admin-item > a .nav-admin-icon { color: #ffb74d !important; opacity: 1 !important; }
.lob-nav-role .nav-admin-divider { background-color: rgba(255, 255, 255, .35); }

/* Phone tab bar in the role color too (user, 2026-11-14) */
.lob-tabbar.lob-nav-role { border-top: 0; box-shadow: 0 -2px 12px rgba(0, 0, 0, .18); }
.lob-tabbar.lob-nav-role .lob-tab { color: rgba(255, 255, 255, .72); }
.lob-tabbar.lob-nav-role .lob-tab.active { color: #fff; }

/* Top menu fits at medium widths: tighter links, the name moves into the person icon's tooltip,
   and below 1300px the group icons go (user, 2026-11-14) */
@media (min-width: 992px) and (max-width: 1599.98px) {
  .lob-nav-role .navbar-nav > .nav-item { margin-left: 0 !important; margin-right: 0 !important; }
  .lob-nav-role .navbar-nav > .nav-item > .nav-link { padding-left: .45rem !important; padding-right: .45rem !important; }
  .lob-nav-role .lob-who-name { display: none; }
}
@media (min-width: 992px) and (max-width: 1299.98px) {
  .lob-nav-role .navbar-nav > .nav-item > .nav-link > .material-symbols-rounded { display: none; }
  .lob-nav-role .navbar-brand { margin-right: .5rem; }
}
@media (min-width: 992px) and (max-width: 1149.98px) {
  .lob-nav-role .navbar-nav > .nav-item > .nav-link { padding-left: .3rem !important; padding-right: .3rem !important; font-size: .8rem; }
  .lob-nav-role .navbar-nav > .nav-item > .nav-link .arrow { margin-left: .15rem !important; }
  .lob-nav-role .navbar-nav > .nav-item:has(.lob-who-name) { display: none !important; }
}
/* the right-most menus open leftwards so they stay on screen */
@media (min-width: 992px) {
  .lob-nav-role .navbar-nav > .nav-item.dropdown:nth-last-child(-n+2) > .dropdown-menu { left: auto !important; right: 0 !important; }
}

/* ── Density on staff pages (user, 2026-11-14) ─────────────────────────────
   Full-width pages showed little information in a lot of space, most of all the Manage pages.
   Less padding everywhere; on desktop a list card is as wide as its table needs (not the whole
   screen) and forms stop at a readable width. Phones keep full width. */
body.lob-has-tabbar > .container-fluid.py-4 { padding-top: .75rem !important; padding-bottom: .75rem !important; }
body.lob-has-tabbar > .container-fluid.py-4 > .row.mb-3:first-child { margin-bottom: .5rem !important; }
body.lob-has-tabbar .card .card-header { padding: .75rem 1rem 0; }
body.lob-has-tabbar .card .card-body { padding: .75rem 1rem; }
body.lob-has-tabbar .card.mb-3, body.lob-has-tabbar .card.mb-4 { margin-bottom: .75rem !important; }
body.lob-has-tabbar .input-group.input-group-static.mb-3 { margin-bottom: .6rem !important; }
.table thead th { padding: .4rem .6rem !important; }
@media (min-width: 1200px) {
  body.lob-has-tabbar > .container-fluid.py-4 > .card:has(> .table-responsive > table),
  body.lob-has-tabbar > .container-fluid.py-4 > .card:has(> .card-body > .table-responsive > table) {
    width: fit-content; min-width: 720px; max-width: 100%;
  }
  body.lob-has-tabbar > .container-fluid.py-4 > form[method="post"] { max-width: 1200px; }
  /* .lob-fit: a list page's add button, filters, summary and table share the table's width (user, 2026-11-29) */
  body.lob-has-tabbar .lob-fit { width: fit-content; min-width: 720px; max-width: 100%; }
  body.lob-has-tabbar .lob-fit > form[method="get"].row > [class*="col-"] { flex: 0 0 auto; width: auto; }
}
/* Filter selects (GET forms): look like a dropdown, not plain text; label beside it on desktop */
body.lob-has-tabbar form[method="get"] select.form-control {
  border: 1px solid #d2d6da !important; border-radius: .375rem; padding: .3rem 2rem .3rem .6rem !important;
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='none' stroke='%23344767' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M2 5l6 6 6-6'/%3E%3C/svg%3E") no-repeat right .6rem center / 10px 10px;
  appearance: none; -webkit-appearance: none; cursor: pointer;
}
@media (min-width: 768px) {
  body.lob-has-tabbar form[method="get"] .input-group.input-group-static { flex-wrap: nowrap; align-items: center; gap: .5rem; margin-bottom: .5rem !important; }
  body.lob-has-tabbar form[method="get"] .input-group.input-group-static > label { margin: 0 !important; white-space: nowrap; position: static; transform: none; }
  body.lob-has-tabbar form[method="get"] .input-group.input-group-static > select.form-control { width: auto; min-width: 12rem; flex: 0 1 auto; }
}
/* action icons and small buttons inside table rows don't make the row tall */
body.lob-has-tabbar .table td .btn { padding: .15rem .3rem; margin-bottom: 0; line-height: 1.2; }
body.lob-has-tabbar .table td .btn .material-symbols-rounded { font-size: 1.05rem; }
/* phones: text columns keep a usable width (the table scrolls sideways in its box) instead of
   squeezing to a word or two per line and making every row tall */
@media (max-width: 767.98px) {
  body.lob-has-tabbar .table td:not(.text-center):not(.text-end):not(:last-child) { min-width: 9rem; }
  body.lob-has-tabbar > .container-fluid.py-4 { padding-left: .5rem; padding-right: .5rem; }
}

/* Icons (2026-11-18): every icon is Material Symbols Rounded (Material Kit 3). .lob-ico sizes the ones that
   replaced old Themify / Font Awesome 4 / Glyphicon icons to the text around them. */
.lob-ico { font-size: 1.2em; line-height: 1; vertical-align: -.2em; }
.btn .lob-ico { font-size: 1.1rem; vertical-align: middle; }
