/**
 * Demfilz Wishlist for WooCommerce.
 */

/* ---- Heart button ---- */

.dwlw-btn {
	-webkit-appearance: none;
	appearance: none;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 6px;
	min-width: 40px;
	min-height: 40px;
	padding: 8px;
	margin: 0;
	background: transparent;
	border: 0;
	border-radius: 999px;
	cursor: pointer;
	line-height: 1;
	color: #64748b;
	transition: background-color 0.15s ease, color 0.15s ease;
}

.dwlw-btn:hover {
	background: rgba(225, 29, 72, 0.08);
	color: #e11d48;
}

.dwlw-btn:focus-visible {
	outline: 2px solid #e11d48;
	outline-offset: 2px;
}

.dwlw-icon {
	display: block;
	flex: 0 0 auto;
}

.dwlw-icon path {
	fill: none;
	stroke: currentColor;
	stroke-width: 2;
	stroke-linejoin: round;
	transition: fill 0.15s ease, stroke 0.15s ease;
}

.dwlw-btn.is-in-wishlist {
	color: #e11d48;
}

.dwlw-btn.is-in-wishlist .dwlw-icon path {
	fill: #e11d48;
	stroke: #e11d48;
}

.dwlw-label {
	font-size: 0.95em;
	font-weight: 600;
}

@keyframes dwlw-pulse {
	0% { transform: scale(1); }
	50% { transform: scale(1.25); }
	100% { transform: scale(1); }
}

.dwlw-pulse .dwlw-icon {
	animation: dwlw-pulse 0.3s ease;
}

/* Single product page: sit beside the add-to-cart button. */
form.cart .dwlw-btn {
	vertical-align: middle;
	margin-inline-start: 8px;
}

/* ---- "Added to wishlist" toast ---- */

.dwlw-toast {
	position: fixed;
	left: 50%;
	bottom: 24px;
	transform: translate(-50%, 12px);
	display: flex;
	align-items: center;
	gap: 14px;
	padding: 11px 18px;
	background: #0f172a;
	color: #fff;
	font-size: 14px;
	border-radius: 10px;
	box-shadow: 0 8px 24px rgba(15, 23, 42, 0.25);
	opacity: 0;
	transition: opacity 0.25s ease, transform 0.25s ease;
	z-index: 100000;
}

.dwlw-toast-show {
	opacity: 1;
	transform: translate(-50%, 0);
}

.dwlw-toast a {
	color: #fda4af;
	font-weight: 600;
	text-decoration: underline;
}

.dwlw-count-link {
	text-decoration: none;
}

/* ---- Product table column ---- */

/* Keep the heart column narrow and centred, and remove the (meaningless)
   sort affordance the table gives unknown columns. */
.dpt-table th.dpt-col-wishlist-heart,
.dpt-table td.dpt-col-wishlist-heart {
	width: 1%;
	white-space: nowrap;
	text-align: center;
}

.dpt-table th.dpt-col-wishlist-heart {
	pointer-events: none;
}

.dpt-table th.dpt-col-wishlist-heart .dpt-sort-icon {
	display: none;
}

/* ---- Quick view popup ---- */

.dwlw-qv {
	margin: 14px 0;
}

/* ---- Count badge ---- */

.dwlw-count {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 20px;
	height: 20px;
	padding: 0 6px;
	border-radius: 999px;
	background: #e11d48;
	color: #fff;
	font-size: 12px;
	font-weight: 700;
	line-height: 1;
}

.dwlw-count.dwlw-count-zero {
	background: #94a3b8;
}

/* ---- Saved-items view ---- */

.dwlw-view {
	margin: 0 0 24px;
}

.dwlw-loading,
.dwlw-empty-msg {
	padding: 24px 0;
	color: #64748b;
}

/* The script tags the root element with dwlw-js as it loads; without it
   (JavaScript disabled) the loading state stays hidden and the view's
   noscript message speaks instead. */
.dwlw-loading {
	display: none;
}

.dwlw-js .dwlw-loading {
	display: block;
}

.dwlw-items {
	list-style: none;
	margin: 0;
	padding: 0;
}

.dwlw-item {
	display: flex;
	align-items: center;
	gap: 16px;
	padding: 14px 0;
	border-bottom: 1px solid #e2e8f0;
}

.dwlw-item-thumb {
	flex: 0 0 auto;
	display: block;
	width: 72px;
}

.dwlw-item-thumb img {
	display: block;
	width: 72px;
	height: auto;
	border-radius: 8px;
}

.dwlw-item-body {
	flex: 1 1 auto;
	min-width: 0;
}

.dwlw-item-name {
	display: block;
	font-weight: 600;
	text-decoration: none;
	margin-bottom: 2px;
	overflow-wrap: anywhere;
}

.dwlw-item-price {
	margin-bottom: 8px;
}

.dwlw-item-buy {
	display: inline-block;
}

.dwlw-item .dwlw-btn {
	flex: 0 0 auto;
}

@media (max-width: 480px) {
	.dwlw-item {
		gap: 10px;
	}

	.dwlw-item-thumb,
	.dwlw-item-thumb img {
		width: 56px;
	}
}
