/* AEPC — Advanced Pricing Comparison. Every selector lives under .aepc-wrapper.
 * Desktop/tablet: a real, fully-bordered <table> that fits its container (no sideways scroll).
 * Phones (<= 767px): the table is swapped for stacked feature cards built from the same data. */

.aepc-wrapper,
.aepc-wrapper *,
.aepc-wrapper *::before,
.aepc-wrapper *::after {
	box-sizing: border-box;
}

.aepc-wrapper {
	width: 100%;
	max-width: 100%;
	min-width: 0;
	margin: 0 auto;
	overflow: hidden; /* safety net only: nothing inside is meant to be wider than the viewport */
	color: #303030;
	font-family: inherit;
}

.aepc-wrapper * {
	max-width: 100%;
	overflow-wrap: anywhere;
	word-break: normal;
}

/* ---------- Heading ---------- */
.aepc-wrapper .aepc-heading {
	margin: 0 0 10px;
	font-size: 30px;
	font-weight: 600;
	line-height: 1.2;
	text-align: center;
	color: #102c43;
}

.aepc-wrapper .aepc-subheading {
	margin: 0 0 42px;
	font-size: 14px;
	font-weight: 400;
	line-height: 1.5;
	text-align: center;
	color: #555;
}

/* ---------- Layout switch ---------- */
.aepc-wrapper .aepc-desktop-table {
	display: block;
	width: 100%;
	min-width: 0;
}

.aepc-wrapper .aepc-mobile-comparison {
	display: none;
}

/* ---------- Desktop / tablet table ---------- */
.aepc-wrapper .aepc-table {
	width: 100%;
	margin: 0;
	border: 1px solid #dcdcdc;
	border-collapse: collapse;
	border-spacing: 0;
	table-layout: fixed;
	background-color: #fff;
	font-family: inherit;
}

.aepc-wrapper .aepc-table .aepc-col-feature {
	width: 34%;
}

.aepc-wrapper .aepc-table th,
.aepc-wrapper .aepc-table td {
	margin: 0;
	padding: 10px 12px;
	font-size: 13px;
	font-weight: 400;
	line-height: 1.4;
	text-align: center;
	vertical-align: middle;
	color: #4a4a4a;
	background-color: transparent;
	border: 1px solid #dcdcdc;
}

.aepc-wrapper .aepc-table thead th {
	padding: 9px 12px;
	font-size: 14px;
	font-weight: 600;
	color: #1f2933;
	background-color: #fff;
}

.aepc-wrapper .aepc-table thead .aepc-th-feature {
	text-align: left;
}

.aepc-wrapper .aepc-table tbody .aepc-feature-cell {
	text-align: left;
	background-color: #fff;
}

.aepc-wrapper .aepc-feature-name {
	font-size: 13px;
	font-weight: 600;
	color: #303030;
}

/* Section rows span the whole table and are never highlighted */
.aepc-wrapper .aepc-table .aepc-section-row th {
	padding: 8px 12px;
	font-size: 14px;
	font-weight: 600;
	text-align: left;
	color: #20a866;
	background-color: #f5f5f5;
}

.aepc-wrapper .aepc-section-icon {
	display: inline-block;
	width: 18px;
	height: auto;
	margin-right: 6px;
	vertical-align: middle;
}

/* Spacer rows: no horizontal rules of their own; the table's outer border still closes the sides */
.aepc-wrapper .aepc-table .aepc-spacer-row td {
	height: 14px;
	padding: 0;
	border-top: 0;
	border-bottom: 0;
	background-color: transparent;
}

/* ---------- Shared cell content (table + mobile cards) ---------- */
.aepc-wrapper .aepc-value {
	font-size: 13px;
	font-weight: 400;
	color: #4a4a4a;
}

.aepc-wrapper .aepc-cell-inner {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 12px;
	max-width: 100%;
}

.aepc-wrapper .aepc-custom-icon {
	display: inline-block;
	width: 16px;
	height: auto;
	vertical-align: middle;
}

.aepc-wrapper .aepc-icon {
	display: inline-block;
	flex: 0 0 auto;
	width: 16px;
	height: 16px;
	vertical-align: middle;
	fill: none;
	stroke: currentColor;
	stroke-width: 2;
	stroke-linecap: round;
	stroke-linejoin: round;
}

.aepc-wrapper .aepc-icon--check {
	color: #21b66f;
}

.aepc-wrapper .aepc-icon--cross {
	color: #a8a8a8;
}

.aepc-wrapper .aepc-tip {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 14px;
	height: 14px;
	margin-left: 6px;
	font-size: 9px;
	font-style: italic;
	font-weight: 700;
	line-height: 1;
	vertical-align: middle;
	color: #8b949b;
	border: 1px solid currentColor;
	border-radius: 50%;
	cursor: help;
}

.aepc-wrapper .aepc-tip:focus-visible {
	outline: 2px solid #20a866;
	outline-offset: 2px;
}

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

/* ---------- Mobile cards (markup only visible <= 767px) ---------- */
.aepc-wrapper .aepc-mobile-section-title {
	width: 100%;
	margin: 14px 0 8px;
	padding: 8px 10px;
	font-size: 13px;
	font-weight: 600;
	line-height: 1.4;
	color: #20a866;
	background-color: #f5f5f5;
	border: 1px solid #dcdcdc;
}

.aepc-wrapper .aepc-mobile-section-title:first-child {
	margin-top: 0;
}

.aepc-wrapper .aepc-mobile-feature-card {
	width: 100%;
	margin: 0 0 10px;
	overflow: hidden;
	background-color: #fff;
	border: 1px solid #dcdcdc;
	border-radius: 0;
}

.aepc-wrapper .aepc-mobile-feature-title {
	padding: 10px 12px;
	font-size: 13px;
	font-weight: 600;
	line-height: 1.4;
	color: #303030;
	background-color: #fff;
	border-bottom: 1px solid #dcdcdc;
}

.aepc-wrapper .aepc-mobile-plan-row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	width: 100%;
	padding: 9px 12px;
	border-bottom: 1px solid #e5e5e5;
}

.aepc-wrapper .aepc-mobile-plan-row:last-child {
	border-bottom: 0;
}

.aepc-wrapper .aepc-mobile-plan-row.aepc-highlighted {
	background-color: #f2f9f5; /* overridden inline by the plan's own highlight colour */
}

.aepc-wrapper .aepc-mobile-plan-name {
	flex: 0 0 45%;
	min-width: 0;
	font-size: 12px;
	font-weight: 500;
	line-height: 1.4;
	color: #444;
}

.aepc-wrapper .aepc-mobile-plan-value {
	flex: 1;
	min-width: 0;
	font-size: 12px;
	line-height: 1.4;
	text-align: right;
	color: #444;
}

.aepc-wrapper .aepc-mobile-plan-value .aepc-value {
	font-size: 12px;
	color: #444;
}

.aepc-wrapper .aepc-mobile-plan-value .aepc-cell-inner {
	justify-content: flex-end;
	text-align: right;
}

/* ---------- Tablet ---------- */
@media (max-width: 1024px) {
	.aepc-wrapper .aepc-heading {
		font-size: 26px;
	}

	.aepc-wrapper .aepc-table th,
	.aepc-wrapper .aepc-table td {
		padding: 9px 8px;
	}
}

/* ---------- Phones ---------- */
@media (max-width: 767px) {
	.aepc-wrapper .aepc-desktop-table {
		display: none;
	}

	.aepc-wrapper .aepc-mobile-comparison {
		display: block;
		width: 100%;
	}

	.aepc-wrapper .aepc-heading {
		font-size: 22px;
		line-height: 1.25;
	}

	.aepc-wrapper .aepc-subheading,
	.aepc-wrapper .aepc-subtitle {
		margin-bottom: 24px;
		font-size: 13px;
		line-height: 1.5;
	}
}
