/*------------------------------------------------------------------------------
Style for table - with Dark Header and alternate rows
This style is called "Dark_Header" below
------------------------------------------------------------------------------*/

/*------------------------------------------------------------------------------
NOTE ON 'page-break-inside: avoid' ON THE ROWS (used further down)

Keeping a ROW together is safe and is what makes long tables break cleanly:
a row that does not fit in the space left on the page is moved as a whole to
the next page, and the table continues there.

The limit: Apache FOP can only move a row that fits on ONE page. If a single
row ever becomes taller than the page body (267mm in this book), FOP prints it
past the bottom margin and the overflow is CUT OFF.

If that ever happens, let that table split inside its rows by adding this to
the topic, or by removing 'page-break-inside: avoid' from the rules below:

    table.Dark_Header tbody tr { page-break-inside: auto; }

Do NOT put 'break-inside: avoid' on the <table> itself - see the explanation
at the top of 'cp_styles_override_default_in_PDF.css'.
------------------------------------------------------------------------------*/
/* Table Header:
   - bold white text
   - dark background color
*/
table.Dark_Header thead tr th,
table.Dark_Header thead tr td {
  font-weight: bold;
  color: #ffffff;
  background-color: #515254;
}

/* Table:
   - Remove left outer border
   - Remove right outer border
*/
table.Dark_Header {
  border-left: none !important;
  border-right: none !important;
}

/* Table:
   - Remove left border on the first column cell - header
   - Remove left border on the first column cell - cells
*/
table.Dark_Header tr th:first-child,
table.Dark_Header tr td:first-child {
  border-left: none !important;
}

/* Table:
   - Remove right border on the last column cell - header
   - Remove right border on the last column cell - cells
*/
table.Dark_Header tr th:last-child,
table.Dark_Header tr td:last-child {
  border-right: none !important;
}

/* Table:
   - Always show inner column borders - header
   - Always show inner column borders - cells
*/
table.Dark_Header tr th,
table.Dark_Header tr td {
  border-left: 1px solid #cccccc;
  border-right: 1px solid #cccccc;
}

/* Alternating row background (only in 'tbody')
   - first row = no color
   - second = light gray
   - repeat
*/
table.Dark_Header tbody tr:nth-child(odd) {
  name: White_Background;
  background-color: transparent;
  page-break-inside: avoid;
  column-break-inside: avoid;
  frame-break-inside: avoid;
}
table.Dark_Header tbody tr:nth-child(even) {
  name: Grey_Background;
  background-color: #f6f7f9;
  page-break-inside: avoid;
  column-break-inside: avoid;
  frame-break-inside: avoid;
}
table.Dark_Header tbody tr {
  type: Manual;
  name: Blue_Background_to_Highlight;
  background-color: #bce3fe;
  page-break-inside: avoid;
  column-break-inside: avoid;
  frame-break-inside: avoid;
}