/*
 * Report sector table — styling for the tlycs_sector_table widget.
 *
 * Lifted verbatim from the Impact Report page CSS (l2e-work/impact-report-2025
 * build.py, the "sector tables" block and its @media 768 rules), with one
 * change: the scope moves from the page class `.ir25` to the widget's own
 * wrapper class. Specificity is unchanged at (0,3,x) and there are no
 * `!important` declarations — there were none before either.
 *
 * This is a WIDGET asset, not a page bundle: both Impact Report editions place
 * the same widget, so they share this file the way every other theme widget
 * shares its CSS. The page-independence rule in CLAUDE.md governs compiled page
 * bundles under assets/<page>/, which this is not.
 *
 * The 768px block keeps the source's own breakpoint rather than Elementor's 767
 * so the table collapses at exactly the width it always has.
 *
 * Enqueued by tlycs_enqueue_elementor_widget_styles() in functions.php, which
 * only loads it on pages whose _elementor_data contains the widget.
 */

.elementor .elementor-widget-tlycs_sector_table .sector-block {
	margin: 0;
}

.elementor .elementor-widget-tlycs_sector_table .sector-header-bar {
	padding: 10px 16px;
	border-radius: 6px 6px 0 0;
}

.elementor .elementor-widget-tlycs_sector_table .sector-header-bar span {
	font-family: 'Plus Jakarta Sans', Arial, sans-serif;
	font-weight: 700;
	font-size: 12px;
	color: #fff;
	text-transform: uppercase;
	letter-spacing: 0.1em;
}

.elementor .elementor-widget-tlycs_sector_table .sector-table {
	width: 100%;
	border-collapse: collapse;
	font-size: 14px;
	border: 1px solid #e8e8e8;
	border-top: none;
	border-radius: 0 0 6px 6px;
	overflow: hidden;
}

.elementor .elementor-widget-tlycs_sector_table .sector-table thead tr {
	background: #f4f4f4;
}

.elementor .elementor-widget-tlycs_sector_table .sector-table thead th {
	font-family: 'Plus Jakarta Sans', Arial, sans-serif;
	font-weight: 700;
	font-size: 11px;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	padding: 10px 14px;
	text-align: left;
	color: #555;
	border-bottom: 1px solid #e8e8e8;
}

.elementor .elementor-widget-tlycs_sector_table .sector-table tbody tr {
	border-bottom: 1px solid #f5f5f5;
}

.elementor .elementor-widget-tlycs_sector_table .sector-table tbody tr:last-child {
	border-bottom: none;
}

.elementor .elementor-widget-tlycs_sector_table .sector-table tbody td {
	padding: 10px 14px;
	vertical-align: top;
}

.elementor .elementor-widget-tlycs_sector_table .sector-table .org-name {
	font-family: 'Instrument Sans', Arial, sans-serif;
	font-weight: 600;
	font-size: 13px;
	color: #231F20;
	width: 22%;
	white-space: nowrap;
}

.elementor .elementor-widget-tlycs_sector_table .sector-table .reach-desc {
	font-family: 'Instrument Sans', Arial, sans-serif;
	font-weight: 400;
	font-size: 13px;
	color: #444;
	line-height: 1.6;
}

.elementor .elementor-widget-tlycs_sector_table .sector-table .reach-desc .fig {
	font-family: 'Plus Jakarta Sans', Arial, sans-serif;
	font-weight: 700;
	color: #E64C3C;
}

/*
 * Narrow screens. The two report editions do NOT do the same thing here, and only
 * one of them stacks — picked per widget by the "Small-screen behaviour" control.
 *
 * Community edition (assets/impact-report-2025-us/impact-report-2025.css, inside
 * its @media (max-width: 768px) block): drops the header row, turns each record
 * into a block and bumps the org name to 14px.
 *
 * Donor edition (assets/impact-report-2025-donors-us/impact-report-2025-donors-us.css):
 * its media queries are 900 and 600, and NEITHER stacks the table. The whole of its
 * narrow-screen table treatment is one declaration in the 600 block —
 * `.org-name { white-space: normal }` — which lets the name wrap inside the 22%
 * column instead of holding one line. Measured on the source at 375: the table is
 * still a table, the name column is 121 wide and names wrap to 3-4 lines.
 *
 * This was wrong until 2026-08-12: the donor variant stacked at 600, which at 375
 * made every organization name a full-width 313px block with its figures beneath.
 * That inflated the four sector tables by 160 / 69 / 46 / 5 and was most of the
 * page's mobile drift.
 */

@media (max-width: 768px) {
	.elementor .elementor-widget-tlycs_sector_table .sector-table:not(.sector-table--wrap-600) thead {
		display: none;
	}

	.elementor .elementor-widget-tlycs_sector_table .sector-table:not(.sector-table--wrap-600) tbody tr {
		display: block;
		padding: 12px 14px;
		border-bottom: 1px solid #eee;
	}

	.elementor .elementor-widget-tlycs_sector_table .sector-table:not(.sector-table--wrap-600) tbody td {
		display: block;
		padding: 4px 0;
	}

	.elementor .elementor-widget-tlycs_sector_table .sector-table:not(.sector-table--wrap-600) .org-name {
		width: auto;
		white-space: normal;
		font-size: 14px;
		margin-bottom: 4px;
	}
}

@media (max-width: 600px) {
	.elementor .elementor-widget-tlycs_sector_table .sector-table--wrap-600 .org-name {
		white-space: normal;
	}
}
