/* Squads screen main area: squad overview, player cards, squad and athletes tables, pager. */

#team .tmain {
  flex: 1;
  min-height: 0;
}
#team .tm-wrap {
  height: 100%;
  padding-top: 12px;
  padding-bottom: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
#team.ov .ctrls,
#team.ov .grid,
#team.ov .rows,
#team.ov .pager,
#team.ov .empty {
  display: none !important;
}
#team:not(.ov) .ovgrid {
  display: none;
}

/* ---------- overview: one card per squad ---------- */
#team .ovgrid {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  align-content: start;
  gap: 14px;
}
#team .tcard {
  all: unset;
  box-sizing: border-box;
  background: var(--panel);
  border: 1px solid var(--line);
  padding: 18px 20px 20px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 10px;
  min-height: 0;
  min-width: 0;
  cursor: pointer;
  transition:
    background 0.14s ease,
    border-color 0.14s ease;
}
#team .tcard:hover {
  background: var(--panel-hi);
  border-color: var(--line2);
}
#team .tcard:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 2px;
}
#team .tcard.off {
  cursor: default;
  background: transparent;
  border-style: dashed;
  border-color: var(--line2);
}
#team .tc-top {
  display: flex;
  align-items: center;
  gap: 12px;
}
#team .tc-top .crest {
  width: 34px;
  height: 34px;
  font-size: 13px;
}
:root[data-theme="light"] #team .tcard .crest {
  color: var(--ink);
  border-color: var(--line2);
}
#team .tc-name {
  font-family: var(--cond);
  font-weight: 600;
  font-size: 26px;
  line-height: 1;
  text-transform: uppercase;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
#team .tc-sub {
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink3t);
  margin-top: 5px;
}
#team .tc-go {
  margin-left: auto;
  font-size: 20px;
  color: var(--ink3t);
}
#team .tcard:hover .tc-go {
  color: var(--ink);
}
#team .tc-figs {
  display: flex;
  gap: clamp(14px, 1.6vw, 26px);
  white-space: nowrap;
}
#team .tc-figs b {
  display: block;
  font-family: var(--cond);
  font-weight: 700;
  font-size: clamp(28px, 2.3vw, 34px);
  line-height: 0.9;
}
#team .tc-figs span {
  display: block;
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink3t);
  margin-top: 6px;
}
#team .tc-body {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
#team .tc-bar {
  display: flex;
  gap: 2px;
  height: 8px;
}
#team .tc-bar i {
  display: block;
  height: 100%;
}
#team .tc-bar i.nd {
  background: repeating-linear-gradient(90deg, var(--nd-dash) 0 3px, transparent 3px 6px);
}
#team .tc-leg {
  font-size: 12px;
  color: var(--ink2);
  display: flex;
  flex-wrap: wrap;
  gap: 4px 12px;
}
#team .tc-leg em {
  font-style: normal;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
#team .tc-leg em::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--c);
}
#team .tc-off {
  font-size: 13px;
  color: var(--ink2);
}

/* ---------- player cards ---------- */
#team .grid {
  display: grid;
  gap: 10px;
  flex: 1;
  min-height: 0;
  align-content: start;
}
#team .grid.off {
  display: none;
}
#team .card {
  background: var(--panel);
  border: 1px solid var(--line);
  position: relative;
  cursor: pointer;
  padding: 7px 11px 7px 15px;
  display: flex;
  flex-direction: column;
  gap: 7px;
  min-height: 0;
  min-width: 0;
  overflow: hidden;
  transition:
    background 0.14s ease,
    border-color 0.14s ease;
}
#team .card::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: var(--spine, var(--tk));
}
#team .card:hover {
  background: var(--panel-hi);
  border-color: var(--line2);
}
#team .num {
  position: absolute;
  top: 6px;
  right: 9px;
  font-family: var(--cond);
  font-weight: 700;
  font-size: 24px;
  line-height: 1;
  color: var(--ink);
  opacity: 0.1;
  letter-spacing: -0.02em;
}
#team .hd {
  display: flex;
  gap: 9px;
  align-items: center;
}
#team .hd > div:last-child {
  min-width: 0;
}
#team .ava {
  flex: none;
  background: var(--ava-bg);
  border: 1px solid var(--line2);
  display: grid;
  place-items: center;
  font-family: var(--cond);
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--ink2);
}
#team .card .ava {
  width: 30px;
  height: 30px;
  font-size: 12px;
}
#team .sur {
  font-family: var(--cond);
  font-weight: 700;
  line-height: 0.95;
  text-transform: uppercase;
  letter-spacing: 0.01em;
}
#team .card .sur {
  font-size: 17px;
  line-height: 1.12;
  padding-top: 2px;
  padding-right: 20px;
  letter-spacing: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
#team .giv {
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink3t);
}
#team .giv b {
  color: var(--ink);
  font-weight: 500;
}
#team .card .giv {
  font-size: 9px;
  margin-top: 3px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
#team .note {
  font-size: 11px;
  color: var(--ink3t);
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* nights strip: recorded / scheduled */
#team .form {
  display: flex;
  align-items: center;
  gap: 7px;
}
#team .form .tiles {
  display: flex;
  gap: 2px;
  width: 84px;
}
#team .card .form .tiles {
  width: 96px;
}
#team .form .tiles.dense {
  gap: 1px;
}
#team .form .t {
  flex: 1 1 0;
  min-width: 0;
  height: 4px;
  background: var(--none);
}
#team .form .t.ns {
  background: transparent;
  box-shadow: inset 0 0 0 1px var(--line);
}
#team .form .lab {
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--ink3t);
}
#team .form .lab b {
  color: var(--ink);
  font-weight: 500;
  font-size: 11px;
}
#team .form.thin .lab b {
  color: var(--ink3t);
}

/* ---------- tables (squad and all athletes) ---------- */
#team .rows {
  display: none;
  flex: 1;
  min-height: 0;
  grid-template-columns: repeat(var(--rc, 2), minmax(0, 1fr));
  gap: 0 28px;
  align-content: start;
}
#team .rows.on {
  display: grid;
}
/* one grid per column of the table, each row a subgrid of it: the player column fits the longest name */
#team .rcol {
  display: grid;
  grid-template-columns: var(--tc);
  column-gap: 10px;
  align-content: start;
  min-width: 0;
}
#team .rh,
#team .rw {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: subgrid;
  align-items: center;
  padding: 0 14px;
}
#team .rw .pn {
  padding-right: 6px;
}
#team .rh {
  height: 30px;
  font-family: var(--mono);
  font-size: 8.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink3t);
  border-bottom: 1px solid var(--line2);
}
#team .rh > * {
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
#team .rh .sorth {
  all: unset;
  box-sizing: border-box;
  grid-column: span 2;
  cursor: pointer;
  display: inline-flex;
  gap: 6px;
  align-items: center;
  font-family: var(--mono);
  font-size: 8.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink2);
  height: 100%;
}
#team .rh .sorth:hover,
#team .rh .sorth.on,
#team .rh .sorth.on i {
  color: var(--ink);
}
#team .rh .sorth:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: -2px;
}
#team .rh .sorth i {
  font-style: normal;
  font-size: 10px;
  letter-spacing: 0;
  color: var(--ink3t);
}
#team .rw {
  height: var(--rh, 44px);
  border-bottom: 1px solid var(--line);
  cursor: pointer;
  position: relative;
}
#team .rw::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: var(--spine, transparent);
}
#team .rw:hover {
  background: var(--panel);
}
#team .rw > div {
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}
#team .rw .n {
  font-family: var(--cond);
  font-weight: 700;
  font-size: 17px;
  color: var(--ink3t);
}
#team .rw .ava {
  width: 26px;
  height: 26px;
  font-size: 10px;
}
#team .rw .sur {
  font-size: 16px;
}
#team .rw .giv {
  display: inline;
  margin-left: 8px;
  font-size: 9px;
}
#team .rw .sq {
  font-size: 12px;
  color: var(--ink2);
}
#team .rw .dev {
  font-family: var(--mono);
  font-size: 10.5px;
  color: var(--ink2);
  letter-spacing: 0.02em;
}
#team .rw .nn {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--ink2);
}
#team .rw .nn b {
  color: var(--ink);
  font-weight: 500;
}
#team .rw .nn.low b {
  color: var(--concern);
}
#team .rw .chev {
  font-family: var(--mono);
  color: var(--ink3t);
}
#team .rw .ed {
  all: unset;
  box-sizing: border-box;
  cursor: pointer;
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  border: 1px solid transparent;
  color: var(--ink3t);
}
#team .rw .ed svg {
  width: 13px;
  height: 13px;
}
#team .rw .ed:hover {
  border-color: var(--line2);
  color: var(--ink);
  background: var(--panel-hi);
}
#team .rw .ed:focus-visible {
  outline: 2px solid var(--accent);
}

/* ---------- empty state and pager ---------- */
#team .empty {
  display: none;
  padding: 40px 0;
  text-align: center;
}
#team .empty.on {
  display: block;
}
#team .empty h3 {
  font-family: var(--cond);
  font-weight: 600;
  font-size: 30px;
  text-transform: uppercase;
  margin: 0 0 14px;
  letter-spacing: 0.01em;
}
#team .empty button {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  background: var(--accent);
  color: var(--on-accent);
  border: 0;
  padding: 10px 18px;
  cursor: pointer;
  font-weight: 500;
}
#team .pager {
  flex: none;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--ink2);
}
#team .pager[hidden] {
  display: none;
}
#team .pager button {
  width: 30px;
  height: 30px;
  border: 1px solid var(--line2);
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  font-size: 16px;
  line-height: 1;
}
#team .pager button:hover {
  background: var(--panel-hi);
}
#team .pager button:disabled {
  opacity: 0.3;
  cursor: default;
}
