.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;
	/* If your theme has its own fixed/sticky header, set
	   --fsl-ce-sticky-offset (e.g. in a small snippet or your child theme
	   CSS) to that header's height so this row sticks BELOW it instead of
	   underneath/behind it. Defaults to 0 (sticks flush to the viewport
	   top) when the theme has no fixed header. */
	top: var(--fsl-ce-sticky-offset, 0px);
	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: var(--fsl-ce-sticky-offset, 0px);
	z-index: 21;
	background: var(--fsl-ce-purple);
}

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

/* WordPress's own admin toolbar is fixed at the very top of the viewport
   with a z-index far above ours, so when a logged-in user (e.g. testing
   as admin) scrolls, our sticky header would otherwise stick right at
   the same 0px and end up hidden underneath it. WP adds the "admin-bar"
   body class whenever that toolbar is showing, and the toolbar's own
   height breakpoints are 32px (desktop) / 46px (screens <= 782px) — the
   same values WP core itself uses, so this always matches regardless of
   theme. Logged-out visitors never get this class, so the header still
   sticks flush to the top for them. */
body.admin-bar .fsl-ce-table thead th,
body.admin-bar .fsl-ce-table thead th.fsl-ce-product-col,
body.admin-bar .fsl-ce-table thead th.fsl-ce-spec-col {
	top: calc(32px + var(--fsl-ce-sticky-offset, 0px));
}

@media screen and (max-width: 782px) {
	body.admin-bar .fsl-ce-table thead th,
	body.admin-bar .fsl-ce-table thead th.fsl-ce-product-col,
	body.admin-bar .fsl-ce-table thead th.fsl-ce-spec-col {
		top: calc(46px + var(--fsl-ce-sticky-offset, 0px));
	}
}

.fsl-ce-th-inner {
	display: flex;
	flex-direction: column;
	gap: 6px;
}

.fsl-ce-th-top {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 6px;
}

.fsl-ce-product-link,
.fsl-ce-product-link:visited {
	color: #fff;
	text-decoration: none;
}

.fsl-ce-product-link:hover,
.fsl-ce-product-link:focus {
	text-decoration: underline;
}

.fsl-ce-th-actions {
	display: flex;
	gap: 4px;
	flex-shrink: 0;
}

.fsl-ce-th-btn {
	background: rgba(255, 255, 255, 0.18);
	border: none;
	color: #fff;
	border-radius: 5px;
	width: 24px;
	height: 24px;
	line-height: 1;
	font-size: 0.8rem;
	cursor: pointer;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 0;
}

.fsl-ce-th-btn:hover,
.fsl-ce-th-btn:focus {
	background: rgba(255, 255, 255, 0.32);
	outline: none;
}

.fsl-ce-th-remove {
	font-size: 1rem;
}

.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 {
	/* Glassy purple section heading: translucent gradient + backdrop blur
	   for a frosted-glass look, white centered Oxanium text, spans the
	   full comparison row via the existing colspan. */
	background: linear-gradient(135deg, rgba(106, 46, 224, 0.85), rgba(139, 92, 246, 0.72));
	backdrop-filter: blur(12px);
	-webkit-backdrop-filter: blur(12px);
	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 rgba(255, 255, 255, 0.28);
	border-bottom: 1px solid rgba(255, 255, 255, 0.12);
	box-shadow: 0 4px 16px rgba(106, 46, 224, 0.22), inset 0 1px 0 rgba(255, 255, 255, 0.2);
	text-shadow: 0 1px 2px rgba(0, 0, 0, 0.15);
}

.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-wysiwyg p {
	margin: 0 0 6px;
}

.fsl-ce-wysiwyg p:last-child {
	margin-bottom: 0;
}

.fsl-ce-wysiwyg a {
	color: var(--fsl-ce-purple, #6a2ee0);
	text-decoration: underline;
}

.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 12px 40px;
	border: 1px solid var(--fsl-ce-border);
	border-radius: 8px;
	font-size: 0.95rem;
	box-sizing: border-box;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%23888' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='8'%3E%3C/circle%3E%3Cline x1='21' y1='21' x2='16.65' y2='16.65'%3E%3C/line%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: 12px center;
}

.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%;
	}
}

/* ---------------------------------------------------------------- */
/* Floating "add phone" button + edit/add search popover + toast     */
/* ---------------------------------------------------------------- */

.fsl-ce-floating-add {
	position: fixed;
	right: 24px;
	bottom: 24px;
	width: 54px;
	height: 54px;
	border-radius: 50%;
	background: var(--fsl-ce-purple, #6a2ee0);
	color: #fff;
	border: none;
	font-size: 1.8rem;
	line-height: 1;
	cursor: pointer;
	box-shadow: 0 6px 18px rgba(0, 0, 0, 0.22);
	z-index: 60;
	display: flex;
	align-items: center;
	justify-content: center;
}

.fsl-ce-floating-add:hover,
.fsl-ce-floating-add:focus {
	opacity: 0.92;
	outline: none;
}

@media (max-width: 640px) {
	.fsl-ce-floating-add {
		right: 16px;
		bottom: 16px;
		width: 48px;
		height: 48px;
		font-size: 1.6rem;
	}
}

.fsl-ce-popover {
	display: none;
	position: fixed;
	inset: 0;
	background: rgba(20, 12, 40, 0.35);
	z-index: 100;
	align-items: flex-start;
	justify-content: center;
	padding: 10vh 16px 16px;
}

.fsl-ce-popover.fsl-ce-popover-open {
	display: flex;
}

.fsl-ce-popover-inner {
	background: #fff;
	border-radius: 10px;
	padding: 16px;
	width: 100%;
	max-width: 420px;
	position: relative;
	box-shadow: 0 12px 36px rgba(0, 0, 0, 0.2);
}

.fsl-ce-popover-close {
	position: absolute;
	top: 10px;
	right: 10px;
	background: none;
	border: none;
	font-size: 1.3rem;
	line-height: 1;
	color: #888;
	cursor: pointer;
	padding: 4px;
}

.fsl-ce-popover-search {
	width: 100%;
	padding: 12px 14px 12px 40px;
	border: 1px solid var(--fsl-ce-border, #e6e2f2);
	border-radius: 8px;
	font-size: 0.95rem;
	box-sizing: border-box;
	margin-top: 6px;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%23888' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='8'%3E%3C/circle%3E%3Cline x1='21' y1='21' x2='16.65' y2='16.65'%3E%3C/line%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: 12px center;
}

.fsl-ce-popover-search:focus {
	outline: none;
	border-color: var(--fsl-ce-purple, #6a2ee0);
}

.fsl-ce-popover-suggestions {
	list-style: none;
	margin: 10px 0 0;
	padding: 0;
	max-height: 320px;
	overflow-y: auto;
}

.fsl-ce-toast {
	position: fixed;
	left: 50%;
	bottom: 24px;
	transform: translate(-50%, 12px);
	background: #2a2140;
	color: #fff;
	padding: 10px 18px;
	border-radius: 8px;
	font-size: 0.88rem;
	opacity: 0;
	pointer-events: none;
	transition: opacity 0.2s ease, transform 0.2s ease;
	z-index: 110;
	max-width: 90vw;
	text-align: center;
}

.fsl-ce-toast-visible {
	opacity: 1;
	transform: translate(-50%, 0);
}

/* ---------------------------------------------------------------- */
/* "Cast your vote" widget                                          */
/* ---------------------------------------------------------------- */

.fsl-ce-vote {
	margin-top: 24px;
	padding: 20px;
	border: 1px solid var(--fsl-ce-border, #e6e2f2);
	border-radius: 12px;
	background: #fff;
}

.fsl-ce-vote-title {
	margin: 0 0 4px;
	font-size: 1.1rem;
	font-weight: 700;
	color: #221a33;
}

.fsl-ce-vote-subtitle {
	margin: 0 0 16px;
	font-size: 0.9rem;
	color: #666;
}

.fsl-ce-vote-options {
	display: flex;
	flex-direction: column;
	gap: 14px;
	margin-bottom: 16px;
}

.fsl-ce-vote-option {
	display: block;
	cursor: pointer;
}

.fsl-ce-vote-option.fsl-ce-vote-option-locked {
	cursor: default;
}

.fsl-ce-vote-option-top {
	display: flex;
	align-items: center;
	gap: 8px;
	margin-bottom: 6px;
}

.fsl-ce-vote-option-top input[type="radio"] {
	margin: 0;
	accent-color: var(--fsl-ce-purple, #6a2ee0);
	flex-shrink: 0;
}

.fsl-ce-vote-name {
	flex: 1;
	font-weight: 600;
	color: #221a33;
	font-size: 0.95rem;
}

.fsl-ce-vote-pct {
	font-weight: 700;
	color: #221a33;
	font-size: 0.9rem;
	white-space: nowrap;
}

.fsl-ce-vote-bar {
	display: block;
	height: 8px;
	border-radius: 4px;
	background: var(--fsl-ce-purple-light, #f3ecff);
	overflow: hidden;
}

.fsl-ce-vote-bar-fill {
	display: block;
	height: 100%;
	background: var(--fsl-ce-purple, #6a2ee0);
	border-radius: 4px;
	transition: width 0.3s ease;
}

.fsl-ce-vote-btn {
	background: var(--fsl-ce-purple, #6a2ee0);
	color: #fff;
	border: none;
	border-radius: 8px;
	padding: 10px 24px;
	font-size: 0.9rem;
	font-weight: 600;
	cursor: pointer;
}

.fsl-ce-vote-btn:hover:not(:disabled) {
	opacity: 0.92;
}

.fsl-ce-vote-btn:disabled {
	opacity: 0.55;
	cursor: default;
}

.fsl-ce-vote-total {
	margin: 12px 0 0;
	font-size: 0.85rem;
	color: #777;
}

/* ---------------------------------------------------------------- */
/* Reasons to Consider section                                      */
/* ---------------------------------------------------------------- */

.fsl-ce-reasons-section {
	margin-top: 24px;
	padding: 20px;
	border: 1px solid var(--fsl-ce-border, #e6e2f2);
	border-radius: 12px;
	background: #fff;
}

.fsl-ce-reasons-title {
	margin: 0 0 4px;
	font-size: 1.1rem;
	font-weight: 700;
	color: #221a33;
}

.fsl-ce-reasons-subtitle {
	margin: 0 0 18px;
	font-size: 0.9rem;
	color: #666;
}

.fsl-ce-reasons-cols {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
	gap: 24px;
}

.fsl-ce-reasons-col-title {
	margin: 0 0 12px;
	font-size: 0.98rem;
	font-weight: 700;
	color: #221a33;
}

.fsl-ce-reasons-list {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 12px;
}

.fsl-ce-reasons-item {
	display: flex;
	align-items: flex-start;
	gap: 10px;
	font-size: 0.9rem;
	line-height: 1.4;
	color: #333;
}

.fsl-ce-reasons-icon {
	flex-shrink: 0;
	width: 20px;
	height: 20px;
	border-radius: 50%;
	background: #1f9d55;
	color: #fff;
	font-size: 0.85rem;
	font-weight: 700;
	line-height: 20px;
	text-align: center;
}

.fsl-ce-reasons-detail {
	color: var(--fsl-ce-purple, #6a2ee0);
	font-weight: 600;
}

/* ---------------------------------------------------------------- */
/* Related Comparisons (admin-curated internal links)               */
/* ---------------------------------------------------------------- */

.fsl-ce-related-links {
	margin-top: 24px;
	padding: 20px;
	border: 1px solid var(--fsl-ce-border, #e6e2f2);
	border-radius: 12px;
	background: #fff;
}

.fsl-ce-related-links-title {
	margin: 0 0 12px;
	font-size: 1.1rem;
	font-weight: 700;
	color: #221a33;
}

.fsl-ce-related-links-list {
	margin: 0;
	padding-left: 20px;
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.fsl-ce-related-links-list li {
	font-size: 0.9rem;
}

.fsl-ce-related-links-list a {
	color: var(--fsl-ce-purple, #6a2ee0);
	text-decoration: none;
	font-weight: 600;
}

.fsl-ce-related-links-list a:hover,
.fsl-ce-related-links-list a:focus {
	text-decoration: underline;
}

/* ---------------------------------------------------------------- */
/* Ad slots (Settings → FSL Ad Slots)                                */
/* ---------------------------------------------------------------- */

.fsl-ce-ad-row td {
	padding: 0;
	border: none;
	background: transparent;
}

.fsl-ce-ad-slot {
	display: flex;
	justify-content: center;
	align-items: center;
	padding: 10px 0;
}

.fsl-ce-ad-img {
	max-width: 100%;
	height: auto;
	display: block;
}
