/* TelosCMS: the table styles every site's editor offers (Plain, Bordered, Compact), used by the editor and by public pages that have one.
   "Standard" has no rules: it is the site's own table look. A style chosen for a table has to win over that look, hence !important.
   Colours are worked out from the text colour, so they suit light and dark sites. */

/* Plain: no row shading. A heading row keeps the site's heading colour. */
table.telos-table-plain tbody tr,
table.telos-table-plain tbody tr > td { background: transparent !important; box-shadow: none !important; }

/* Bordered: a line round every cell. */
table.telos-table-bordered { border-collapse: collapse; }
table.telos-table-bordered tr > th,
table.telos-table-bordered tr > td { border: 1px solid rgba(128, 128, 128, .45) !important; }

/* Compact: closer rows, slightly smaller text. */
table.telos-table-compact tr > th,
table.telos-table-compact tr > td { padding: 2px 8px !important; line-height: 1.35 !important; font-size: .92em !important; }

/* Grade changes tables ("Up to Red | 89, 156"). A page shows one table for each set of changes, so each must give its first column the
   same share of the width, or the car numbers start somewhere different in every table. Headings and long lists of numbers wrap, so a
   table never runs off a phone screen (sites usually stop table text wrapping on small screens). */
table.grades { width: 100% !important; min-width: 0 !important; }
table.grades tr > th,
table.grades tr > td { white-space: normal !important; overflow-wrap: anywhere; vertical-align: top; text-align: left; }
table.grades tr > td:first-child:not([colspan]) { width: 42% !important; }
