/* =========================================================================
   Joom - WPC Smart Wishlist: the wishlist page ([woosw_list]) and the
   plugin's popup, in the theme's look. Markup and behaviour are the
   plugin's own; colours set in its settings (notice colour) still apply.
   ========================================================================= */

.woosw-list,
.woosw-popup {
	--mj-ws-line: var(--border-color, #e7e5e4);
	--mj-ws-ink: var(--price-color, #111827);
	--mj-ws-muted: var(--light-text-color, #64748b);
}

/* --- Wishlist page: products as a grid of cards ---------------------------- */
.woosw-list .woosw-switcher {
	margin: 0 0 24px;
}

.woosw-list .woosw-name {
	display: flex;
	align-items: center;
	gap: 10px;
	color: var(--mj-ws-ink);
	font-size: 13px;
	font-weight: 600;
	letter-spacing: 0.12em;
	text-transform: uppercase;
}

.woosw-list .woosw-detail-rename-btn {
	padding: 0;
	border: 0;
	background: none;
	color: var(--mj-ws-muted);
	cursor: pointer;
}

.woosw-list table.woosw-items {
	display: block;
	width: 100%;
	margin: 0;
	border: 0;
}

.woosw-list table.woosw-items > tbody {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 32px 24px;
}

.woosw-list table.woosw-items tr.woosw-item {
	position: relative;
	display: flex;
	flex-direction: column;
	margin: 0;
	border: 0;
	background: none;
}

.woosw-list table.woosw-items tr.woosw-item > td,
.woosw-list table.woosw-items tr.woosw-item:hover > td {
	display: block;
	padding: 0;
	border: 0;
	background: none;
	text-align: left;
}

.woosw-list table.woosw-items tr.woosw-item td.woosw-item--image a {
	display: block;
}

.woosw-list table.woosw-items tr.woosw-item td.woosw-item--image img {
	display: block;
	border-radius: 0;
	width: 100%;
	height: auto;
	aspect-ratio: var(--mj-image-aspect-ratio, 4 / 5);
	object-fit: cover;
	background: color-mix(in srgb, var(--mj-ws-ink) 4%, #ffffff);
}

.woosw-list table.woosw-items .woosw-item .woosw-item--info {
	padding-top: 14px;
}

.woosw-list table.woosw-items .woosw-item .woosw-item--name a {
	color: var(--mj-ws-ink);
	font-size: 15px;
	font-weight: 500;
	line-height: 1.4;
	text-decoration: none;
}

.woosw-list table.woosw-items .woosw-item .woosw-item--name a:hover {
	text-decoration: underline;
	text-underline-offset: 3px;
}

.woosw-list table.woosw-items .woosw-item .woosw-item--price,
.woosw-popup .woosw-items .woosw-item .woosw-item--price {
	margin-top: 6px;
	color: var(--mj-ws-ink);
	font-size: 15px;
	font-weight: 600;
}

.woosw-list table.woosw-items .woosw-item .woosw-item--price del,
.woosw-popup .woosw-items .woosw-item .woosw-item--price del {
	margin-right: 6px;
	color: var(--regular-price-color, #94a3b8);
	font-weight: 400;
}

.woosw-list table.woosw-items .woosw-item .woosw-item--price ins,
.woosw-popup .woosw-items .woosw-item .woosw-item--price ins {
	color: var(--sale-price-color, #b45309);
	text-decoration: none;
}

.woosw-list table.woosw-items .woosw-item .woosw-item--time,
.woosw-popup .woosw-items .woosw-item .woosw-item--time {
	margin-top: 4px;
	color: var(--mj-ws-muted);
	font-size: 12px;
}

.woosw-list table.woosw-items .woosw-item .woosw-item--actions {
	margin-top: auto;
	padding-top: 14px;
}

.woosw-list table.woosw-items .woosw-item .woosw-item--stock:empty {
	display: none;
}

.woosw-list table.woosw-items .woosw-item .woosw-item--atc .add_to_cart_inline {
	margin: 0;
	padding: 0;
	border: 0;
}

.woosw-list table.woosw-items .woosw-item .woosw-item--atc .button,
.woosw-popup .woosw-items .woosw-item .woosw-item--atc .button {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	height: 44px;
	margin: 0;
	padding: 0 14px;
	border: 1px solid color-mix(in srgb, var(--mj-ws-ink) 70%, transparent);
	border-radius: 0;
	background: #ffffff;
	color: var(--mj-ws-ink);
	font-size: 12px;
	font-weight: 600;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	text-decoration: none;
}

.woosw-list table.woosw-items .woosw-item .woosw-item--atc .button:hover,
.woosw-popup .woosw-items .woosw-item .woosw-item--atc .button:hover {
	background: var(--mj-ws-ink);
	color: #ffffff;
}

.woosw-list table.woosw-items .woosw-item .woosw-item--atc .added_to_cart {
	display: block;
	margin-top: 8px;
	color: var(--mj-ws-ink);
	font-size: 13px;
	text-align: center;
}

/* Remove: a small round × on the photo */
.woosw-list table.woosw-items tr.woosw-item > td.woosw-item--remove {
	position: absolute;
	top: 10px;
	right: 10px;
	z-index: 1;
}

.woosw-list table.woosw-items .woosw-item .woosw-item--remove span,
.woosw-popup .woosw-items .woosw-item .woosw-item--remove span {
	display: grid;
	place-items: center;
	width: 32px;
	height: 32px;
	border-radius: 50%;
	background: #ffffff;
	box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
	color: var(--mj-ws-ink);
	font-size: 0;
	cursor: pointer;
}

.woosw-list table.woosw-items .woosw-item .woosw-item--remove span::before,
.woosw-popup .woosw-items .woosw-item .woosw-item--remove span::before {
	content: "";
	width: 12px;
	height: 12px;
	background: currentColor;
	font-family: inherit;
	-webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round'%3E%3Cpath d='M5 5l14 14M19 5 5 19'/%3E%3C/svg%3E") center / contain no-repeat;
	mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round'%3E%3Cpath d='M5 5l14 14M19 5 5 19'/%3E%3C/svg%3E") center / contain no-repeat;
}

.woosw-list table.woosw-items .woosw-item .woosw-item--remove span:hover,
.woosw-popup .woosw-items .woosw-item .woosw-item--remove span:hover {
	background: var(--mj-ws-ink);
	color: #ffffff;
}

/* Share link */
.woosw-list .woosw-actions {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	margin-top: 40px;
	padding-top: 24px;
	border-top: 1px solid var(--mj-ws-line);
}

.woosw-list .woosw-copy {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 10px;
	font-size: 13px;
}

.woosw-list .woosw-copy-label {
	color: var(--mj-ws-muted);
}

.woosw-list .woosw-copy-url input {
	width: min(340px, 70vw);
	height: 40px;
	margin: 0;
	padding: 0 12px;
	border: 1px solid var(--mj-ws-line);
	border-radius: 0;
	background: color-mix(in srgb, var(--mj-ws-ink) 3%, #ffffff);
	color: var(--text-color, #334155);
	font-size: 13px;
}

.woosw-list .woosw-copy-btn .button {
	height: 40px;
	margin: 0;
	padding: 0 18px;
	border: 1px solid var(--mj-ws-ink);
	border-radius: 0;
	background: var(--mj-ws-ink);
	color: #ffffff;
	font-size: 12px;
	font-weight: 600;
	letter-spacing: 0.12em;
	text-transform: uppercase;
}

.woosw-list .woosw-share {
	display: flex;
	align-items: center;
	gap: 8px;
	font-size: 13px;
}

/* Empty list */
.woosw-list .woosw-empty,
.woosw-popup .woosw-empty {
	padding: 48px 16px;
	color: var(--mj-ws-muted);
	font-size: 15px;
	text-align: center;
}

@media (max-width: 1024px) {
	.woosw-list table.woosw-items > tbody {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}
}

@media (max-width: 767px) {
	.woosw-list table.woosw-items > tbody {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 24px 12px;
	}

	.woosw-list table.woosw-items .woosw-item .woosw-item--name a {
		font-size: 14px;
	}

	.woosw-list table.woosw-items .woosw-item .woosw-item--atc .button {
		height: 40px;
		font-size: 11px;
		letter-spacing: 0.08em;
	}
}

/* --- Popup after adding to the wishlist ------------------------------------- */
.woosw-popup .woosw-popup-inner .woosw-popup-content {
	border-radius: 0;
	background: #ffffff;
	box-shadow: 0 20px 60px rgba(0, 0, 0, 0.18);
}

.woosw-popup .woosw-popup-inner .woosw-popup-content .woosw-popup-content-top {
	display: flex;
	align-items: center;
	gap: 8px;
	height: auto;
	padding: 18px 56px 18px 22px;
	border-bottom: 1px solid var(--mj-ws-line);
	background: #ffffff;
	color: var(--mj-ws-ink);
	font-family: var(--mj-display-font, inherit);
	font-size: 22px;
	font-weight: 500;
	line-height: 1.2;
	text-transform: none;
}

body.joom-header-premium .woosw-popup {
	--mj-display-font: "Cormorant Garamond", "Playfair Display", Georgia, serif;
}

.woosw-popup .woosw-popup-inner .woosw-popup-content .woosw-popup-content-top .woosw-count-wrapper {
	color: var(--mj-ws-muted);
	font-size: 0.7em;
}

.woosw-popup .woosw-popup-inner .woosw-popup-content .woosw-popup-content-top .woosw-count-wrapper::before {
	content: "(";
}

.woosw-popup .woosw-popup-inner .woosw-popup-content .woosw-popup-content-top .woosw-count-wrapper::after {
	content: ")";
}

.woosw-popup .woosw-popup-inner .woosw-popup-content .woosw-popup-content-top .woosw-count,
.woosw-popup .woosw-popup-inner .woosw-popup-content .woosw-popup-content-top .woosw-count-wrapper .woosw-count {
	margin: 0;
	padding: 0;
	background: none;
	color: inherit;
	font-size: inherit;
}

.woosw-popup .woosw-popup-inner .woosw-popup-content .woosw-popup-content-top .woosw-popup-close {
	color: var(--mj-ws-ink);
}

.woosw-popup .woosw-popup-inner .woosw-popup-content .woosw-popup-content-mid .woosw-item {
	border-bottom: 1px solid var(--mj-ws-line);
}

.woosw-popup .woosw-items .woosw-item {
	position: relative;
}

.woosw-popup .woosw-items .woosw-item .woosw-item-inner {
	display: grid;
	grid-template-columns: 64px minmax(0, 1fr) auto;
	gap: 14px;
	align-items: center;
	padding: 16px 22px 16px 54px;
}

.woosw-popup .woosw-items .woosw-item .woosw-item--remove {
	position: absolute;
	left: 14px;
}

.woosw-popup .woosw-items .woosw-item .woosw-item--remove span {
	width: 28px;
	height: 28px;
	box-shadow: none;
}

.woosw-popup .woosw-items .woosw-item .woosw-item--image img {
	width: 64px;
	height: 80px;
	object-fit: cover;
}

.woosw-popup .woosw-items .woosw-item .woosw-item--name a {
	color: var(--mj-ws-ink);
	font-size: 14px;
	font-weight: 500;
	text-decoration: none;
}

.woosw-popup .woosw-items .woosw-item .woosw-item--atc .button {
	height: 38px;
	font-size: 11px;
	letter-spacing: 0.1em;
	white-space: nowrap;
}

.woosw-popup .woosw-items .woosw-item .woosw-item--stock:empty,
.woosw-popup .woosw-items .woosw-item .woosw-item--stock .stock {
	display: none;
}

.woosw-popup .woosw-popup-inner .woosw-popup-content .woosw-popup-content-bot {
	background: #ffffff;
}

.woosw-popup .woosw-popup-inner .woosw-popup-content .woosw-popup-content-bot .woosw-popup-content-bot-inner {
	padding: 16px 22px;
	border-top: 1px solid var(--mj-ws-line);
	font-size: 13px;
	font-weight: 600;
	letter-spacing: 0.08em;
	text-transform: uppercase;
}

.woosw-popup .woosw-popup-inner .woosw-popup-content .woosw-popup-content-bot .woosw-popup-content-bot-inner a {
	color: var(--mj-ws-ink);
	text-decoration: none;
}

.woosw-popup .woosw-popup-inner .woosw-popup-content .woosw-popup-content-bot .woosw-popup-content-bot-inner a:hover {
	text-decoration: underline;
	text-underline-offset: 3px;
}

.woosw-popup .woosw-notice {
	font-size: 13px;
	font-weight: 500;
	letter-spacing: 0;
	text-transform: none;
}
