/* The official calendar of a competition.
 *
 * One stylesheet for the page and for the PDF: the PDF inlines this file, the
 * page links it. It is a PAPER, so it is black on white whatever theme the
 * site is in, and its measures are in points so the paper and the screen
 * agree.
 */
.cal {
    --cal-line: #000;
    --cal-head: #fff2cc;
    --cal-band: #d9d9d9;
    --cal-bad: #c00000;
    background: #fff;
    color: #000;
    font-family: Calibri, "Helvetica Neue", Helvetica, Arial, sans-serif;
    font-size: 10pt;
    line-height: 1.25;
}

.cal-cover {
    text-align: center;
    break-after: page;
    page-break-after: always;
    padding-top: 6mm;
}

.cal-logos {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-around;
    align-items: center;
    gap: 8mm;
    margin: 0 0 8mm;
}

.cal-logos img {
    max-height: 32mm;
    max-width: 55mm;
    object-fit: contain;
}

.cal-kicker { margin: 0; font-size: 13pt; text-transform: uppercase; }
.cal-name { margin: 0; font-size: 14pt; font-weight: 700; text-transform: uppercase; }
.cal-edition { margin: 1mm 0 7mm; font-size: 13pt; }

.cal-teams {
    width: 70%;
    margin: 0 auto 8mm;
    border-collapse: collapse;
    border: 1.5pt solid var(--cal-line);
}

.cal-teams th {
    padding: 2.5mm 2mm;
    border-bottom: 1.5pt solid var(--cal-line);
    text-transform: uppercase;
}

.cal-teams td {
    padding: 0.6mm 2mm;
    border-top: 0.5pt solid var(--cal-line);
    text-align: center;
}

.cal-phase { margin: 0 0 6mm; }

.cal-table {
    width: 100%;
    border-collapse: collapse;
    border: 1.5pt solid var(--cal-line);
    table-layout: fixed;
}

.cal-table th,
.cal-table td {
    border: 0.5pt solid var(--cal-line);
    padding: 0.5mm 1.5mm;
    text-align: center;
    vertical-align: middle;
    overflow-wrap: anywhere;
}

.cal-phase-name {
    background: var(--cal-band);
    padding: 2.2mm 2mm !important;
    font-size: 11pt;
    text-transform: uppercase;
    border-bottom: 1.5pt solid var(--cal-line) !important;
}

.cal-block { break-inside: avoid; page-break-inside: avoid; }

.cal-head th {
    background: var(--cal-head);
    font-weight: 400;
    text-transform: uppercase;
    border-top: 1.5pt solid var(--cal-line);
    border-bottom: 1.5pt solid var(--cal-line);
}

.cal-col-game { width: 10%; }
.cal-col-day { width: 11%; }
.cal-col-date { width: 13%; }
.cal-col-ground { width: 17%; }
.cal-col-time { width: 10%; }

.cal-number { font-size: 9pt; white-space: nowrap; overflow-wrap: normal; }
.cal-day { font-size: 14pt; }
.cal-day--words { font-size: 10pt; font-weight: 700; text-transform: uppercase; }
.cal-ground { font-weight: 700; font-size: 8.5pt; text-transform: uppercase; }
.cal-team { text-transform: uppercase; }
.cal-bad { color: var(--cal-bad); font-weight: 700; }
.cal-moved { display: block; font-size: 7.5pt; color: var(--cal-bad); }
.cal-rest td { text-transform: uppercase; }
.cal-note { margin: 2mm 0 0; font-style: italic; text-align: center; }

/* On the site the paper sits on a sheet of its own, scrolling sideways on a
   narrow screen rather than squeezing its columns. */
.cal-sheet {
    background: #fff;
    border: 1px solid var(--border-color, #d0d0d0);
    border-radius: 8px;
    padding: 1.25rem;
    overflow-x: auto;
}

.cal-sheet .cal { min-width: 640px; max-width: 190mm; margin: 0 auto; }

@media screen {
    .cal-cover { break-after: auto; page-break-after: auto; margin-bottom: 8mm; }
}
