/*
 * Case Results: the Cards / Table switch (views.php, case-results-views.js).
 *
 * Neutral defaults. Restyle per site to the design through the custom properties on the
 * group (or the class passed to cw_case_results_views_switch()), not by editing this file,
 * so the module stays identical on every site.
 */

.cw-crv-switch {
	--cw-crv-bg: rgba(255, 255, 255, 0.12);
	--cw-crv-border: rgba(255, 255, 255, 0.35);
	--cw-crv-color: inherit;
	--cw-crv-active-bg: #fff;
	--cw-crv-active-color: #111;
	--cw-crv-radius: 999px;

	display: inline-flex;
	gap: 4px;
	padding: 4px;
	border: 1px solid var(--cw-crv-border);
	border-radius: var(--cw-crv-radius);
	background: var(--cw-crv-bg);
}

.cw-crv-switch[hidden] {
	display: none;
}

.cw-crv-switch .cw-crv-switch__btn {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	min-height: 40px;
	padding: 8px 18px;
	border: 0;
	border-radius: var(--cw-crv-radius);
	background: transparent;
	color: var(--cw-crv-color);
	font: inherit;
	font-weight: 600;
	line-height: 1;
	cursor: pointer;
}

.cw-crv-switch .cw-crv-switch__btn[aria-pressed="true"] {
	background: var(--cw-crv-active-bg);
	color: var(--cw-crv-active-color);
}

.cw-crv-switch .cw-crv-switch__btn:focus-visible {
	outline: 2px solid currentColor;
	outline-offset: 2px;
}

.cw-crv[hidden] {
	display: none !important;
}
