/**
 * Appointments comparison table.
 */

.bwp-cmp {
	--bwp-cmp-line: #6f7882;
	--bwp-cmp-text: var(--wp--preset--color--text, #2a3139);
	--bwp-cmp-subtle: var(--wp--preset--color--subtle, #8b939c);

	/* Teal (same as product demo tones): positive highlight, not brand/error red. */
	--bwp-cmp-accent: #0e7c86;
	--bwp-cmp-ours: color-mix(in srgb, var(--bwp-cmp-accent) 12%, #fff);
	--bwp-cmp-ours-line: color-mix(in srgb, var(--bwp-cmp-accent) 65%, #5b6570);
	--bwp-cmp-surface: var(--wp--custom--color--surface, #fff);
	--bwp-cmp-fade: rgba(42, 49, 57, 0.4);

	max-width: 100%;
	min-width: 0;
	box-sizing: border-box;
}

.bwp-cmp__frame {
	--bwp-cmp-sticky-w: 0;

	position: relative;
	max-width: 100%;
	min-width: 0;
}

.bwp-cmp__scroll {
	position: relative;
	z-index: 0;
	max-width: 100%;
	min-width: 0;
	overflow-x: auto;
	scrollbar-width: thin;
	touch-action: pan-x;
	background: var(--bwp-cmp-surface);
}

.bwp-cmp__scroll:focus-visible {
	outline: 2px solid var(--bwp-cmp-accent);
	outline-offset: 2px;
}

.bwp-cmp__fade {
	position: absolute;
	top: 0;
	bottom: 0;
	width: 3px;
	pointer-events: none;
	opacity: 0;
	z-index: 6;
	-webkit-mask-image: linear-gradient(to bottom, transparent, #000 1rem, #000 calc(100% - 1rem), transparent);
	mask-image: linear-gradient(to bottom, transparent, #000 1rem, #000 calc(100% - 1rem), transparent);
}

.bwp-cmp__fade--left {
	left: var(--bwp-cmp-sticky-w);
	background: linear-gradient(to right, var(--bwp-cmp-fade), transparent);
}

.bwp-cmp__fade--right {
	right: 0;
	background: linear-gradient(to left, var(--bwp-cmp-fade), transparent);
}

.bwp-cmp__frame.is-left .bwp-cmp__fade--left,
.bwp-cmp__frame.is-right .bwp-cmp__fade--right {
	opacity: 1;
}

.bwp-cmp__more {
	margin: 0.85rem 0 0;
	font-size: 0.9375rem;
	font-weight: 500;
}

.bwp-cmp__more a {
	color: var(--bwp-cmp-accent);
	text-decoration: none;
}

.bwp-cmp__more a:hover {
	text-decoration: underline;
}

.bwp-cmp__table {
	width: 100%;
	min-width: 0;
	border-collapse: separate;
	border-spacing: 0;
	table-layout: fixed;
	font-size: 0.875rem;
	line-height: 1.4;
	color: var(--bwp-cmp-text);
}

.bwp-cmp--multi .bwp-cmp__product-col,
.bwp-cmp--multi .bwp-cmp__cell {
	width: 12%;
	min-width: 0;
	padding-inline: 0.35rem;
}

.bwp-cmp--pair .bwp-cmp__table {
	table-layout: fixed;
	width: 100%;
}

.bwp-cmp__table th,
.bwp-cmp__table td {
	padding: 0.7rem 0.45rem;
	border: 0;
	border-bottom: 1.5px solid var(--bwp-cmp-line);
	vertical-align: middle;
}

.bwp-cmp__table thead th {
	padding-block: 0.75rem;
	background: var(--bwp-cmp-surface);
	font-size: 0.75rem;
	font-weight: 500;
}

.bwp-cmp__table thead .bwp-cmp__product-col--ours {
	background: var(--bwp-cmp-ours);
}

/* Beat th/td padding shorthand so feature labels share the content left edge. */
.bwp-cmp__table :is(.bwp-cmp__feature-col, .bwp-cmp__feature) {
	padding-inline-start: 0;
	text-align: left;
}

.bwp-cmp__feature {
	padding-inline-end: 1rem;
	font-weight: 600;
	vertical-align: top;
}

.bwp-cmp__product-col,
.bwp-cmp__cell {
	text-align: center;
}

.bwp-cmp--pair .bwp-cmp__feature-col,
.bwp-cmp--pair .bwp-cmp__feature {
	width: 58%;
}

.bwp-cmp--pair .bwp-cmp__product-col,
.bwp-cmp--pair .bwp-cmp__cell {
	width: 21%;
}

.bwp-cmp--multi .bwp-cmp__feature-col,
.bwp-cmp--multi .bwp-cmp__feature {
	width: 40%;
	min-width: 0;
	max-width: none;
	padding-inline-end: 0.65rem;
	background: var(--bwp-cmp-surface);
}

.bwp-cmp--multi thead .bwp-cmp__feature-col {
	z-index: 2;
}

.bwp-cmp__table .bwp-cmp__product-col--ours,
.bwp-cmp__table .bwp-cmp__cell--ours {
	background: var(--bwp-cmp-ours);
	border-inline: 2px solid var(--bwp-cmp-ours-line);
}

.bwp-cmp__table .bwp-cmp__product-col--ours {
	border-top: 2px solid var(--bwp-cmp-ours-line);
}

.bwp-cmp__table tbody tr:last-child .bwp-cmp__cell--ours {
	border-bottom: 2px solid var(--bwp-cmp-ours-line);
}

.bwp-cmp__feature-title {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.3rem 0.4rem;
}

.bwp-cmp__badge {
	display: inline-flex;
	align-items: center;
	min-height: 1.15rem;
	padding: 0 0.35rem;
	border-radius: 4px;
	background: color-mix(in srgb, var(--bwp-cmp-accent) 14%, #fff);
	color: var(--bwp-cmp-accent);
	font-size: 0.625rem;
	font-weight: 700;
	letter-spacing: 0.06em;
	text-transform: uppercase;
}

.bwp-cmp__feature-desc {
	display: block;
	margin-top: 0.25rem;
	font-size: 0.75rem;
	font-weight: 400;
	line-height: 1.4;
	color: var(--bwp-cmp-subtle);
}

.bwp-cmp__cell-inner {
	display: inline-flex;
	flex-direction: column;
	align-items: center;
	gap: 0.2rem;
}

.bwp-cmp__tag {
	display: inline-flex;
	align-items: center;
	min-height: 1.1rem;
	padding: 0 0.3rem;
	border-radius: 3px;
	background: color-mix(in srgb, var(--bwp-cmp-subtle) 16%, #fff);
	color: var(--bwp-cmp-subtle);
	font-size: 0.625rem;
	font-weight: 700;
	letter-spacing: 0.05em;
	text-transform: uppercase;
	line-height: 1;
}

.bwp-cmp__tag--included {
	background: color-mix(in srgb, var(--bwp-cmp-accent) 14%, #fff);
	color: var(--bwp-cmp-accent);
}

.bwp-cmp__tag--plan {
	background: color-mix(in srgb, #b45309 14%, #fff);
	color: #9a3412;
}

.bwp-cmp__note {
	margin: 0.65rem 0 0;
	max-width: 42rem;
	color: var(--bwp-cmp-subtle);
	font-size: 0.75rem;
	line-height: 1.45;
	text-wrap: pretty;
}

.bwp-cmp__mark {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	color: var(--bwp-cmp-text);
	line-height: 1;
}

.bwp-cmp__mark--yes svg {
	width: 1.125rem;
	height: 1.125rem;
}

.bwp-cmp__mark--no {
	color: var(--bwp-cmp-subtle);
	font-size: 1.125rem;
}

@media (max-width: 719px) {
	/* Narrow viewports: scroll so every competitor stays readable. */
	.bwp-cmp--multi .bwp-cmp__table {
		table-layout: auto;
		width: max-content;
		min-width: 44rem;
	}

	.bwp-cmp--multi .bwp-cmp__feature-col,
	.bwp-cmp--multi .bwp-cmp__feature {
		position: sticky;
		left: 0;
		z-index: 1;
		width: 10.5rem;
		min-width: 10.5rem;
		max-width: 12rem;
		background: var(--bwp-cmp-surface);
	}

	.bwp-cmp--multi thead .bwp-cmp__feature-col {
		z-index: 2;
	}

	.bwp-cmp--multi .bwp-cmp__product-col,
	.bwp-cmp--multi .bwp-cmp__cell {
		width: auto;
		min-width: 4.5rem;
		padding-inline: 0.35rem;
	}

	.bwp-cmp__feature-desc {
		font-size: 0.7rem;
	}
}
