.fsl-ce-wrapper {
	--fsl-ce-purple: #6a2ee0;
	--fsl-ce-purple-light: #f3ecff;
	--fsl-ce-winner-bg: #e9f9ee;
	--fsl-ce-winner-text: #1a7f37;
	/* Equal-value light blue — kept dark enough on its own background to
	   stay readable, not the "practically white" blue tints. */
	--fsl-ce-equal-bg: #e5f2fd;
	--fsl-ce-equal-text: #0b5fa5;
	--fsl-ce-border: #e6e2f2;
	overflow-x: auto;
	width: 100%;
	font-family: inherit;
}

.fsl-ce-table {
	width: 100%;
	border-collapse: separate;
	border-spacing: 0;
	background: #fff;
	min-width: 480px;
	/* Fixed layout is what makes column widths obey the <colgroup> widths
	   below instead of shrinking/growing based on cell content length. */
	table-layout: fixed;
}

/* ---------------------------------------------------------------- */
/* Equal-width columns                                               */
/*                                                                    */
/* The spec label column keeps a constant width; every product       */
/* column then gets an identical share — 100/N% — of whatever width  */
/* remains, where N (--fsl-ce-count) is written inline per table by  */
/* the renderer. This guarantees 2 mobiles = 50/50, 3 = 33.3% each,  */
/* 4 = 25% each, etc., no matter how long any single value is.       */
/* ---------------------------------------------------------------- */

.fsl-ce-col-spec {
	width: 220px;
}

.fsl-ce-col-product {
	width: calc((100% - 220px) / var(--fsl-ce-count, 2));
}

.fsl-ce-table thead th {
	background: var(--fsl-ce-purple);
	color: #fff;
	text-align: left;
	padding: 14px 16px;
	font-weight: 600;
	position: sticky;
	top: 0;
	z-index: 20;
	backface-visibility: hidden;
}

/* Keep the names of the phones being compared visible while the user
   scrolls through the long specification table. */
.fsl-ce-table thead th.fsl-ce-product-col {
	position: sticky;
	top: 0;
	z-index: 21;
	background: var(--fsl-ce-purple);
}

.fsl-ce-table thead th.fsl-ce-spec-col {
	position: sticky;
	top: 0;
	z-index: 22;
	background: var(--fsl-ce-purple);
}

.fsl-ce-spec-col,
.fsl-ce-product-col {
	/* Belt-and-suspenders: some browsers weigh first-row cell widths
	   alongside <colgroup> under table-layout:fixed, so mirror the same
	   widths here rather than relying on colgroup alone. */
	width: 220px;
	min-width: 0;
}

.fsl-ce-product-col {
	width: calc((100% - 220px) / var(--fsl-ce-count, 2));
}

.fsl-ce-section-row td {
	/* Premium section heading: solid purple bar, white centered Oxanium
	   text, spans the full comparison row via the existing colspan. */
	background: var(--fsl-ce-purple);
	color: #fff;
	font-family: 'Oxanium', inherit;
	font-weight: 700;
	font-size: 1rem;
	text-align: center;
	vertical-align: middle;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	padding: 14px 16px;
	border-top: 1px solid var(--fsl-ce-border);
}

.fsl-ce-field-row td {
	padding: 12px 16px;
	border-bottom: 1px solid var(--fsl-ce-border);
	vertical-align: top;
	/* Long values wrap inside their own equal-width cell instead of
	   stretching the column or overflowing it. */
	overflow-wrap: anywhere;
	word-break: break-word;
	white-space: normal;
}

.fsl-ce-table thead th.fsl-ce-product-col {
	/* Long product names should wrap too, for the same reason. */
	overflow-wrap: anywhere;
	word-break: break-word;
	white-space: normal;
}

.fsl-ce-field-row .fsl-ce-spec-col {
	font-weight: 600;
	color: #333;
	background: #fafafd;
}

.fsl-ce-value.fsl-ce-winner {
	background: var(--fsl-ce-winner-bg);
	color: var(--fsl-ce-winner-text);
	font-weight: 700;
	border-radius: 6px;
}

/* Equal valid values (Priority 3) — clearly visible light blue, kept
   distinct from both the green "winner" state and the muted grey used
   for missing/unconfirmed values. */
.fsl-ce-value.fsl-ce-equal {
	background: var(--fsl-ce-equal-bg);
	color: var(--fsl-ce-equal-text);
	font-weight: 700;
	border-radius: 6px;
}

.fsl-ce-empty {
	color: #b5b0c2;
}

.fsl-ce-thumb {
	/* Render the source image at a generous display size; the renderer now
	   requests the original/full attachment rather than the medium thumbnail. */
	max-width: 180px;
	width: 100%;
	height: auto;
	border-radius: 6px;
	display: block;
	image-rendering: auto;
}

.fsl-ce-link-btn {
	display: inline-block;
	padding: 6px 14px;
	background: var(--fsl-ce-purple);
	color: #fff;
	border-radius: 20px;
	text-decoration: none;
	font-size: 0.85rem;
	font-weight: 600;
}

.fsl-ce-link-btn:hover {
	opacity: 0.85;
}

.fsl-ce-wysiwyg {
	font-size: 0.92rem;
	line-height: 1.5;
}

.fsl-ce-notice {
	padding: 16px;
	background: var(--fsl-ce-purple-light, #f3ecff);
	color: #333;
	border-radius: 8px;
}

/* ---------------------------------------------------------------- */
/* Search-and-pick UI                                                */
/* ---------------------------------------------------------------- */

.fsl-ce-container {
	--fsl-ce-purple: #6a2ee0;
	--fsl-ce-purple-light: #f3ecff;
	--fsl-ce-border: #e6e2f2;
}

.fsl-ce-picker {
	margin-bottom: 24px;
}

.fsl-ce-picker-row {
	display: flex;
	gap: 10px;
	align-items: flex-start;
}

.fsl-ce-search-wrap {
	position: relative;
	flex: 1;
	min-width: 0;
}

.fsl-ce-search-input {
	width: 100%;
	padding: 12px 14px;
	border: 1px solid var(--fsl-ce-border);
	border-radius: 8px;
	font-size: 0.95rem;
	box-sizing: border-box;
}

.fsl-ce-search-input:focus {
	outline: none;
	border-color: var(--fsl-ce-purple);
}

.fsl-ce-suggestions {
	position: absolute;
	top: calc(100% + 4px);
	left: 0;
	right: 0;
	background: #fff;
	border: 1px solid var(--fsl-ce-border);
	border-radius: 8px;
	box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
	list-style: none;
	margin: 0;
	padding: 6px;
	max-height: 320px;
	overflow-y: auto;
	z-index: 10;
}

.fsl-ce-suggestions[hidden] {
	display: none;
}

.fsl-ce-suggestion {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 8px 10px;
	border-radius: 6px;
	cursor: pointer;
	font-size: 0.9rem;
}

.fsl-ce-suggestion:hover,
.fsl-ce-suggestion:focus {
	background: var(--fsl-ce-purple-light);
	outline: none;
}

.fsl-ce-suggestion img {
	width: 32px;
	height: 32px;
	object-fit: cover;
	border-radius: 4px;
}

.fsl-ce-suggestion-loading,
.fsl-ce-suggestion-empty {
	padding: 10px;
	font-size: 0.88rem;
	color: #888;
}

.fsl-ce-compare-btn {
	flex-shrink: 0;
	padding: 12px 20px;
	background: var(--fsl-ce-purple);
	color: #fff;
	border: none;
	border-radius: 8px;
	font-weight: 600;
	font-size: 0.95rem;
	cursor: pointer;
}

.fsl-ce-compare-btn:disabled {
	background: #cfc6e6;
	cursor: not-allowed;
}

.fsl-ce-compare-btn:not(:disabled):hover {
	opacity: 0.9;
}

.fsl-ce-chips {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	list-style: none;
	margin: 12px 0 0;
	padding: 0;
}

.fsl-ce-chip {
	display: flex;
	align-items: center;
	gap: 8px;
	background: var(--fsl-ce-purple-light);
	color: var(--fsl-ce-purple);
	border-radius: 20px;
	padding: 5px 6px 5px 12px;
	font-size: 0.88rem;
	font-weight: 600;
}

.fsl-ce-chip img {
	width: 22px;
	height: 22px;
	object-fit: cover;
	border-radius: 50%;
}

.fsl-ce-chip-remove {
	background: none;
	border: none;
	color: var(--fsl-ce-purple);
	font-size: 1.1rem;
	line-height: 1;
	cursor: pointer;
	padding: 2px 4px;
}

.fsl-ce-picker-hint {
	margin: 10px 0 0;
	font-size: 0.85rem;
	color: #888;
	min-height: 1.2em;
}

@media (max-width: 640px) {
	.fsl-ce-picker-row {
		flex-direction: column;
	}
	.fsl-ce-compare-btn {
		width: 100%;
	}
}

@media (max-width: 640px) {
	.fsl-ce-col-spec,
	.fsl-ce-spec-col {
		width: 140px;
		font-size: 0.85rem;
	}
	.fsl-ce-col-product,
	.fsl-ce-product-col {
		/* Recompute the equal share against the narrower 140px spec
		   column, so the product columns still split whatever's left
		   evenly between however many mobiles (N) are being compared. */
		width: calc((100% - 140px) / var(--fsl-ce-count, 2));
	}
	.fsl-ce-field-row td,
	.fsl-ce-table thead th {
		padding: 10px;
	}
}

/* ---------------------------------------------------------------- */
/* Dynamic comparison H1 (result pages only)                         */
/* ---------------------------------------------------------------- */

.fsl-ce-comparison-h1 {
	color: #1a1a2e;
	font-size: 1.6rem;
	font-weight: 700;
	margin: 0 0 16px;
	line-height: 1.3;
}

@media (max-width: 640px) {
	.fsl-ce-comparison-h1 {
		font-size: 1.25rem;
	}
}

/* ---------------------------------------------------------------- */
/* [mobile_compare_button] — single mobile page entry point          */
/* ---------------------------------------------------------------- */

.fsl-mobile-compare-button {
	--fsl-ce-purple: #6a2ee0;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 6px;
	padding: 12px 22px;
	background: var(--fsl-ce-purple);
	color: #fff;
	border: none;
	border-radius: 8px;
	font-weight: 600;
	font-size: 0.95rem;
	text-decoration: none;
	line-height: 1.2;
	cursor: pointer;
	box-sizing: border-box;
}

.fsl-mobile-compare-button:hover,
.fsl-mobile-compare-button:focus {
	opacity: 0.9;
	color: #fff;
}

@media (max-width: 640px) {
	.fsl-mobile-compare-button {
		width: 100%;
	}
}
