/* Controls bars under the header band: filters, sorting, search and legend on the squads screen;
   period, night strip, reference label and view switch on the player page. */

.ctrls {
  background: var(--panel);
  border-bottom: 1px solid var(--line);
}
.basis .linkbtn {
  color: var(--ink);
  margin-left: 6px;
}

/* ---------- squads ---------- */
#team .cr {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 0;
  flex-wrap: wrap;
}
#team .cr .sp {
  margin-left: auto;
}
#team .cl {
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink3t);
  margin-right: 2px;
}
#team .cl.gap {
  margin-left: 14px;
}
#team .refchips {
  display: inline-flex;
  gap: 8px;
}
/* squad and athletes views: the reference sits next to the severity filter, not in the top bar */
#team:not(.ov):not(.svl):not(.svm) .globals .refrow {
  display: none;
}
#team .chip {
  font-family: var(--mono);
  font-size: 10.5px;
  background: transparent;
  border: 1px solid var(--line2);
  color: var(--ink2);
  padding: 5px 11px;
  cursor: pointer;
  letter-spacing: 0.04em;
}
#team .chip:hover {
  border-color: var(--hl);
  color: var(--ink);
}
#team .chip.on {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--on-accent);
  font-weight: 500;
}
#team .chip.add {
  border-color: var(--ink2);
  color: var(--ink);
}
#team .chip.add:hover {
  background: var(--panel-hi);
}
#team .chip[hidden] {
  display: none;
}
#team select.pl {
  font-family: var(--mono);
  font-size: 10.5px;
  background: transparent;
  border: 1px solid var(--line2);
  color: var(--ink2);
  padding: 5px 8px;
  outline: none;
  cursor: pointer;
}
#team select.pl option {
  background: var(--panel);
  color: var(--ink);
}
#team .search {
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--line2);
  padding: 0 10px;
  height: 29px;
  margin-left: 14px;
  min-width: 0;
}
#team .search[hidden] {
  display: none;
}
#team .search svg {
  width: 13px;
  height: 13px;
  flex: none;
  color: var(--ink3t);
}
#team .search input {
  background: transparent;
  border: 0;
  outline: none;
  color: var(--ink);
  font-family: var(--sans);
  font-size: 13px;
  width: 220px;
  min-width: 0;
}
#team .search input::placeholder {
  color: var(--ink3t);
}
#team .search:focus-within {
  border-color: var(--hl);
}

/* count, reference label, legend */
#team .mr {
  display: flex;
  align-items: center;
  gap: 20px;
  padding-bottom: 8px;
  flex-wrap: wrap;
}
#team .cnt {
  font-size: 12.5px;
  color: var(--ink2);
}
#team .cnt b {
  color: var(--ink);
  font-weight: 600;
}
#team .basis {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.05em;
  color: var(--ink2);
  border-left: 2px solid var(--accent);
  padding-left: 9px;
  white-space: nowrap;
}
/* night tile colours: same swatches as the tiles on the cards and rows */
#team .lg {
  margin-left: auto;
  display: flex;
  flex-wrap: wrap;
  gap: 6px 14px;
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink3t);
  align-items: center;
}
#team .lg i {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-style: normal;
}
#team .lg .sw {
  width: 12px;
  height: 5px;
  display: inline-block;
}
#team .lg .sw.ns {
  box-shadow: inset 0 0 0 1px var(--line2);
}

/* ---------- player page ---------- */
#player .cr {
  display: flex;
  align-items: center;
  gap: 18px;
  height: 52px;
}
#player .cl {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink3t);
}
#player .cg {
  display: flex;
  align-items: center;
  gap: 8px;
}
#player .seg {
  display: inline-flex;
  border: 1px solid var(--line2);
}
#player .seg button {
  background: transparent;
  border: 0;
  padding: 5px 11px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  color: var(--ink2);
  cursor: pointer;
}
#player .seg button + button {
  border-left: 1px solid var(--line2);
}
#player .seg button[aria-pressed="true"] {
  background: var(--accent);
  color: var(--on-accent);
  font-weight: 500;
}
#player .seg button:not([aria-pressed="true"]):hover {
  color: var(--ink);
  background: var(--panel-hi);
}
#player .seg button[data-period] {
  min-width: 34px;
}
#player .basis {
  font-family: var(--mono);
  font-size: 10.5px;
  color: var(--ink2);
  border-left: 2px solid var(--accent);
  padding-left: 9px;
  white-space: nowrap;
  flex: none;
}

/* night strip: one tile per night (or per week for the whole history) */
#player .strip {
  display: flex;
  gap: 3px;
  flex: 1 1 0;
  min-width: 0;
}
#player .strip.dense {
  gap: 2px;
}
#player .tile {
  flex: 1 1 0;
  max-width: 30px;
  min-width: 0;
  height: 36px;
  border: 1px solid var(--line2);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1px;
  position: relative;
  overflow: hidden;
}
#player .tile .d {
  font-family: var(--mono);
  font-size: 8.5px;
  color: var(--ink3t);
  line-height: 1;
}
#player .tile .n {
  font-family: var(--cond);
  font-weight: 600;
  font-size: 14.5px;
  line-height: 1;
}
#player .strip.dense .tile {
  height: 30px;
}
#player .strip.dense .tile .d {
  display: none;
}
#player .strip.dense .tile .n {
  font-size: 12.5px;
}
#player .tile:hover,
#player .tile.hl {
  background: var(--panel-hi);
  border-color: var(--hl);
}
#player .tile.excluded .n,
#player .tile.no-recording .n,
#player .tile.processing .n {
  color: var(--ink3t);
}
#player .tile.excluded::after {
  content: "×";
  position: absolute;
  top: 1px;
  right: 3px;
  font-family: var(--mono);
  font-size: 9px;
  color: var(--ink2);
  line-height: 1;
}
#player .tile.no-recording {
  border-style: dashed;
  border-color: var(--none);
}
#player .tile.processing::after {
  content: "···";
  position: absolute;
  bottom: 1px;
  font-family: var(--mono);
  font-size: 8px;
  color: var(--ink2);
}
