/*
 * Case Results page (page-results.php): the Table / Cards switch and the Table view.
 * The table itself comes from the shared module (_assets/case-results/); it is restyled here
 * through its custom properties, never by editing the module's CSS.
 * Values from the approved design (J296, "Case Results v3 (Table / Cards views)").
 */

.results-wrap {
	max-width: 1240px;
	margin: 0 auto;
}

/* ------------------------------------------------------------ switch band */

.results-views-band {
	background: #f5f5f5;
	padding: 56px 24px 0;
}

/* Cards view: the grey band closes under the switch, the slider sits on white. */
.results-views-band:has([data-cw-crv-show="current"][aria-pressed="true"]) {
	padding-bottom: 56px;
}

.results-views-band .cw-crv-switch {
	--cw-crv-bg: #fff;
	--cw-crv-border: #d0d0d0;
	--cw-crv-color: #252525;
	--cw-crv-active-bg: #252525;
	--cw-crv-active-color: #fff;
}

.results-views-band .cw-crv-switch .cw-crv-switch__btn {
	min-height: 44px;
	padding: 0 22px;
	font-family: 'Open Sans', Helvetica, Arial, sans-serif;
	font-size: 14px;
	font-weight: 700;
	transition: background-color 0.2s, color 0.2s;
}

.results-views-band .cw-crv-switch .cw-crv-switch__btn:hover {
	background: #f0f0f0;
}

.results-views-band .cw-crv-switch .cw-crv-switch__btn[aria-pressed="true"],
.results-views-band .cw-crv-switch .cw-crv-switch__btn[aria-pressed="true"]:hover {
	background: #252525;
	color: #fff;
}

.results-views-band .cw-crv-switch .cw-crv-switch__btn:focus-visible {
	outline: 3px solid #252525;
	outline-offset: 2px;
}

/* Bootstrap's reboot rings every focused button; keep the ring for keyboard focus only. */
.results-views-band .cw-crv-switch .cw-crv-switch__btn:focus:not(:focus-visible),
.page-template-page-results-php .cw-cr .cw-cr__chip:focus:not(:focus-visible),
.page-template-page-results-php .cw-cr .cw-cr__arrow:focus:not(:focus-visible) {
	outline: none;
}

/* ------------------------------------------------------------- table view */

.results-table-section {
	background: #f5f5f5;
	padding: 48px 24px 100px;
	font-family: 'Open Sans', Helvetica, Arial, sans-serif;
	color: #252525;
}

.results-table-section .results-table-eyebrow {
	margin: 0 0 12px;
	font-size: 13px;
	font-weight: 700;
	line-height: 1.65;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: #7A6600;
}

.results-table-section .results-table-title {
	margin: 0 0 20px;
	padding: 0;
	font-family: 'Montserrat', sans-serif;
	font-size: 50px;
	font-weight: 500;
	line-height: 1.1;
	text-transform: uppercase;
	color: #252525;
}

.results-table-section .results-table-intro {
	max-width: 760px;
	margin: 0 0 10px;
	font-size: 16px;
	line-height: 1.65;
	color: #3a3a3a;
}

/* The module's table, to the design. */
.page-template-page-results-php .cw-cr {
	--cw-cr-font-main: 'Open Sans', Helvetica, Arial, sans-serif;
	--cw-cr-font-serif: 'Montserrat', sans-serif;
	--cw-cr-ink: #252525;
	--cw-cr-muted: #5c5c5c;
	--cw-cr-navy: #252525;   /* header row, chips, phone labels */
	--cw-cr-red: #7A6600;    /* amounts: dark gold, yellow fails on white */
	--cw-cr-line: #e2e2e2;
	--cw-cr-smoky: #f7f7f7;
	--cw-cr-focus: #252525;
	--cw-cr-cell-pad: 16px;
}

.page-template-page-results-php .cw-cr .cw-cr__count {
	margin: 0 0 28px;
	font-size: 14px;
	font-weight: 400;
	color: #5c5c5c;
}

.page-template-page-results-php .cw-cr .cw-cr__toolbar {
	margin-bottom: 18px;
}

.page-template-page-results-php .cw-cr .cw-cr__chip {
	padding: 0 20px;
	border: 1.5px solid #252525;
	font-size: 14px;
}

.page-template-page-results-php .cw-cr .cw-cr__chip:hover {
	background: #f0f0f0;
}

.page-template-page-results-php .cw-cr .cw-cr__chip[aria-pressed="true"],
.page-template-page-results-php .cw-cr .cw-cr__chip[aria-pressed="true"]:hover {
	background: #252525;
	color: #fff;
}

.page-template-page-results-php .cw-cr .cw-cr__arrow {
	border-width: 1.5px;
}

.page-template-page-results-php .cw-cr .cw-cr__th {
	font-size: 13px;
	line-height: 1.35;
	letter-spacing: 0.05em;
}

.page-template-page-results-php .cw-cr .cw-cr__td {
	font-size: 15px;
}

.page-template-page-results-php .cw-cr .cw-cr__td--result {
	font-weight: 700;
}

.page-template-page-results-php .cw-cr .cw-cr__tr:hover .cw-cr__td {
	background: #FFF6B3;
}

/*
 * Article column: the module sizes it at 4% of a fixed 1600px table (~67px), too narrow for
 * "ARTICLE" plus padding, so the heading ran into the right edge. Desktop only: on phones the
 * table is transposed.
 */
@media (min-width: 768px) {
	.page-template-page-results-php .cw-cr .cw-cr__th--article-url {
		width: 92px !important; /* beats the module's inline width: "ARTICLE" + the usual 16px each side */
	}

	/* With links in the column: room for "Read More" on one line. */
	.page-template-page-results-php .cw-cr:has(.cw-cr__td--article-url a) .cw-cr__th--article-url {
		width: 120px !important;
	}

	.page-template-page-results-php .cw-cr .cw-cr__td--article-url .cw-cr__link {
		white-space: nowrap;
	}
}

/*
 * "Read More about $3,000,000": the theme's .screen-reader-text only clips, so the hidden
 * text kept its full box and widened the table's scroll area past the last column (empty
 * strip on the right). Full visually-hidden pattern, scoped to the table.
 */
.page-template-page-results-php .cw-cr .screen-reader-text {
	position: absolute !important;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

/* Proxy scrollbars, as in the design: one solid 12px track, no lighter strip around it. */
.page-template-page-results-php .cw-cr .cw-cr__bar {
	background: #ececec;
	border: 0;
	scrollbar-color: #252525 #ececec;
}

.page-template-page-results-php .cw-cr .cw-cr__bar::-webkit-scrollbar {
	height: 12px;
}

.page-template-page-results-php .cw-cr .cw-cr__bar::-webkit-scrollbar-track {
	background: #ececec;
}

.page-template-page-results-php .cw-cr .cw-cr__bar::-webkit-scrollbar-thumb {
	background: #252525;
	border-radius: 6px;
}

.page-template-page-results-php .cw-cr .cw-cr__bar::-webkit-scrollbar-thumb:hover {
	background: #7A6600;
}

.page-template-page-results-php .cw-cr .cw-cr__cols-note {
	margin-top: 14px;
	font-size: 13px;
	color: #5c5c5c;
}

/* Disclaimer: plain text under the table, as designed (no box). */
.page-template-page-results-php .cw-cr .cw-cr__note {
	max-width: none;
	margin: 30px 0 0;
	padding: 0;
	background: none;
	gap: 6px;
}

.page-template-page-results-php .cw-cr .cw-cr__note-extra {
	gap: 6px;
	font-size: 14px;
	line-height: 1.7;
	color: #444;
}

@media (max-width: 640px) {
	.results-views-band {
		padding: 40px 20px 0;
	}

	.results-views-band:has([data-cw-crv-show="current"][aria-pressed="true"]) {
		padding-bottom: 40px;
	}

	.results-table-section {
		padding: 40px 20px 72px;
	}

	.results-table-section .results-table-title {
		font-size: 34px;
	}
}
