/* Palmares pages. All rules sit under .palmares-page. */
.palmares-page .palmares-table td,
.palmares-page .palmares-table th { vertical-align: top; }
.palmares-page .palmares-toggle { line-height: 1; border: 0; background: none; }
.palmares-page .palmares-iof { font-size: 0.9rem; }
/* IOF: ten columns plus the row actions; narrow side padding keeps the Elite table inside its box */
.palmares-page .palmares-iof td,
.palmares-page .palmares-iof th { padding-left: 0.3rem; padding-right: 0.3rem; }

/* Podium, IOF and selection tables: the same column widths in every table of a kind (fixed layout from the
   colgroup, as the Trasferte tables; the columns without a width share the rest). Phones show the rows as cards instead (.phone-cards). */
@media (min-width: 768px) {
  .palmares-page .palmares-fixed { table-layout: fixed; }
  .palmares-page .palmares-fixed td { overflow-wrap: anywhere; }
  /* narrower than this the IOF columns would be crushed: the table scrolls in its box instead */
  .palmares-page .palmares-iof { min-width: 44rem; }
}
/* Phones: rows as cards, no column widths (they would squeeze the cards) */
@media (max-width: 767.98px) {
  .palmares-page .palmares-fixed colgroup { display: none; }
}
.palmares-page .palmares-col-year { width: 4rem; }
.palmares-page .palmares-col-role { width: 25%; }
.palmares-page .palmares-col-actions { width: 5.5rem; }
/* IOF: each column as wide as its longest word ("CdM/EOC", "Annullata", "Staffetta"); Nome and Luogo share the rest */
.palmares-page .palmares-iof .palmares-col-year { width: 3.1rem; }
.palmares-page .palmares-col-race { width: 4.8rem; }
.palmares-page .palmares-col-long { width: 2.9rem; }
.palmares-page .palmares-col-middle { width: 3.7rem; }
.palmares-page .palmares-col-ko { width: 2rem; }
/* without the KO column, Middle takes its width too: Sprint and Staffetta start where they do in the Elite table */
.palmares-page .palmares-col-middle-wide { width: 5.7rem; }
.palmares-page .palmares-col-sprint-relay { width: 4.6rem; }

/* IOF: one tbody per entry (a line and its JEC result line): striped per entry, a border only below the entry */
.palmares-page .palmares-iof tbody:nth-of-type(odd) > tr { --bs-table-bg: var(--table-stripe-odd); }
.palmares-page .palmares-iof tbody:nth-of-type(even) > tr { --bs-table-bg: var(--table-stripe-even); }
@media (min-width: 768px) {
  .palmares-page .palmares-iof tbody > tr:not(:last-child) > td { border-bottom: none; }
  .palmares-page .palmares-iof tbody:not(:last-of-type) > tr:last-child > td { border-bottom: 1px solid var(--color-border); }
  .palmares-page .palmares-iof .palmares-jec > td { padding-top: 0; }
}
/* Phones: one card per entry (.phone-cards-grouped), a JEC line inside it */
@media (max-width: 767.98px) {
  .palmares-page .palmares-iof .palmares-jec { margin-top: 0.15rem; }
  /* Podium: one medal per line, the names stacked beside their caption */
  .palmares-page .palmares-podium td[data-label] { display: flex; gap: 0.35rem; flex-basis: 100%; }
}

/* Medagliere: cups (titles) and medals as Bootstrap icons, with a thin outline to stand out on the yellow rows */
.palmares-page .medal { font-size: 1.1rem; margin-right: 0.15rem; -webkit-text-stroke: 0.6px rgba(0, 0, 0, 0.55); }
.palmares-page .medal-1 { color: #d4a20b; }
.palmares-page .medal-2 { color: #9aa0a6; }
.palmares-page .medal-3 { color: #c0712f; }

/* Year editor: narrow rank and category columns */
.palmares-page .palmares-year-lines td { vertical-align: top; }
.palmares-page .palmares-rank { width: 4.5rem; }
.palmares-page .palmares-cat { width: 6rem; }
