/*
 * JVS CRM — list legibility (S40)
 * ---------------------------------------------------------------------------
 * Reported against sales/clientLead, but the cause is not that page: the theme
 * sets the whole app to 13px in #767676 (assets/css/style.css, `body`), and
 * every list grid simply inherits it. #767676 on white is 4.54:1 contrast — it
 * clears the WCAG AA minimum of 4.5:1 by a hair, and drops under it on the
 * striped rows. Faint text at 13px across 20-30 columns is what reads as
 * "not readable".
 *
 * So this file fixes the lists app-wide rather than one screen. `.adv-table`
 * is the container every DataTables list in the app uses (104 occurrences
 * across 101 views), which makes it the right seam: it catches every grid and
 * nothing else.
 *
 * Type scale — 14px body / 1.5 line-height / #212529 (15.4:1 contrast). 14px is
 * the enterprise data-grid floor (Material and Ant Design both sit there);
 * 13px is below it and this app was under that everywhere.
 *
 * DELIBERATELY NOT CHANGED: the global `body { font-size: 13px }`. That would
 * also move the sidebar, panel headers and dashboard widgets, and this theme
 * carries fixed pixel heights and line-heights from 2013 that are cut to the
 * 13px base. Lists are the reported surface and the safe seam; raising the
 * global base is a separate change that needs a look at every screen.
 *
 * CASCADE NOTE: no !important anywhere, on purpose. These selectors are shaped
 * to out-specify what they have to beat:
 *   style.css      `.adv-table table tr td`  (0,1,3)
 *   bootstrap 4    `.table td`               (0,1,1)  <- loaded from a CDN at
 *                                            the END of some views' bodies
 *   here           `.adv-table table > tbody > tr > td`  (0,1,4)  <- wins
 * Anything added later must keep clearing that bar.
 * ---------------------------------------------------------------------------
 */

/* --- List grids ---------------------------------------------------------- */

.adv-table table {
	font-size: 14px;
	line-height: 1.5;
	color: #212529;
}

.adv-table table > thead > tr > th {
	font-size: 14px;
	line-height: 1.4;
	font-weight: 600;
	color: #1f2937;
	background: #f4f6f8;
	padding: 11px 12px;
	white-space: nowrap;   /* one line per header keeps the grid scannable */
	vertical-align: middle;
}

.adv-table table > tbody > tr > td {
	font-size: 14px;
	line-height: 1.5;
	color: #212529;
	padding: 9px 12px;
	vertical-align: middle;
}

/* Links in a cell (Edit, mailto:, tel:) must not shrink below their row. */
.adv-table table > tbody > tr > td a {
	font-size: inherit;
}

/* Bootstrap 3 sizes .label at 75% of the parent — ~10.5px in a 14px cell.
   These are the status pills, i.e. the first thing anyone scans for. */
.adv-table table > tbody > tr > td .label {
	font-size: 12px;
	line-height: 1.4;
	font-weight: 600;
	padding: 4px 8px;
	display: inline-block;
}

/* Age / Last Activity pills from common/lead_actions.php (12px/16px there). */
.adv-table table > tbody > tr > td .jvs-chip {
	font-size: 13px;
	line-height: 18px;
}

/* --- DataTables chrome --------------------------------------------------- */
/* The length menu, search box, "Showing x to y of z" and paging links sit
   directly against the grid and were inheriting the same 13px. Equal
   specificity to style.css's `.adv-table .dataTables_filter`, so this wins on
   source order — hence the <link> for this file goes LAST in common/head.php. */

.dataTables_wrapper .dataTables_length,
.dataTables_wrapper .dataTables_filter,
.dataTables_wrapper .dataTables_info,
.dataTables_wrapper .dataTables_paginate,
.dataTables_wrapper .dataTables_processing {
	font-size: 14px;
	color: #33383d;
}

.dataTables_wrapper .dataTables_length select,
.dataTables_wrapper .dataTables_filter input {
	font-size: 14px;
	height: 34px;
	padding: 4px 8px;
	color: #212529;
}

.dataTables_wrapper .dataTables_paginate .paginate_button {
	font-size: 14px;
}
