/* GridCat Comparison Tables — front end.
   All colours arrive as custom properties on .rt-wrap, so this file is static
   and cacheable no matter how many tables the site has. */

.rt-wrap {
	--rt-head-bg: #201e1d;
	--rt-head-color: #ffffff;
	--rt-side-bg: #e7e7e7;
	--rt-side-color: #201e1d;
	--rt-cell-bg: #ffffff;
	--rt-cell-color: #201e1d;
	--rt-hi-bg: #201e1d;
	--rt-hi-color: #ffffff;
	--rt-hi-transform: none;
	--rt-hi-weight: 600;
	--rt-feature-bg: #ec3013;
	--rt-feature-color: #ffffff;
	--rt-border: #e2e0df;
	--rt-border-width: 1px;
	--rt-header-pad-y: 15px;
	--rt-header-pad-x: 20px;
	--rt-row-pad-y: 15px;
	--rt-row-pad-x: 20px;
	--rt-body-pad-y: var(--rt-row-pad-y);
	--rt-body-pad-x: var(--rt-row-pad-x);
	--rt-mobile-header-bg: var(--rt-head-bg);
	--rt-mobile-header-color: var(--rt-head-color);
	--rt-mobile-card-title-bg: var(--rt-side-bg);
	--rt-mobile-card-title-color: var(--rt-side-color);
	--rt-mobile-label-color: currentColor;
	--rt-mobile-label-opacity: 0.7;
	--rt-mobile-cell-pad-y: var(--rt-row-pad-y);
	--rt-mobile-cell-pad-x: var(--rt-row-pad-x);
	--rt-mobile-card-gap: 18px;

	box-sizing: border-box;
	display: block;
	width: 100%;
	max-width: none;
	min-width: 0;
	align-self: stretch;
	margin: 0 0 1.5rem;
	color: var(--rt-cell-color);
}

.rt-wrap *,
.rt-wrap *::before,
.rt-wrap *::after {
	box-sizing: border-box;
}

/* An Elementor flex container can shrink the Shortcode widget to its
   content. Fill the container by default and let widget-level widths win. */
.elementor-widget-shortcode:where(:has(
	> .elementor-shortcode > .rt-wrap,
	> .elementor-widget-container > .elementor-shortcode > .rt-wrap
)) {
	width: 100%;
}

.rt-scroll {
	width: 100%;
	min-width: 0;
	overflow-x: auto;
	-webkit-overflow-scrolling: touch;
}

.rt-wrap > .rt-differences-toggle {
	width: auto;
	margin: 0;
	vertical-align: middle;
}

.rt-differences-label {
	display: inline-block;
	margin-bottom: 0.75rem;
	margin-inline-start: 0.35em;
	cursor: pointer;
}

.rt-wrap > .rt-no-differences { display: none; }
.rt-differences-toggle:checked ~ .rt-scroll > .rt-table > tbody > .rt-identical-row { display: none; }
.rt-differences-toggle:checked ~ .rt-no-differences { display: block; }

.rt-table {
	width: 100%;
	min-width: 720px;
	border-collapse: collapse;
	border: var(--rt-border-width) solid var(--rt-border);
	background: var(--rt-cell-bg);
	font-size: inherit;
}

/* Page builders often add generic table rules. Keep the matrix bound to the
   full available width of its own shortcode container. */
.rt-wrap .rt-scroll .rt-table {
	width: 100% !important;
	max-width: none !important;
}

.rt-wrap.rt-rounded .rt-table {
	border-collapse: separate;
	border-spacing: 0;
	border-radius: var(--rt-border-radius);
	overflow: hidden;
}

.rt-rounded.rt-no-side-column .rt-table tbody tr > td:first-child {
	border-left-width: 0;
}

.rt-rounded .rt-table tbody tr:last-child,
.rt-rounded .rt-differences-toggle:checked ~ .rt-scroll .rt-table tbody tr:nth-last-child(1 of :not(.rt-identical-row)) {
	--rt-cell-bottom-border-width: 0px;
}

.rt-table thead th {
	padding: var(--rt-header-pad-y) var(--rt-header-pad-x);
	background: var(--rt-column-accent, var(--rt-head-bg));
	color: var(--rt-column-text, var(--rt-head-color));
	font-size: var(--rt-head-size);
	line-height: var(--rt-head-line-height);
	font-weight: var(--rt-head-weight);
	text-transform: var(--rt-head-transform);
	text-align: center;
	vertical-align: bottom;
	border-bottom: var(--rt-header-bottom-border-width) solid var(--rt-border);
	border-right: var(--rt-border-width) solid var(--rt-border);
}

.rt-table tbody td.rt-column-highlight {
	box-shadow: inset 2px 0 var(--rt-column-accent, #275a90), inset -2px 0 var(--rt-column-accent, #275a90);
}

.rt-table thead th:last-child {
	border-right: none;
}

.rt-table thead th.rt-corner {
	--rt-column-accent: var(--rt-corner-bg);
	--rt-column-text: var(--rt-corner-color);
	font-weight: var(--rt-corner-weight, var(--rt-head-weight));
	text-align: left;
	width: 26%;
	border-right: var(--rt-side-border-width) solid var(--rt-side-border);
}

.rt-header-align-left .rt-table thead th { text-align: left; }
.rt-header-align-center .rt-table thead th { text-align: center; }
.rt-header-align-right .rt-table thead th { text-align: right; }

.rt-wrap .rt-header-label {
	display: inline-flex;
	align-items: center;
	gap: 0.4em;
	max-width: 100%;
	vertical-align: middle;
}

.rt-wrap .rt-header-label > span { min-width: 0; }

.rt-wrap .rt-header-icon {
	display: block;
	flex: 0 0 auto;
	width: var(--rt-head-icon-size, 1em);
	height: var(--rt-head-icon-size, 1em);
	object-fit: contain;
}

/* Move the image out of view and show its solid-color drop shadow in its place. */
.rt-wrap .rt-header-icon-tinted { overflow: hidden; }

.rt-wrap .rt-header-icon-tinted > img {
	transform: translateY(-100%);
	filter: drop-shadow(0 var(--rt-head-icon-size, 1em) 0 var(--rt-icon-color));
}

.rt-no-side-column .rt-table thead th {
	width: auto;
}

.rt-table tbody th.rt-side {
	padding: var(--rt-body-pad-y) var(--rt-body-pad-x);
	background: var(--rt-side-bg);
	color: var(--rt-side-color);
	font-size: var(--rt-side-size);
	line-height: var(--rt-side-line-height);
	font-weight: var(--rt-side-weight);
	text-transform: var(--rt-side-transform);
	text-align: left;
	border-bottom: var(--rt-cell-bottom-border-width, var(--rt-side-border-width)) solid var(--rt-side-border);
	border-right: var(--rt-side-border-width) solid var(--rt-side-border);
}

.rt-table tbody th.rt-side + td { border-left-width: 0; }

.rt-table tbody td {
	padding: var(--rt-body-pad-y) var(--rt-body-pad-x);
	text-align: center;
	color: var(--rt-cell-color);
	font-size: var(--rt-cell-size);
	line-height: var(--rt-cell-line-height);
	border-bottom: var(--rt-cell-bottom-border-width, var(--rt-border-width)) solid var(--rt-border);
	border-left: var(--rt-border-width) solid var(--rt-border);
}

.rt-table tbody td.rt-column-cells {
	background-color: var(--rt-column-cell-bg, transparent);
	color: var(--rt-column-cell-color, var(--rt-cell-color));
	font-weight: var(--rt-column-cell-weight, inherit);
}

.rt-align-left .rt-table tbody td { text-align: left; }
.rt-align-center .rt-table tbody td { text-align: center; }
.rt-align-right .rt-table tbody td { text-align: right; }

/* Use !important here because themes and page builders frequently add their
   own table-cell borders after this stylesheet has loaded. */
.rt-hide-horizontal-borders .rt-table th,
.rt-hide-horizontal-borders .rt-table td {
	border-top-width: 0 !important;
	border-bottom-width: 0 !important;
}

.rt-hide-table-border .rt-table {
	border-width: 0 !important;
}

.rt-hide-table-border .rt-table tbody tr {
	border-width: 0 !important;
}

.rt-hide-vertical-borders .rt-table th,
.rt-hide-vertical-borders .rt-table td {
	border-left-width: 0 !important;
	border-right-width: 0 !important;
}

.rt-mobile-label {
	display: none;
	color: var(--rt-mobile-label-color);
	opacity: var(--rt-mobile-label-opacity);
}

.rt-table tbody td.rt-hi {
	background: var(--rt-hi-bg);
	color: var(--rt-hi-color);
}

.rt-table tbody td.rt-hi,
.rt-table tbody td.rt-value-color {
	font-weight: var(--rt-hi-weight);
	text-transform: var(--rt-hi-transform);
}

.rt-table tbody tr.rt-feature th.rt-side,
.rt-table tbody tr.rt-feature td {
	background: var(--rt-feature-bg);
	color: var(--rt-feature-color);
	font-weight: 700;
	border-bottom-color: transparent;
}

.rt-table tbody tr.rt-feature th.rt-side {
	letter-spacing: 0.08em;
	font-weight: var(--rt-side-weight);
}

/* Stacked cards. The label-flip pattern reads well up to about eight
   columns; past that horizontal scroll is the better answer. */
.rt-stack-sm .rt-table,
.rt-stack-md .rt-table,
.rt-stack-lg .rt-table {
	min-width: 0;
}

@media (max-width: 820px) {
	.rt-stack-never:not(.rt-preview-desktop) .rt-table {
		--rt-body-pad-y: var(--rt-mobile-cell-pad-y);
		--rt-body-pad-x: var(--rt-mobile-cell-pad-x);
	}
	.rt-stack-never:not(.rt-preview-desktop) .rt-table thead th {
		background: var(--rt-column-accent, var(--rt-mobile-header-bg));
		color: var(--rt-column-text, var(--rt-mobile-header-color));
		font-size: var(--rt-head-size-mobile, var(--rt-head-size));
	}
	.rt-stack-never:not(.rt-preview-desktop) .rt-table tbody th.rt-side {
		font-size: var(--rt-side-size-mobile);
	}
	.rt-stack-never:not(.rt-preview-desktop) .rt-table tbody td {
		font-size: var(--rt-cell-size-mobile);
	}
}

@media (max-width: 640px) {
	.rt-stack-sm .rt-scroll { overflow: visible; }
	.rt-stack-sm .rt-table {
		--rt-body-pad-y: var(--rt-mobile-cell-pad-y);
		--rt-body-pad-x: var(--rt-mobile-cell-pad-x);
		min-width: 0;
		border-width: 0 !important;
	}
	.rt-stack-sm .rt-table,
	.rt-stack-sm .rt-table tbody,
	.rt-stack-sm .rt-table tr,
	.rt-stack-sm .rt-table td,
	.rt-stack-sm .rt-table th { display: block; width: auto; }
	.rt-stack-sm .rt-table thead {
		position: absolute;
		width: 1px;
		height: 1px;
		overflow: hidden;
		clip-path: inset(50%);
		white-space: nowrap;
	}
	.rt-stack-sm .rt-table tbody tr { margin-bottom: var(--rt-mobile-card-gap); border: var(--rt-border-width) solid var(--rt-border); }
	.rt-rounded.rt-stack-sm .rt-table { border-radius: 0; overflow: visible; }
	.rt-rounded.rt-stack-sm .rt-table tbody tr { border-radius: var(--rt-border-radius); overflow: hidden; }
	.rt-stack-sm .rt-table tbody tr:last-child { margin-bottom: 0; }
	.rt-stack-sm .rt-table tbody th.rt-side {
		background: var(--rt-mobile-card-title-bg);
		color: var(--rt-mobile-card-title-color);
		border-bottom: var(--rt-border-width) solid var(--rt-border);
		font-size: var(--rt-side-size-mobile);
		font-weight: var(--rt-side-weight);
	}
	.rt-stack-sm .rt-table tbody td {
		display: flex;
		justify-content: space-between;
		gap: 16px;
		font-size: var(--rt-cell-size-mobile);
		text-align: right;
		border-left: none;
		border-bottom-width: var(--rt-border-width);
	}
	.rt-stack-sm .rt-table .rt-mobile-label {
		display: block;
		text-align: left;
		font-size: var(--rt-head-size-mobile, var(--rt-cell-size-mobile));
		overflow-wrap: anywhere;
	}
	.rt-stack-sm .rt-table .rt-value { min-width: 0; overflow-wrap: anywhere; }
	.rt-stack-sm .rt-table tbody tr td:last-child { border-bottom: none; }
}

@media (max-width: 820px) {
	.rt-stack-md .rt-scroll { overflow: visible; }
	.rt-stack-md .rt-table {
		--rt-body-pad-y: var(--rt-mobile-cell-pad-y);
		--rt-body-pad-x: var(--rt-mobile-cell-pad-x);
		min-width: 0;
		border-width: 0 !important;
	}
	.rt-stack-md .rt-table,
	.rt-stack-md .rt-table tbody,
	.rt-stack-md .rt-table tr,
	.rt-stack-md .rt-table td,
	.rt-stack-md .rt-table th { display: block; width: auto; }
	.rt-stack-md .rt-table thead {
		position: absolute;
		width: 1px;
		height: 1px;
		overflow: hidden;
		clip-path: inset(50%);
		white-space: nowrap;
	}
	.rt-stack-md .rt-table tbody tr { margin-bottom: var(--rt-mobile-card-gap); border: var(--rt-border-width) solid var(--rt-border); }
	.rt-rounded.rt-stack-md .rt-table { border-radius: 0; overflow: visible; }
	.rt-rounded.rt-stack-md .rt-table tbody tr { border-radius: var(--rt-border-radius); overflow: hidden; }
	.rt-stack-md .rt-table tbody tr:last-child { margin-bottom: 0; }
	.rt-stack-md .rt-table tbody th.rt-side {
		background: var(--rt-mobile-card-title-bg);
		color: var(--rt-mobile-card-title-color);
		border-bottom: var(--rt-border-width) solid var(--rt-border);
		font-size: var(--rt-side-size-mobile);
		font-weight: var(--rt-side-weight);
	}
	.rt-stack-md .rt-table tbody td {
		display: flex;
		justify-content: space-between;
		gap: 16px;
		font-size: var(--rt-cell-size-mobile);
		text-align: right;
		border-left: none;
		border-bottom-width: var(--rt-border-width);
	}
	.rt-stack-md .rt-table .rt-mobile-label {
		display: block;
		text-align: left;
		font-size: var(--rt-head-size-mobile, var(--rt-cell-size-mobile));
		overflow-wrap: anywhere;
	}
	.rt-stack-md .rt-table .rt-value { min-width: 0; overflow-wrap: anywhere; }
	.rt-stack-md .rt-table tbody tr td:last-child { border-bottom: none; }
}

@media (max-width: 1024px) {
	.rt-stack-lg .rt-scroll { overflow: visible; }
	.rt-stack-lg .rt-table {
		--rt-body-pad-y: var(--rt-mobile-cell-pad-y);
		--rt-body-pad-x: var(--rt-mobile-cell-pad-x);
		min-width: 0;
		border-width: 0 !important;
	}
	.rt-stack-lg .rt-table,
	.rt-stack-lg .rt-table tbody,
	.rt-stack-lg .rt-table tr,
	.rt-stack-lg .rt-table td,
	.rt-stack-lg .rt-table th { display: block; width: auto; }
	.rt-stack-lg .rt-table thead {
		position: absolute;
		width: 1px;
		height: 1px;
		overflow: hidden;
		clip-path: inset(50%);
		white-space: nowrap;
	}
	.rt-stack-lg .rt-table tbody tr { margin-bottom: var(--rt-mobile-card-gap); border: var(--rt-border-width) solid var(--rt-border); }
	.rt-rounded.rt-stack-lg .rt-table { border-radius: 0; overflow: visible; }
	.rt-rounded.rt-stack-lg .rt-table tbody tr { border-radius: var(--rt-border-radius); overflow: hidden; }
	.rt-stack-lg .rt-table tbody tr:last-child { margin-bottom: 0; }
	.rt-stack-lg .rt-table tbody th.rt-side {
		background: var(--rt-mobile-card-title-bg);
		color: var(--rt-mobile-card-title-color);
		border-bottom: var(--rt-border-width) solid var(--rt-border);
		font-size: var(--rt-side-size-mobile);
		font-weight: var(--rt-side-weight);
	}
	.rt-stack-lg .rt-table tbody td {
		display: flex;
		justify-content: space-between;
		gap: 16px;
		font-size: var(--rt-cell-size-mobile);
		text-align: right;
		border-left: none;
		border-bottom-width: var(--rt-border-width);
	}
	.rt-stack-lg .rt-table .rt-mobile-label {
		display: block;
		text-align: left;
		font-size: var(--rt-head-size-mobile, var(--rt-cell-size-mobile));
		overflow-wrap: anywhere;
	}
	.rt-stack-lg .rt-table .rt-value { min-width: 0; overflow-wrap: anywhere; }
	.rt-stack-lg .rt-table tbody tr td:last-child { border-bottom: none; }
}

@media print {
	.rt-scroll { overflow: visible; }
	.rt-table { min-width: 0; }
	.rt-table tbody td.rt-hi,
	.rt-table tbody tr.rt-feature th.rt-side,
	.rt-table tbody tr.rt-feature td {
		-webkit-print-color-adjust: exact;
		print-color-adjust: exact;
	}
}
