.app-embed-block__container {
	position: fixed;
	left: 16px;
	bottom: 16px;
	z-index: 9999;
	width: auto;
	font-family:
		'Poppins',
		system-ui,
		-apple-system,
		Segoe UI,
		Roboto,
		Arial,
		sans-serif;
	display: flex;
	flex-direction: column-reverse;
	align-items: flex-start;
	gap: 10px;
}

.app-embed-block__container[hidden] {
	display: none !important;
}

.emcm-compare-embed__fab {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	padding: var(--emcm-cell-padding, 10px) var(--emcm-cell-padding, 12px);
	border-radius: 10px;
	border: 0;
	background: #2f2f2f;
	color: #fff;
	cursor: pointer;
	box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
}

.emcm-compare-embed__fab:focus {
	outline: 2px solid rgba(0, 0, 0, 0.3);
	outline-offset: 2px;
}

.emcm-compare-embed__fab-icon {
	width: 18px;
	height: 18px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
}

.emcm-compare-embed__fab-icon svg {
	width: 18px;
	height: 18px;
	display: block;
}

.emcm-compare-embed__fab-text {
	font-size: 14px;
	line-height: 1;
	white-space: nowrap;
}

.emcm-compare-embed__fab-count {
	min-width: 22px;
	height: 18px;
	padding: var(--emcm-cell-padding, 0px) var(--emcm-cell-padding, 6px);
	border-radius: 4px;
	background: #fff;
	color: #111;
	font-size: 12px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
}

.emcm-compare-embed__fab-chevron {
	margin-left: 2px;
	font-size: 14px;
	opacity: 0.95;
}

.emcm-compare-embed__drawer {
	width: 320px;
	max-width: calc(100vw - 32px);
	background: #eee;
	border-radius: 8px;
	border: 1px solid rgba(0, 0, 0, 0.12);
	box-shadow: 0 14px 32px rgba(0, 0, 0, 0.22);
	overflow: hidden;
}

.emcm-compare-embed__drawer-items {
	max-height: 260px;
	overflow: auto;
	-ms-overflow-style: none;
	scrollbar-width: none;
	padding: 12px;
	background: #f6f6f6;
}

.emcm-compare-embed__drawer-items::-webkit-scrollbar {
	display: none;
}

.emcm-compare-embed__item {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 10px;
	background: #fff;
	border-radius: 8px;
	border: 1px solid rgba(0, 0, 0, 0.08);
}

.emcm-compare-embed__item + .emcm-compare-embed__item {
	margin-top: 10px;
}

.emcm-compare-embed__thumb {
	width: 52px;
	height: 52px;
	border-radius: 6px;
	background: #f0f0f0;
	overflow: hidden;
	flex: 0 0 auto;
	display: flex;
	align-items: center;
	justify-content: center;
}

.emcm-compare-embed__thumb img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.emcm-compare-embed__name {
	flex: 1 1 auto;
	font-size: 13px;
	color: #1a1a1a;
	line-height: 1.2;
	overflow: hidden;
	text-overflow: ellipsis;
	display: -webkit-box;
	line-clamp: 2;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
}

.emcm-compare-embed__meta {
	flex: 1 1 auto;
	min-width: 0;
	display: flex;
	flex-direction: column;
	gap: 2px;
}

.emcm-compare-embed__variant {
	font-size: 11px;
	line-height: 1.25;
	color: #666;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.emcm-compare-embed__remove {
	width: 26px;
	height: 26px;
	border-radius: 4px;
	border: 2px solid #d60000;
	color: #d60000;
	background: #fff;
	cursor: pointer;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	font-size: 16px;
	line-height: 1;
}

.emcm-compare-embed__drawer-footer {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: var(--emcm-cell-padding, 10px) var(--emcm-cell-padding, 12px);
	background: #2f2f2f;
	color: #fff;
}

.emcm-compare-embed__compare-btn {
	flex: 1 1 auto;
	background: transparent;
	border: 0;
	color: #fff;
	font-size: 14px;
	cursor: pointer;
	text-align: center;
}

.emcm-compare-embed__compare-count {
	min-width: 22px;
	height: 18px;
	padding: 0 6px;
	border-radius: 4px;
	background: #fff;
	color: #111;
	font-size: 12px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
}

.emcm-compare-embed__compare-chevron {
	font-size: 14px;
	opacity: 0.95;
}

/* Compare page (/pages/em-selectpro) */
.emcm-compare-page {
	width: min(960px, calc(100vw - 32px));
	margin: 24px auto;
	font-family:
		'Poppins',
		system-ui,
		-apple-system,
		Segoe UI,
		Roboto,
		Arial,
		sans-serif;
}

.emcm-compare-page__card {
	background: #fff;
	border: var(--emcm-border-width, 1px) solid
		var(--emcm-border-color, rgba(0, 0, 0, 0.1));
	border-radius: var(--emcm-border-radius, 12px);
	box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
	overflow: hidden;
}

.emcm-compare-page__header {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: var(--emcm-cell-padding, 14px);
	border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

.emcm-compare-page__title {
	margin: 0;
	font-size: 18px;
	line-height: 1.2;
}

/* Empty-state title sits directly inside the card (no header wrapper) */
.emcm-compare-page__card > .emcm-compare-page__title {
	padding: var(--emcm-cell-padding, 14px) var(--emcm-cell-padding, 14px) 0;
}

.emcm-compare-page__count {
	min-width: 22px;
	height: 18px;
	padding: 0 var(--emcm-cell-padding, 6px);
	border-radius: 4px;
	background: #2f2f2f;
	color: #fff;
	font-size: 12px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
}

.emcm-compare-page__clear {
	margin-left: auto;
	border: 1px solid rgba(0, 0, 0, 0.18);
	background: #fff;
	border-radius: 8px;
	padding: calc(var(--emcm-cell-padding, 14px) * 0.6)
		calc(var(--emcm-cell-padding, 14px) * 0.75);
	cursor: pointer;
	font-size: 13px;
}

.emcm-compare-page__list {
	padding: 12px;
}

.emcm-compare-page__row {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 12px;
	border: 1px solid rgba(0, 0, 0, 0.08);
	border-radius: 10px;
	background: #fff;
}

.emcm-compare-page__row + .emcm-compare-page__row {
	margin-top: 10px;
}

.emcm-compare-page__imgwrap {
	width: 64px;
	height: 64px;
	border-radius: 10px;
	overflow: hidden;
	background: #f2f2f2;
	flex: 0 0 auto;
}

.emcm-compare-page__img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.emcm-compare-page__img--placeholder {
	background: #e9e9e9;
}

.emcm-compare-page__meta {
	flex: 1 1 auto;
	min-width: 0;
}

.emcm-compare-page__name {
	font-size: 14px;
	color: #111;
	line-height: 1.2;
}

.emcm-compare-page__vendor {
	margin-top: 4px;
	font-size: 12px;
	color: rgba(0, 0, 0, 0.6);
}

.emcm-compare-page__remove {
	width: 30px;
	height: 30px;
	border-radius: 6px;
	border: 2px solid #d60000;
	color: #d60000;
	background: #fff;
	cursor: pointer;
	font-size: 18px;
	line-height: 1;
	display: inline-flex;
	align-items: center;
	justify-content: center;
}

.emcm-compare-page__empty {
	margin: 0;
	padding: 18px 16px;
	color: rgba(0, 0, 0, 0.7);
}

.emcm-compare-page__empty-actions {
	padding: 0 16px 18px;
	display: flex;
	align-items: center;
	gap: 10px;
}

.emcm-compare-page__go-select {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 12px 18px;
	min-height: 42px;
	min-width: 160px;
	border-radius: var(--emcm-btn-border-radius, 12px);
	background: #2f2f2f !important;
	color: #fff !important;
	text-decoration: none !important;
	border: 0 !important;
	font-weight: 600;
	line-height: 1.1;
	box-shadow: 0 8px 20px rgba(0, 0, 0, 0.14);
	font-size: 15px !important;
}

.emcm-compare-page__go-select:link,
.emcm-compare-page__go-select:visited,
.emcm-compare-page__go-select:hover,
.emcm-compare-page__go-select:active,
.emcm-compare-page__go-select:focus {
	color: #fff !important;
	text-decoration: none !important;
}

.emcm-compare-page__go-select:hover {
	filter: brightness(0.95);
}

.emcm-compare-page__go-select:focus {
	outline: 2px solid rgba(0, 0, 0, 0.35);
	outline-offset: 2px;
}

/* Compare table */
.emcm-compare-table__wrap {
	overflow: visible;
	background: #fff;
}

.emcm-compare-table {
	width: 100%;
	border-collapse: collapse;
	table-layout: fixed;
}

.emcm-compare-table th,
.emcm-compare-table td {
	border: var(--emcm-border-width, 1px) solid
		var(--emcm-border-color, rgba(0, 0, 0, 0.12));
	vertical-align: top;
	padding: 0;
}

.emcm-compare-table thead th {
	background: var(--emcm-heading-bg, #d7d7d7);
	color: var(--emcm-heading-color, #111);
}

.emcm-compare-table__headcell {
	background: var(--emcm-heading-bg, #d7d7d7);
	color: var(--emcm-heading-color, #111);
}

.emcm-compare-table__headcell--empty {
	position: relative;
}

/* Empty header cells: hard-center the CTA in the whole column */
.emcm-compare-table__headcell--empty .emcm-compare-table__product--empty {
	position: absolute;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 18px 14px;
}

.emcm-compare-table__headcell--empty .emcm-compare-table__product-actions {
	width: 100%;
	justify-content: center;
}

.emcm-compare-table__headcell--empty .emcm-compare-table__select {
	min-width: 0;
	max-width: 100%;
	width: min(160px, 100%) !important;
}

.emcm-compare-table__corner {
	width: clamp(88px, 18vw, 160px);
	background: var(--emcm-heading-bg, #d7d7d7);
}

.emcm-compare-table th.emcm-compare-table__rowhead {
	background: var(--emcm-heading-bg, #d7d7d7);
	color: var(--emcm-heading-color, #111);
	font-weight: var(--emcm-heading-font-weight, 600);
	font-size: var(--emcm-heading-font-size, 16px);
	padding: var(--emcm-cell-padding, 14px) var(--emcm-cell-padding, 12px);
	white-space: normal;
	overflow-wrap: anywhere;
	word-break: break-word;
	hyphens: auto;
	text-align: center;
}

.emcm-compare-table td.emcm-compare-table__cell {
	background: var(--emcm-feature-bg, #111);
	color: var(--emcm-feature-color, #fff);
	padding: var(--emcm-cell-padding, 14px) var(--emcm-cell-padding, 12px);
	font-size: var(--emcm-feature-font-size, 13px);
	font-weight: var(--emcm-feature-font-weight, 400);
	line-height: 1.4;
	word-break: break-word;
}

/* Back-compat if any older markup still uses the inner wrapper */
.emcm-compare-table__value {
	display: block;
	background: transparent;
	color: inherit;
	padding: 0;
}

.emcm-compare-table__product {
	background: var(--emcm-heading-bg, #d7d7d7);
	padding: 18px 14px;
	height: clamp(220px, 30vw, 320px);
	display: flex;
	flex-direction: column;
	gap: 10px;
	align-items: stretch;
	justify-content: flex-start;
	width: 100%;
	box-sizing: border-box;
	overflow: hidden;
}

.emcm-compare-table__product-top {
	flex: 1 1 auto;
	display: flex;
	flex-direction: column;
	gap: 10px;
	align-items: center;
	justify-content: flex-start;
	min-height: 0;
	width: 100%;
}

.emcm-compare-table__imgwrap {
	width: min(100%, var(--emcm-img-width, 100%));
	max-width: 100%;
	aspect-ratio: 1 / 1;
	height: auto;
	max-height: var(--emcm-img-max-height, 180px);
	flex: 0 0 auto;
	background: var(--emcm-img-bg, #fff) !important;
	border: 0 !important;
	box-shadow: none !important;
	border-radius: 4px;
	overflow: hidden;
	display: flex;
	align-items: center;
	justify-content: center;
}

.emcm-compare-table__img {
	width: 100% !important;
	height: 100% !important;
	max-width: 100% !important;
	max-height: 100% !important;
	object-fit: var(--emcm-img-fit, contain) !important;
	display: block;
}

.emcm-compare-table__img--placeholder {
	background: transparent !important;
	width: 100%;
	height: 100%;
	opacity: 0.6;
	object-fit: contain !important;
}

.emcm-compare-table__product-name {
	color: var(--emcm-heading-color, #111);
	font-weight: var(--emcm-heading-font-weight, 700);
	text-decoration: none;
	text-align: center;
	font-size: var(--emcm-heading-font-size, 14px);
	line-height: 1.25;
	display: -webkit-box;
	-webkit-line-clamp: 3;
	-webkit-box-orient: vertical;
	overflow: hidden;
	width: 100%;
	min-height: calc(3 * 1.25em);
	word-break: break-word;
	overflow-wrap: anywhere;
}

.emcm-compare-table__product-name:link,
.emcm-compare-table__product-name:visited,
.emcm-compare-table__product-name:hover,
.emcm-compare-table__product-name:active,
.emcm-compare-table__product-name:focus {
	color: var(--emcm-heading-color, #111) !important;
	text-decoration: none !important;
}

.emcm-compare-table__variant {
	width: 100%;
	text-align: center;
	font-size: calc(var(--emcm-feature-font-size, 13px) * 0.9);
	line-height: 1.25;
	color: rgba(0, 0, 0, 0.68);
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.emcm-compare-table__product-actions {
	display: flex;
	gap: 10px;
	align-items: stretch;
	justify-content: flex-start;
	width: 100%;
	flex-wrap: wrap;
}

/* Only real products (View Product) should baseline-align; empty columns stay centered */
.emcm-compare-table__product:not(.emcm-compare-table__product--empty)
	.emcm-compare-table__product-actions {
	margin-top: auto;
	align-items: center;
	justify-content: center;
}

.emcm-compare-table__select {
	background: var(--emcm-btn-bg, #111);
	color: var(--emcm-btn-text, #fff);
	border: 0;
	border-radius: var(--emcm-btn-border-radius, 6px);
	padding: var(--emcm-btn-padding, 10px) !important;
	cursor: pointer;
	font-size: var(--emcm-feature-font-size, 13px);
	font-weight: var(--emcm-feature-font-weight, 400);
	display: block !important;
	flex: var(--emcm-btn-flex, 1 1 0);
	min-width: 0;
	width: var(--emcm-btn-width, 100%) !important;
	box-sizing: border-box;
	text-align: center;
	text-decoration: none;
	opacity: 1 !important;
	visibility: visible !important;
	filter: none !important;
	transform: none !important;
}

/* Ensure anchor link states don't override btnText */
.emcm-compare-table__select:link,
.emcm-compare-table__select:visited,
.emcm-compare-table__select:hover,
.emcm-compare-table__select:active,
.emcm-compare-table__select:focus {
	background: var(--emcm-btn-bg, #111) !important;
	color: var(--emcm-btn-text, #fff) !important;
	opacity: 1 !important;
	visibility: visible !important;
	text-decoration: none;
}

.emcm-compare-table__select:disabled,
.emcm-compare-mobile__select:disabled {
	cursor: not-allowed;
	opacity: 0.6 !important;
}

.emcm-compare-table__remove {
	width: 34px;
	height: 34px;
	border-radius: 8px;
	border: 2px solid #d60000;
	color: #d60000;
	background: #fff;
	cursor: pointer;
	font-size: 18px;
	line-height: 1;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex: 0 0 34px;
}

@media (max-width: 768px) {
	.emcm-compare-page {
		width: calc(100vw - 24px);
		margin: 16px auto;
	}
}

@media (max-width: 480px) {
	/* mobile layout is cards; keep table rules minimal */
}

/* Mobile compare (no horizontal scroll) */
.emcm-compare-mobile__grid {
	display: grid;
	grid-template-columns: 1fr;
	gap: 12px;
	padding: var(--emcm-cell-padding, 12px);
}

.emcm-compare-mobile__card {
	background: var(--emcm-heading-bg, #d7d7d7);
	border: var(--emcm-border-width, 1px) solid
		var(--emcm-border-color, rgba(0, 0, 0, 0.12));
	border-radius: var(--emcm-border-radius, 10px);
	overflow: hidden;
}

.emcm-compare-mobile__top {
	padding: var(--emcm-cell-padding, 14px);
	display: grid;
	gap: 10px;
	justify-items: center;
}

.emcm-compare-mobile__imgwrap {
	width: min(100%, var(--emcm-img-width, 100%));
	max-width: 100%;
	aspect-ratio: 1 / 1;
	height: auto;
	max-height: var(--emcm-img-max-height, 220px);
	background: var(--emcm-img-bg, #fff) !important;
	border: 0 !important;
	box-shadow: none !important;
	border-radius: 8px;
	overflow: hidden;
	display: flex;
	align-items: center;
	justify-content: center;
}

.emcm-compare-mobile__img {
	width: 100% !important;
	height: 100% !important;
	max-width: 100% !important;
	max-height: 100% !important;
	object-fit: var(--emcm-img-fit, contain) !important;
	display: block;
}

.emcm-compare-mobile__img--placeholder {
	background: transparent !important;
	width: 100%;
	height: 100%;
	opacity: 0.6;
	object-fit: contain !important;
}

.emcm-compare-mobile__name {
	color: #111;
	font-weight: 700;
	text-decoration: none;
	text-align: center;
	font-size: 14px;
}

.emcm-compare-mobile__actions {
	width: 100%;
	display: flex;
	gap: 10px;
	align-items: stretch;
}

.emcm-compare-mobile__select {
	background: var(--emcm-btn-bg, #111);
	color: var(--emcm-btn-text, #fff);
	border: 0;
	border-radius: var(--emcm-btn-border-radius, 12px);
	padding: var(--emcm-btn-padding, 10px) !important;
	font-size: var(--emcm-feature-font-size, 13px);
	cursor: pointer;
	text-decoration: none;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: var(--emcm-btn-width, auto);
	flex: var(--emcm-btn-flex, 1 1 auto);
	opacity: 1 !important;
	visibility: visible !important;
	filter: none !important;
	transform: none !important;
}

.emcm-compare-mobile__select:link,
.emcm-compare-mobile__select:visited,
.emcm-compare-mobile__select:hover,
.emcm-compare-mobile__select:active,
.emcm-compare-mobile__select:focus {
	background: var(--emcm-btn-bg, #111) !important;
	color: var(--emcm-btn-text, #fff) !important;
	opacity: 1 !important;
	visibility: visible !important;
	text-decoration: none;
}

.emcm-compare-mobile__remove {
	width: 38px;
	height: 38px;
	border-radius: 10px;
	border: 2px solid #d60000;
	color: #d60000;
	background: #fff;
	cursor: pointer;
	font-size: 18px;
	line-height: 1;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex: 0 0 38px;
}

.emcm-compare-mobile__rows {
	background: var(--emcm-feature-bg, #111);
	color: var(--emcm-feature-color, #fff);
}

.emcm-compare-mobile__row {
	display: grid;
	grid-template-columns: 110px 1fr;
	gap: 10px;
	padding: var(--emcm-cell-padding, 14px);
	border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.emcm-compare-mobile__label {
	font-weight: var(--emcm-heading-font-weight, 600);
	color: var(--emcm-heading-color, #fff);
	opacity: 0.9;
}

.emcm-compare-mobile__val {
	font-weight: var(--emcm-feature-font-weight, 400);
	font-size: var(--emcm-feature-font-size, 13px);
	word-break: break-word;
}

.emcm-compare-mobile__card--empty .emcm-compare-mobile__top {
	min-height: 220px;
	align-content: center;
}

.emcm-compare-mobile__empty {
	width: 100%;
	display: flex;
	justify-content: center;
}

@media (min-width: 600px) and (max-width: 900px) {
	.emcm-compare-mobile__grid {
		grid-template-columns: 1fr 1fr;
	}
}

.emcm-compare-table__product--empty .emcm-compare-table__imgwrap,
.emcm-compare-table__product--empty .emcm-compare-table__product-name {
	display: none;
}

/* Empty columns: center the Select Products CTA */
.emcm-compare-table__product--empty {
	align-items: center;
}

.emcm-compare-table__product--empty .emcm-compare-table__product-actions {
	justify-content: center;
}

.emcm-compare-table__product--empty .emcm-compare-table__select {
	flex: 0 0 auto;
	width: auto !important;
	min-width: 160px;
}
