/**
 * Wishlist and compare widgets.
 *
 * @package CommerceForgeUI
 */

.cforge-ui-saved-products__clear,
.cforge-ui-saved-products__remove {
	border: 0;
	cursor: pointer;
	font: inherit;
}

.cforge-ui-saved-products__clear {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 40px;
	padding: 0 18px;
	border-radius: var(--cforge-ui-radius-button, 8px);
	background: var(--cforge-ui-color-surface-soft, #f1f3f5);
	color: var(--cforge-ui-color-text, #212529);
	font-weight: 700;
	transition: background-color 0.2s ease, color 0.2s ease;
}

.cforge-ui-saved-products__clear:hover,
.cforge-ui-saved-products__clear:focus-visible {
	background: var(--cforge-ui-color-primary, #ef233c);
	color: #fff;
}

.cforge-ui-saved-products__remove {
	position: absolute;
	z-index: 30;
	top: 12px;
	right: 12px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 30px;
	height: 30px;
	border-radius: 999px;
	background: var(--cforge-ui-color-danger, #ef233c);
	color: #fff;
	font-size: 20px;
	font-weight: 700;
	line-height: 1;
	box-shadow: 0 10px 24px rgba(15, 23, 42, 0.14);
	pointer-events: auto;
}

.cforge-ui-saved-products__remove:hover,
.cforge-ui-saved-products__remove:focus-visible {
	background: var(--cforge-ui-color-primary-hover, #d81d33);
}

.cforge-ui-wishlist-page__cell,
.cforge-ui-compare-table th[data-cforge-saved-product] {
	position: relative;
}

.cforge-ui-wishlist-page__cell {
	isolation: isolate;
}

.cforge-ui-wishlist-page--list .cforge-ui-wishlist-page__grid {
	--cforge-product-collection-columns: 1;
}

.cforge-ui-wishlist-page--list .cforge-ui-product-card {
	width: 100%;
}

.cforge-ui-wishlist-page--list .cforge-ui-saved-products__remove {
	top: 16px;
	right: 16px;
}

.cforge-ui-wishlist-page__table-wrap {
	width: 100%;
	overflow-x: auto;
}

.cforge-ui-wishlist-page__table {
	width: 100%;
	min-width: 900px;
	border: 0;
	border-collapse: collapse;
	border-spacing: 0;
	color: var(--cforge-ui-color-text, #212529);
}

.cforge-ui-wishlist-page__table,
.cforge-ui-wishlist-page__table thead,
.cforge-ui-wishlist-page__table tbody,
.cforge-ui-wishlist-page__table tr,
.cforge-ui-wishlist-page__table th,
.cforge-ui-wishlist-page__table td {
	border-left: 0 !important;
	border-right: 0 !important;
}

.cforge-ui-wishlist-page__table th,
.cforge-ui-wishlist-page__table td {
	padding: 20px 18px;
	border: 0;
	vertical-align: middle;
	text-align: left;
	background: transparent;
	box-shadow: none;
	outline: 0;
}

.cforge-ui-wishlist-page__table thead th {
	border: 0;
}

.cforge-ui-wishlist-page__table tbody tr {
	background: transparent;
}

.cforge-ui-wishlist-page__table tbody tr > td {
	background: inherit;
}

.cforge-ui-wishlist-page__table-wrap--lines-top .cforge-ui-wishlist-page__table th,
.cforge-ui-wishlist-page__table-wrap--lines-top .cforge-ui-wishlist-page__table td,
.cforge-ui-wishlist-page__table-wrap--lines-both .cforge-ui-wishlist-page__table th,
.cforge-ui-wishlist-page__table-wrap--lines-both .cforge-ui-wishlist-page__table td {
	border-top: 1px solid var(--cforge-ui-color-border, #e4e7ec);
}

.cforge-ui-wishlist-page__table-wrap--lines-bottom .cforge-ui-wishlist-page__table th,
.cforge-ui-wishlist-page__table-wrap--lines-bottom .cforge-ui-wishlist-page__table td,
.cforge-ui-wishlist-page__table-wrap--lines-both .cforge-ui-wishlist-page__table th,
.cforge-ui-wishlist-page__table-wrap--lines-both .cforge-ui-wishlist-page__table td {
	border-bottom: 1px solid var(--cforge-ui-color-border, #e4e7ec);
}

.cforge-ui-wishlist-page__table-wrap--compact .cforge-ui-wishlist-page__table th,
.cforge-ui-wishlist-page__table-wrap--compact .cforge-ui-wishlist-page__table td {
	padding-top: 14px;
	padding-bottom: 14px;
}

.cforge-ui-wishlist-page__table-wrap--spacious .cforge-ui-wishlist-page__table th,
.cforge-ui-wishlist-page__table-wrap--spacious .cforge-ui-wishlist-page__table td {
	padding-top: 28px;
	padding-bottom: 28px;
}

.cforge-ui-wishlist-page__table th {
	color: var(--cforge-ui-color-muted, #adb5bd);
	font-size: 14px;
	font-weight: 800;
	line-height: 1.2;
}

.cforge-ui-wishlist-page__table-image {
	width: 120px;
}

.cforge-ui-wishlist-page__table-image img {
	display: block;
	width: 76px;
	height: 76px;
	object-fit: contain;
}

.cforge-ui-wishlist-page__table-product {
	min-width: 260px;
}

.cforge-ui-wishlist-page__table-title {
	color: var(--cforge-ui-color-heading, #111827);
	font-size: 18px;
	font-weight: 500;
	line-height: 1.35;
	text-decoration: none;
}

.cforge-ui-wishlist-page__table-title:hover,
.cforge-ui-wishlist-page__table-title:focus-visible {
	color: var(--cforge-ui-color-primary, #ef233c);
}

.cforge-ui-wishlist-page__table-price {
	min-width: 180px;
	font-size: 18px;
	white-space: nowrap;
}

.cforge-ui-wishlist-page__table-price del {
	color: var(--cforge-ui-color-muted, #868e96);
}

.cforge-ui-wishlist-page__table-price ins {
	color: var(--cforge-ui-color-heading, #111827);
	text-decoration: none;
}

.cforge-ui-wishlist-page__table-date {
	min-width: 150px;
	color: var(--cforge-ui-color-text, #212529);
	white-space: nowrap;
}

.cforge-ui-wishlist-page__table-stock {
	min-width: 130px;
	white-space: nowrap;
}

.cforge-ui-wishlist-page__stock--in-stock {
	color: var(--cforge-ui-color-success, #099268);
}

.cforge-ui-wishlist-page__stock--out-of-stock {
	color: var(--cforge-ui-color-danger, #ef233c);
}

.cforge-ui-wishlist-page__table-action {
	width: 180px;
}

.cforge-ui-wishlist-page__add-to-cart {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 52px;
	min-width: 150px;
	padding: 0 24px;
	border-radius: var(--cforge-ui-radius-button, 12px);
	background: var(--cforge-ui-color-primary, #ef233c);
	color: #fff;
	border: 1px solid transparent;
	font-weight: 800;
	line-height: 1;
	text-align: center;
	text-decoration: none;
}

.cforge-ui-wishlist-page__add-to-cart:hover,
.cforge-ui-wishlist-page__add-to-cart:focus-visible {
	background: var(--cforge-ui-color-primary-hover, #d81d33);
	color: #fff;
}

.cforge-ui-wishlist-page__table-remove {
	width: 48px;
	text-align: right;
}

.cforge-ui-wishlist-page__table .cforge-ui-saved-products__remove {
	position: static;
	width: auto;
	height: auto;
	border-radius: 0;
	background: transparent;
	color: var(--cforge-ui-color-heading, #111827);
	font-size: 24px;
	box-shadow: none;
}

.cforge-ui-wishlist-page__table .cforge-ui-saved-products__remove:hover,
.cforge-ui-wishlist-page__table .cforge-ui-saved-products__remove:focus-visible {
	background: transparent;
	color: var(--cforge-ui-color-primary, #ef233c);
}

.cforge-ui-wishlist-page .is-hidden,
.cforge-ui-compare-table .is-hidden {
	display: none;
}

.cforge-ui-compare-table {
	--cforge-compare-border: var(--cforge-ui-color-border, #e4e7ec);
	color: var(--cforge-ui-color-text, #212529);
}

.cforge-ui-compare-table__header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	margin-bottom: 20px;
}

.cforge-ui-compare-table__title {
	margin: 0;
	color: var(--cforge-ui-color-heading, #111827);
	font-size: clamp(24px, 2.2vw, 34px);
	line-height: 1.15;
}

.cforge-ui-compare-table__empty {
	padding: 28px;
	border: 1px dashed var(--cforge-compare-border);
	border-radius: var(--cforge-ui-radius-card, 10px);
	background: var(--cforge-ui-color-surface-soft, #f8fafc);
	color: var(--cforge-ui-color-muted, #868e96);
	text-align: center;
}

.cforge-ui-compare-table__scroller {
	overflow-x: auto;
	border: 1px solid var(--cforge-compare-border);
	border-radius: var(--cforge-ui-radius-card, 10px);
	background: var(--cforge-ui-color-surface, #fff);
}

.cforge-ui-compare-table__table {
	width: 100%;
	min-width: 760px;
	border-collapse: collapse;
}

.cforge-ui-compare-table__table th,
.cforge-ui-compare-table__table td {
	padding: 16px;
	border-bottom: 1px solid var(--cforge-compare-border);
	border-right: 1px solid var(--cforge-compare-border);
	vertical-align: top;
	text-align: left;
}

.cforge-ui-compare-table__table tr:last-child th,
.cforge-ui-compare-table__table tr:last-child td {
	border-bottom: 0;
}

.cforge-ui-compare-table__table th:last-child,
.cforge-ui-compare-table__table td:last-child {
	border-right: 0;
}

.cforge-ui-compare-table__table thead th {
	min-width: 210px;
	background: var(--cforge-ui-color-surface-soft, #f8fafc);
}

.cforge-ui-compare-table__table thead th:first-child {
	width: 160px;
	min-width: 160px;
	color: var(--cforge-ui-color-muted, #868e96);
}

.cforge-ui-compare-table__table img {
	display: block;
	width: 120px;
	height: 120px;
	margin-bottom: 12px;
	border-radius: var(--cforge-ui-radius-image, 8px);
	object-fit: contain;
	background: #fff;
}

.cforge-ui-compare-table__product-title {
	display: inline-block;
	color: var(--cforge-ui-color-heading, #111827);
	font-weight: 800;
	text-decoration: none;
}

.cforge-ui-compare-table__product-title:hover,
.cforge-ui-compare-table__product-title:focus-visible {
	color: var(--cforge-ui-color-primary, #ef233c);
}

.cforge-ui-saved-count {
	position: relative;
	display: inline-flex;
	align-items: center;
	gap: 8px;
	min-height: 40px;
	padding: 8px 12px;
	border-radius: 999px;
	color: var(--cforge-ui-color-text, #212529);
	font-weight: 800;
	text-decoration: none;
}

.cforge-ui-wishlist-experience--badge-top_right .cforge-ui-saved-count,
.cforge-ui-wishlist-experience--badge-top_left .cforge-ui-saved-count {
	overflow: visible;
}

.cforge-ui-saved-count:hover,
.cforge-ui-saved-count:focus-visible {
	color: var(--cforge-ui-color-primary, #ef233c);
}

.cforge-ui-saved-count__icon {
	font-size: 20px;
	line-height: 1;
}

.cforge-ui-saved-count__badge {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 22px;
	height: 22px;
	padding: 0 6px;
	border-radius: 999px;
	background: var(--cforge-ui-color-primary, #ef233c);
	color: #fff;
	font-size: 12px;
	line-height: 1;
}

.cforge-ui-wishlist-experience--badge-top_right .cforge-ui-saved-count__badge,
.cforge-ui-wishlist-experience--badge-top_left .cforge-ui-saved-count__badge {
	position: absolute;
	top: -8px;
	z-index: 2;
	box-shadow: 0 8px 18px rgba(239, 35, 60, 0.22);
	transform: translate(var(--cforge-saved-badge-offset-x, 0), var(--cforge-saved-badge-offset-y, 0));
}

.cforge-ui-wishlist-experience--badge-top_right .cforge-ui-saved-count__badge {
	right: -8px;
}

.cforge-ui-wishlist-experience--badge-top_left .cforge-ui-saved-count__badge {
	left: -8px;
}

.cforge-ui-saved-experience {
	position: relative;
	color: var(--cforge-ui-color-text, #212529);
}

.cforge-ui-saved-experience__trigger {
	border: 0;
	background: transparent;
	cursor: pointer;
}

.cforge-ui-saved-experience__trigger:focus-visible,
.cforge-ui-saved-drawer__close:focus-visible,
.cforge-ui-saved-drawer__overlay:focus-visible {
	outline: 2px solid var(--cforge-ui-color-primary, #ef233c);
	outline-offset: 3px;
}

.cforge-ui-saved-experience__header {
	gap: 12px;
}

.cforge-ui-saved-dropdown {
	position: absolute;
	z-index: 999;
	top: calc(100% + 10px);
	right: 0;
	display: none;
	width: min(420px, calc(100vw - 32px));
	padding: 18px;
	border: 1px solid var(--cforge-ui-color-border, #e4e7ec);
	border-radius: var(--cforge-ui-radius-card, 10px);
	background: var(--cforge-ui-color-surface, #fff);
	box-shadow: 0 24px 70px rgba(15, 23, 42, 0.16);
}

.cforge-ui-saved-dropdown.is-open,
.cforge-ui-saved-drawer.is-open {
	display: block;
}

.cforge-ui-saved-experience__items {
	display: grid;
	gap: 12px;
	max-height: 68vh;
	overflow: auto;
	padding-right: 2px;
}

.cforge-ui-saved-experience__items .cforge-ui-product-collection__cell {
	position: relative;
}

.cforge-ui-saved-experience__items .cforge-ui-product-card {
	width: 100%;
}

.cforge-ui-saved-experience__items .cforge-ui-saved-products__remove {
	top: 8px;
	right: 8px;
	width: 26px;
	height: 26px;
	font-size: 16px;
}

.cforge-ui-saved-drawer {
	position: fixed;
	z-index: 100000;
	inset: 0;
	display: none;
}

.cforge-ui-saved-drawer__overlay {
	position: absolute;
	inset: 0;
	border: 0;
	background: rgba(15, 23, 42, 0.48);
	cursor: pointer;
}

.cforge-ui-saved-drawer__panel {
	position: absolute;
	top: 0;
	right: 0;
	width: min(520px, 100vw);
	height: 100%;
	padding: 28px;
	overflow: auto;
	background: var(--cforge-ui-color-surface, #fff);
	box-shadow: -24px 0 70px rgba(15, 23, 42, 0.2);
}

.cforge-ui-saved-drawer__close {
	position: absolute;
	top: 14px;
	right: 14px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 34px;
	height: 34px;
	border: 0;
	border-radius: 999px;
	background: var(--cforge-ui-color-surface-soft, #f1f3f5);
	color: var(--cforge-ui-color-heading, #111827);
	font-size: 22px;
	line-height: 1;
	cursor: pointer;
}

body.cforge-ui-saved-drawer-open {
	overflow: hidden;
}

.cforge-ui-wishlist-added-popup {
	position: fixed;
	z-index: 100020;
	inset: 0;
	display: grid;
	place-items: center;
	padding: 24px;
	background: transparent !important;
}

.cforge-ui-wishlist-added-popup__overlay {
	position: absolute;
	inset: 0;
	border: 0;
	border-radius: 0;
	background: rgba(15, 23, 42, 0.44) !important;
	box-shadow: none;
	opacity: 1;
	cursor: pointer;
}

.cforge-ui-wishlist-added-popup__dialog {
	position: relative;
	z-index: 1;
	width: min(450px, calc(100vw - 32px));
	padding: 46px 48px;
	border: 1px solid var(--cforge-ui-color-border, #e4e7ec);
	border-radius: 0;
	background: var(--cforge-ui-color-surface, #fff);
	box-shadow: 0 30px 90px rgba(15, 23, 42, 0.24);
	text-align: center;
}

.cforge-ui-wishlist-added-popup__message {
	margin: 0 0 18px;
	color: var(--cforge-ui-color-heading, #111827);
	font-size: 18px;
	line-height: 1.35;
}

.cforge-ui-wishlist-added-popup__message strong {
	font-weight: 800;
}

.cforge-ui-wishlist-added-popup__button {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	min-height: 52px;
	margin-top: 14px;
	border: 0;
	border-radius: var(--cforge-ui-radius-button, 10px);
	background: var(--cforge-ui-color-primary, #ef233c);
	color: #fff;
	font: inherit;
	font-size: 18px;
	font-weight: 800;
	line-height: 1;
	text-decoration: none;
	cursor: pointer;
	transition: background-color 0.2s ease, transform 0.2s ease;
}

.cforge-ui-wishlist-added-popup__button:hover,
.cforge-ui-wishlist-added-popup__button:focus-visible {
	background: var(--cforge-ui-color-primary-hover, #d81d33);
	color: #fff;
	transform: translateY(-1px);
}

.cforge-ui-compare-experience .cforge-ui-saved-drawer__panel {
	width: min(860px, 100vw);
}

@media (max-width: 767px) {
	.cforge-ui-wishlist-page__table {
		min-width: 0;
	}

	.cforge-ui-wishlist-page__table,
	.cforge-ui-wishlist-page__table thead,
	.cforge-ui-wishlist-page__table tbody,
	.cforge-ui-wishlist-page__table tr,
	.cforge-ui-wishlist-page__table th,
	.cforge-ui-wishlist-page__table td {
		display: block;
	}

	.cforge-ui-wishlist-page__table thead {
		display: none;
	}

	.cforge-ui-wishlist-page__table-row {
		position: relative;
		padding: 18px 0;
	}

	.cforge-ui-wishlist-page__table-row:last-child {
		border-bottom-color: transparent;
	}

	.cforge-ui-wishlist-page__table td {
		padding: 8px 52px 8px 112px;
		border-bottom: 0;
	}

	.cforge-ui-wishlist-page__table-image {
		position: absolute;
		top: 18px;
		left: 0;
		width: 88px;
		padding: 0;
	}

	.cforge-ui-wishlist-page__table-image img {
		width: 72px;
		height: 72px;
	}

	.cforge-ui-wishlist-page__table-product {
		min-width: 0;
	}

	.cforge-ui-wishlist-page__table-title {
		font-size: 16px;
	}

	.cforge-ui-wishlist-page__table-price,
	.cforge-ui-wishlist-page__table-date,
	.cforge-ui-wishlist-page__table-stock,
	.cforge-ui-wishlist-page__table-action {
		width: auto;
		min-width: 0;
	}

	.cforge-ui-wishlist-page__table-price::before,
	.cforge-ui-wishlist-page__table-date::before,
	.cforge-ui-wishlist-page__table-stock::before {
		content: attr(data-label) ": ";
		color: var(--cforge-ui-color-muted, #868e96);
		font-size: 12px;
		font-weight: 800;
		text-transform: uppercase;
	}

	.cforge-ui-wishlist-page__table-action {
		padding-top: 14px;
	}

	.cforge-ui-wishlist-page__add-to-cart {
		width: 100%;
		min-width: 0;
	}

	.cforge-ui-wishlist-page__table-remove {
		position: absolute;
		top: 18px;
		right: 0;
		width: auto;
		padding: 0;
	}

	.cforge-ui-compare-table__header {
		align-items: flex-start;
		flex-direction: column;
	}

	.cforge-ui-saved-count__label {
		display: none;
	}

	.cforge-ui-saved-drawer__panel {
		padding: 22px 16px;
	}
}
