/*
 * The Slab: member wishlist (theslab-membership 1.3.0).
 *
 * UI kit tokens only (var(--tsl-*), Additional CSS section 20); the value after each
 * var() is the kit's own. Four parts: the header icon, the heart on cards and product
 * pages, the sign-in prompt, and My Account > Wishlist.
 */

/* ---- 1. Header: a heart beside Account, same 44px icon target ----------------
   The nav menu item carries the class tsl-nav-wishlist and the same markup as
   Account (an icon span + a label span). Additional CSS section 13 already shows
   .tsl-ico in the desktop nav and hides .tsl-acct-label there; below 1025px the word
   "Wishlist" shows in the dropdown, exactly as "Account" does. */
.elementor-location-header .tsl-ico-heart {
	--tsl-ico: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyNCAyNCIgZmlsbD0ibm9uZSIgc3Ryb2tlPSIjMDAwIiBzdHJva2Utd2lkdGg9IjIiIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIgc3Ryb2tlLWxpbmVqb2luPSJyb3VuZCI+PHBhdGggZD0iTTIwLjggNC42YTUuNSA1LjUgMCAwIDAtNy44IDBMMTIgNS43bC0xLTEuMWE1LjUgNS41IDAgMCAwLTcuOCA3LjhsMSAxLjFMMTIgMjFsNy44LTcuNSAxLTEuMWE1LjUgNS41IDAgMCAwIDAtNy44eiIvPjwvc3ZnPg==");
}
@media (min-width: 1025px) {
	.elementor-location-header .elementor-nav-menu--main .tsl-nav-wishlist > a.elementor-item {
		display: inline-flex !important;
		align-items: center !important;
		justify-content: center !important;
		width: var(--tsl-ctl, 44px) !important;
		height: var(--tsl-ctl, 44px) !important;
		padding: 0 !important;
		border-radius: var(--tsl-radius, 4px) !important;
	}
	.elementor-location-header .elementor-nav-menu--main .tsl-nav-wishlist > a.elementor-item:hover {
		background-color: rgba(255, 255, 255, 0.14) !important;
	}
}

/* ---- 2. The heart --------------------------------------------------------------
   A member's heart is a <button>, a signed-out visitor's an <a>. The kit's button
   rules (Elementor Site Settings, `.elementor-kit-68 button`, and the WooCommerce
   button list in Additional CSS section 20) would turn the <button> into a dark
   primary button, so every property they set is pinned here, on a selector that
   out-ranks them, and both states look the same: a white disc over the card image. */
.tsl-wish {
	margin: 0;
	padding: 0;
}

form.tsl-wish button.tsl-wish__btn,
a.tsl-wish {
	display: inline-flex !important;
	align-items: center !important;
	justify-content: center !important;
	gap: 8px !important;
	width: auto !important;
	min-width: var(--tsl-ctl, 44px) !important;
	min-height: var(--tsl-ctl, 44px) !important;
	margin: 0 !important;
	padding: 0 !important;
	border: 0 !important;
	border-radius: 999px !important;
	background: var(--tsl-white, #fff) !important;
	color: var(--tsl-nightgame, #003340) !important;
	font-family: inherit !important;
	font-size: 14px !important;
	font-weight: 600 !important;
	letter-spacing: normal !important;
	line-height: 1 !important;
	text-transform: none !important;
	text-decoration: none !important;
	cursor: pointer;
	box-shadow: 0 1px 4px rgba(0, 32, 41, 0.3) !important;
	transition: color var(--tsl-motion, 150ms ease-out);
}

.tsl-wish__icon {
	width: 22px;
	height: 22px;
	flex: none;
	fill: transparent;
	stroke: currentColor;
	stroke-width: 2;
	stroke-linejoin: round;
	transition: fill var(--tsl-motion, 150ms ease-out);
}

form.tsl-wish button.tsl-wish__btn:hover,
a.tsl-wish:hover,
form.tsl-wish button.tsl-wish__btn[aria-pressed="true"] {
	color: var(--tsl-red, #EF3B3A) !important;
	background: var(--tsl-white, #fff) !important;
}

form.tsl-wish button.tsl-wish__btn[aria-pressed="true"] .tsl-wish__icon {
	fill: currentColor;
}

form.tsl-wish button.tsl-wish__btn[aria-busy="true"] {
	cursor: progress;
}

form.tsl-wish button.tsl-wish__btn:focus-visible,
a.tsl-wish:focus-visible {
	outline: var(--tsl-focus-width, 2px) solid var(--tsl-focus-on-light, #003340) !important;
	outline-offset: 2px !important;
}

/* On a card: pinned to the top-right corner of the image. The Loop Item template's
   Shortcode widget carries tsl-wish-slot; absolute positioning takes it out of the
   card's flex flow, so it adds no gap. */
.e-loop-item:has(.tsl-wish-slot) {
	position: relative;
}
.e-loop-item .tsl-wish-slot {
	position: absolute !important;
	top: 10px;
	right: 10px;
	z-index: 2;
	width: auto !important;
	margin: 0 !important;
}

/* On a product page: a labelled, outlined pill beside the Add to Cart form. */
.tsl-wish--single {
	margin-top: 12px;
}
form.tsl-wish--single button.tsl-wish__btn,
a.tsl-wish.tsl-wish--single {
	padding: 0 18px 0 14px !important;
	border: var(--tsl-btn-border-width, 2px) solid currentColor !important;
	border-radius: var(--tsl-radius-control, 4px) !important;
	box-shadow: none !important;
}
.tsl-wish--loop {
	margin-top: 8px;
}

/* Visually hidden live region for the script's announcements. */
.tsl-wish-live {
	position: absolute !important;
	width: 1px;
	height: 1px;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
}

/* ---- 3. Above the sign-in form, when the visitor came from a heart -------------- */
.tsl-wish-prompt {
	margin: 0 0 24px;
	padding: 16px 20px;
	border-left: 4px solid var(--tsl-red, #EF3B3A);
	border-radius: var(--tsl-radius-control, 4px);
	background: var(--tsl-surface-tint, #E0E7E8);
}
.tsl-wish-prompt p {
	margin: 0;
}

/* ---- 4. My Account > Wishlist ------------------------------------------------------ */
.tsl-wishlist__pending {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 12px 20px;
	margin: 0 0 24px;
	padding: 16px 20px;
	border-radius: var(--tsl-radius-control, 4px);
	background: var(--tsl-surface-tint, #E0E7E8);
}
.tsl-wishlist__pending p {
	margin: 0;
}

.tsl-wishlist__bar {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	margin: 0 0 8px;
}
.tsl-wishlist__bar p,
.tsl-wishlist__bar form {
	margin: 0;
}

.tsl-wishlist__items {
	margin: 0;
	padding: 0;
	list-style: none;
}

.tsl-wishlist__item {
	display: grid;
	grid-template-columns: 96px minmax(0, 1fr);
	gap: 16px;
	margin: 0;
	padding: 16px 0;
	border-top: 1px solid var(--tsl-surface-tint, #E0E7E8);
}
@media (min-width: 768px) {
	.tsl-wishlist__item {
		grid-template-columns: 120px minmax(0, 1fr);
		gap: 24px;
	}
}

.tsl-wishlist__img img {
	display: block;
	width: 100%;
	height: auto;
	border-radius: var(--tsl-radius-control, 4px);
}
.tsl-wishlist__item.is-gone .tsl-wishlist__img img {
	opacity: 0.5;
	filter: grayscale(1);
}

.tsl-wishlist__body {
	display: flex;
	flex-direction: column;
	gap: 8px;
	min-width: 0;
}

.tsl-wishlist .tsl-wishlist__title {
	margin: 0 !important;
	font-size: var(--tsl-h6, 16px) !important;
	line-height: 1.3 !important;
}
.tsl-wishlist .tsl-wishlist__title a {
	color: inherit !important;
	text-decoration: none;
}
.tsl-wishlist .tsl-wishlist__title a:hover {
	text-decoration: underline;
}

.tsl-wishlist__meta {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	margin: 0;
	font-size: 0.875rem;
}
.tsl-wishlist__gone {
	font-weight: 600;
}

.tsl-wishlist__actions {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px 16px;
}
.tsl-wishlist__actions form {
	margin: 0;
}

/* "Remove" is a quiet text action next to the primary Add to Cart, not a second
   primary button, so the kit's button styling is undone here. */
.tsl-wishlist__actions button.tsl-wishlist__remove {
	display: inline-flex !important;
	align-items: center !important;
	min-height: var(--tsl-ctl, 44px) !important;
	padding: 0 4px !important;
	border: 0 !important;
	border-radius: 0 !important;
	background: none !important;
	box-shadow: none !important;
	color: var(--tsl-nightgame, #003340) !important;
	font-family: inherit !important;
	font-size: 0.9375rem !important;
	font-weight: 400 !important;
	letter-spacing: normal !important;
	text-transform: none !important;
	text-decoration: underline !important;
	cursor: pointer;
}
.tsl-wishlist__actions button.tsl-wishlist__remove:hover {
	color: var(--tsl-red, #EF3B3A) !important;
}

@media (prefers-reduced-motion: reduce) {
	form.tsl-wish button.tsl-wish__btn,
	a.tsl-wish,
	.tsl-wish__icon {
		transition: none;
	}
}
