/* The official roster (core/services/official_roster.py): the FCBS's own
   layout — grey column heads, ruled cells, centred values, the first name to
   the left. A document, so it is drawn black on white on the screen too, in
   either theme, exactly as it prints. */

.ofr-sheet {
  background: #fff;
  color: #000;
  border-radius: 6px;
  padding: 16px;
  overflow: hidden;
}

.ofr {
  width: 100%;
  border-collapse: collapse;
  font-family: Calibri, Carlito, Arial, 'Liberation Sans', Helvetica, sans-serif;
  color: #000;
}

.ofr__headcell { padding: 0 0 14px; }

.ofr__heading {
  display: grid;
  grid-template-columns: minmax(90px, auto) 1fr minmax(90px, auto);
  align-items: center;
  gap: 12px;
}

/* Every logo of the competition (the calendar's), side by side at one height. */
.ofr__logo { height: 80px; display: flex; align-items: center; justify-content: center; gap: 10px; }
.ofr__logo img { height: 100%; max-width: 130px; object-fit: contain; }

/* On a phone the logos go above and below the title, never beside it. */
@media (max-width: 640px) {
  .ofr__heading { grid-template-columns: 1fr; }
  .ofr__logo { height: 56px; flex-wrap: wrap; }
  .ofr__logo:empty { display: none; }
}

.ofr__titles { text-align: center; }
.ofr__title { font-weight: 700; font-size: 15px; }
.ofr__dates { font-size: 12px; margin-top: 4px; }

.ofr__scroll { overflow-x: auto; }

.ofr__team {
  width: 100%;
  min-width: 720px;
  table-layout: fixed;
  border-collapse: collapse;
  border: 2px solid #000;
  font-size: 11px;
  margin: 0 0 4px;
}

.ofr__team th {
  background: #d0d0d0;
  font-weight: 700;
  border: 1px solid #000;
  padding: 3px 4px;
  text-align: center;
}

.ofr__team td {
  border: 1px solid #000;
  padding: 3px 4px;
  text-align: center;
  overflow-wrap: anywhere;
}

.ofr__team td.ofr__left { text-align: left; }
.ofr__team .ofr__num { background: #d0d0d0; font-weight: 700; text-align: right; }
.ofr__none { font-style: italic; }

.ofr__rule {
  border: 0;
  border-top: 3px solid #000;
  margin: 12px 0 12px 22px;
}

/* Paper: A4 portrait. The printer repeats the outer table's head (the
   heading) and each team's column heads on every page. */
.ofr-paper .ofr { font-size: 10px; }
.ofr-paper .ofr__team { font-size: 9.5px; }
.ofr-paper .ofr__scroll { overflow: visible; }
.ofr-paper .ofr__team { min-width: 0; }
.ofr-paper .ofr__team tr { break-inside: avoid; }
/* A team starts on a fresh page rather than leave a row or two behind; one
   longer than a page still runs on, its column heads repeated. */
.ofr-paper .ofr__team { break-inside: avoid; }
.ofr-paper .ofr > thead { display: table-header-group; }
.ofr-paper .ofr__team > thead { display: table-header-group; }
