/* Productside Comparison Table — widget styles.
   Every colour is a CSS variable so Elementor's style controls can override it. */

.ps-compare {
	--ps-green: #00E05C;
	--ps-green-deep: #00A544;
	--ps-green-tint: #ECFDF3;
	--ps-ink: #0A1F12;
	--ps-muted: #8B9691;
	--ps-line: #E7EAE8;
	--ps-surface: #FFFFFF;
	--ps-radius: 14px;
	--ps-cell-pad: 22px;

	/* v2 — horizontal lines */
	--ps-line-w: 1px;
	--ps-line-style: solid;
	--ps-line-strong: #0A1F12;
	--ps-line-strong-w: 2px;
	--ps-head-line: #E7EAE8;
	--ps-head-line-w: 1px;

	/* v2 — alternating row stripe */
	--ps-zebra: #F7F9F8;

	color: var(--ps-ink);
	background: var(--ps-surface);
	border: 1px solid var(--ps-line);
	border-radius: var(--ps-radius);
	padding: 8px 8px 4px;
	box-sizing: border-box;
	-webkit-font-smoothing: antialiased;
}

.ps-compare *,
.ps-compare *::before,
.ps-compare *::after {
	box-sizing: border-box;
}

.ps-compare .ps-sr {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
	border: 0;
}

.ps-compare__scroll {
	overflow-x: auto;
	-webkit-overflow-scrolling: touch;
}

.ps-compare .ps-compare__table {
	width: 100%;
	border-collapse: collapse;
	table-layout: fixed;
	margin: 0;
	background: transparent;
	border: 0;
}

.ps-compare .ps-compare__table td,
.ps-compare .ps-compare__table th {
	border: 0;
}

/* Row and cell backgrounds are variable-driven, so the per-row and per-cell
   colour controls can set them without fighting specificity. */
.ps-compare .ps-compare__table tr {
	border: 0;
	background: var(--ps-row-bg, transparent);
}

.ps-compare .ps-compare__table .ps-cell,
.ps-compare .ps-compare__table .ps-row-label {
	background: var(--ps-cell-bg, transparent);
}

/* Stripe sits on the same variable as the per-row colour, and is deliberately
   weaker in specificity so a per-row colour always wins. */
.ps-compare--zebra tbody tr:nth-child(even) {
	--ps-row-bg: var(--ps-zebra);
}

/* ---- Header ---- */
.ps-compare .ps-th {
	vertical-align: bottom;
	text-align: left;
	padding: calc(var(--ps-cell-pad) * 1.05) var(--ps-cell-pad) calc(var(--ps-cell-pad) * 0.85);
	font-weight: 500;
	font-size: 1.0625rem;
	line-height: 1.3;
	color: var(--ps-muted);
}

.ps-compare .ps-th--us {
	background: var(--ps-green);
	color: var(--ps-ink);
	border-radius: 10px 10px 0 0;
}

.ps-compare .ps-eyebrow {
	display: block;
	font-size: 0.6875rem;
	font-weight: 700;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: var(--ps-ink);
	opacity: 0.85;
	margin-bottom: 10px;
}

.ps-compare .ps-brand {
	display: block;
	font-size: 1.625rem;
	font-weight: 600;
	letter-spacing: -0.02em;
	color: var(--ps-ink);
}

/* ---- Body rows + horizontal lines ---- */
.ps-compare .ps-compare__table tbody tr {
	border-top: var(--ps-line-w) var(--ps-line-style) var(--ps-line);
}

/* First row has no line above it unless the option is switched on. */
.ps-compare .ps-compare__table tbody tr:first-child {
	border-top-width: 0;
}

.ps-compare--line-first .ps-compare__table tbody tr:first-child {
	border-top-width: var(--ps-line-w);
}

.ps-compare--no-lines .ps-compare__table tbody tr {
	border-top-width: 0;
}

/* Optional rule under the header — skips the accent column so it stays
   one continuous slab. */
.ps-compare--head-line .ps-compare__table thead th:not(.ps-th--us) {
	border-bottom: var(--ps-head-line-w) var(--ps-line-style) var(--ps-head-line);
}

/* Per-row divider overrides. Declared last so they beat the rules above. */
.ps-compare .ps-compare__table tbody tr.ps-row--div-none {
	border-top-width: 0;
}

.ps-compare .ps-compare__table tbody tr.ps-row--div-strong {
	border-top: var(--ps-line-strong-w) var(--ps-line-style) var(--ps-line-strong);
}

.ps-compare .ps-row-label {
	text-align: left;
	vertical-align: top;
	padding: var(--ps-cell-pad);
	font-size: 0.875rem;
	font-weight: 600;
	line-height: 1.4;
	color: var(--ps-ink);
}

.ps-compare .ps-cell {
	vertical-align: top;
	padding: var(--ps-cell-pad);
	font-size: 0.9375rem;
	line-height: 1.5;
	color: var(--ps-muted);
}

.ps-compare .ps-cell__text {
	display: block;
}

.ps-compare .ps-cell__sub {
	display: block;
	margin-top: 6px;
	font-size: 0.8125rem;
	line-height: 1.45;
	font-weight: 500;
	color: var(--ps-green-deep);
}

/* Your column reads as one continuous slab down the table. */
.ps-compare .ps-compare__table .ps-cell--us {
	background: var(--ps-cell-bg, var(--ps-green-tint));
	color: var(--ps-ink);
	font-weight: 600;
	box-shadow: inset 2px 0 0 var(--ps-green), inset -2px 0 0 var(--ps-green);
}

.ps-compare tbody tr:last-child .ps-cell--us {
	border-radius: 0 0 10px 10px;
	box-shadow: inset 2px 0 0 var(--ps-green), inset -2px 0 0 var(--ps-green), inset 0 -2px 0 var(--ps-green);
}

/* ---- Markers ---- */
.ps-compare .ps-mark {
	display: inline-block;
	width: 18px;
	height: 18px;
	margin-right: 10px;
	float: left;
	border-radius: 50%;
	position: relative;
	top: 2px;
}

.ps-compare .ps-mark--yes {
	background: var(--ps-green);
	box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.04);
}

.ps-compare .ps-mark--yes::after {
	content: "";
	position: absolute;
	left: 5px;
	top: 4px;
	width: 7px;
	height: 4px;
	border-left: 2px solid #fff;
	border-bottom: 2px solid #fff;
	transform: rotate(-45deg);
}

.ps-compare .ps-mark--no {
	border: 1px solid #D2D8D5;
	background: transparent;
}

.ps-compare .ps-mark--no::before,
.ps-compare .ps-mark--no::after {
	content: "";
	position: absolute;
	left: 4px;
	top: 7.5px;
	width: 8px;
	height: 1.5px;
	background: #B6BEBA;
}

.ps-compare .ps-mark--no::before {
	transform: rotate(45deg);
}

.ps-compare .ps-mark--no::after {
	transform: rotate(-45deg);
}

.ps-compare .ps-compare__foot {
	margin: 14px 12px 10px;
	font-size: 0.75rem;
	line-height: 1.5;
	color: var(--ps-muted);
}

/* ---- Mobile: one card per comparison point ---- */
@media (max-width: 767px) {
	.ps-compare {
		padding: 4px;
	}

	.ps-compare__scroll {
		overflow-x: visible;
	}

	.ps-compare .ps-compare__table {
		display: block;
		min-width: 0 !important;
		table-layout: auto;
	}

	.ps-compare colgroup,
	.ps-compare thead {
		display: none;
	}

	.ps-compare tbody {
		display: block;
	}

	/* On mobile each row is a card, so the divider moves to the bottom. */
	.ps-compare .ps-compare__table tbody tr {
		display: block;
		border-top-width: 0;
		border-bottom: var(--ps-line-w) var(--ps-line-style) var(--ps-line);
		padding: 20px 14px 22px;
	}

	.ps-compare .ps-compare__table tbody tr:last-child {
		border-bottom-width: 0;
	}

	.ps-compare--no-lines .ps-compare__table tbody tr {
		border-bottom-width: 0;
	}

	/* "Divider above this row" still reads as above on mobile. The negative
	   margin tucks it over the previous card's line so they don't double up. */
	.ps-compare .ps-compare__table tbody tr.ps-row--div-strong {
		border-top: var(--ps-line-strong-w) var(--ps-line-style) var(--ps-line-strong);
		margin-top: calc(var(--ps-line-w) * -1);
	}

	.ps-compare .ps-compare__table tbody tr.ps-row--div-none {
		border-top-width: 0;
	}

	.ps-compare .ps-row-label {
		display: block;
		padding: 0 0 12px;
		font-size: 0.6875rem;
		font-weight: 700;
		letter-spacing: 0.09em;
		text-transform: uppercase;
		color: var(--ps-muted);
	}

	.ps-compare .ps-cell {
		display: block;
		padding: 12px 14px;
		border-radius: 10px;
		overflow: hidden;
	}

	.ps-compare .ps-cell::before {
		content: attr(data-label);
		display: block;
		margin-bottom: 4px;
		font-size: 0.6875rem;
		font-weight: 700;
		letter-spacing: 0.05em;
		text-transform: uppercase;
		color: var(--ps-muted);
	}

	.ps-compare .ps-cell--us::before {
		color: var(--ps-green-deep);
	}

	.ps-compare .ps-cell--us {
		margin-bottom: 8px;
		box-shadow: inset 0 0 0 1px var(--ps-green);
		font-size: 1rem;
	}

	.ps-compare tbody tr:last-child .ps-cell--us {
		border-radius: 10px;
		box-shadow: inset 0 0 0 1px var(--ps-green);
	}

	.ps-compare .ps-compare__table .ps-cell--them {
		padding: 8px 14px;
		background: var(--ps-cell-bg, rgba(0, 0, 0, 0.02));
		margin-bottom: 6px;
		font-size: 0.875rem;
	}

	.ps-compare .ps-mark {
		width: 16px;
		height: 16px;
		margin-right: 8px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.ps-compare * {
		transition: none !important;
		animation: none !important;
	}
}
