/* Custom WooCommerce Wishlist - front-end styles */

/* ---------------------------------------------------------------------
   Hard reset for every element this plugin renders, so an active theme's
   generic `button`, `a`, `.button` etc. styles (borders, shadows, text
   transforms, fonts) never leak into our widgets. Elementor's own
   per-instance style controls (higher-specificity selectors scoped to
   .elementor-element-{id}) always render after this and safely override
   any of these values when the user customizes a button.
------------------------------------------------------------------------ */
.cwl-wishlist-widget,
.cwl-wishlist-widget *,
.cwl-wishlist-list-wrapper,
.cwl-wishlist-list-wrapper *,
.cwl-counter-wrap,
.cwl-counter-wrap *,
.cwl-wishlist-btn,
.cwl-wishlist-btn * {
	box-sizing: border-box;
}

.cwl-wishlist-widget button,
.cwl-wishlist-list-wrapper button,
.cwl-wishlist-widget a.cwl-btn,
.cwl-wishlist-list-wrapper a.cwl-btn,
.cwl-wishlist-btn {
	-webkit-appearance: none;
	appearance: none;
	box-shadow: none;
	text-shadow: none;
	outline: none;
	text-transform: none;
	letter-spacing: normal;
	font-family: inherit;
	line-height: 1.2;
	margin: 0;
}

.cwl-wishlist-btn {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	background: transparent;
	border: none;
	cursor: pointer;
	padding: 4px;
	line-height: 1;
}

.cwl-wishlist-btn .cwl-btn-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	font-size: 20px;
	line-height: 1;
	color: #9aa0a6;
	transition: transform .15s ease, color .15s ease;
}

.cwl-wishlist-btn.cwl-active .cwl-btn-icon {
	color: #e0245e;
}

.cwl-wishlist-btn.cwl-pop .cwl-btn-icon {
	transform: scale(1.25);
}

.cwl-wishlist-btn .cwl-btn-label {
	font-size: 14px;
}

/* Counter */
.cwl-counter-wrap {
	display: inline-flex;
	align-items: center;
	text-decoration: none;
	cursor: pointer;
}

.cwl-counter-icon-wrap {
	position: relative;
	display: inline-flex;
	align-items: center;
	justify-content: center;
}

.cwl-counter-icon {
	font-size: 20px;
	color: #111827;
	display: inline-flex;
}

.cwl-counter-count {
	position: absolute;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 18px;
	height: 18px;
	padding: 0 4px;
	border-radius: 999px;
	background: #e0245e;
	color: #fff;
	font-size: 11px;
	font-weight: 600;
	line-height: 1;
	box-sizing: border-box;
	transition: transform .2s ease;
}

.cwl-badge-pos-top-right {
	top: -6px;
	right: -6px;
}

.cwl-badge-pos-top-left {
	top: -6px;
	left: -6px;
}

.cwl-badge-pos-bottom-right {
	bottom: -6px;
	right: -6px;
}

.cwl-badge-pos-bottom-left {
	bottom: -6px;
	left: -6px;
}

.cwl-counter-count.cwl-bump {
	animation: cwlBadgeBump .35s ease;
}

@keyframes cwlBadgeBump {
	0%   { transform: scale(1); }
	50%  { transform: scale(1.4); }
	100% { transform: scale(1); }
}

/* Fly-to-counter animation */
.cwl-fly-icon {
	position: fixed;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 22px;
	height: 22px;
	color: #e0245e;
	font-size: 18px;
	line-height: 1;
	pointer-events: none;
	z-index: 999999;
	opacity: 1;
	transform: scale(1);
	transition: left .55s cubic-bezier(.42, 0, .58, 1),
		top .55s cubic-bezier(.42, 0, .58, 1),
		transform .55s ease,
		opacity .55s ease .1s;
}

.cwl-fly-icon svg,
.cwl-fly-icon i {
	width: 100%;
	height: 100%;
}

/* Wishlist widget / table */
.cwl-wishlist-list-wrapper {
	max-width: 100%;
}

.cwl-list-toolbar {
	display: flex;
	gap: 8px;
	margin-bottom: 12px;
}

.cwl-wishlist-widget {
	background: #ffffff;
	border: 1px solid #e5e7eb;
	border-radius: 10px;
	overflow: hidden;
}

.cwl-wishlist-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	padding: 16px 20px;
	background: #f8f9fc;
	border-bottom: 1px solid #eef0f3;
}

.cwl-wishlist-title {
	font-weight: 700;
	font-size: 16px;
	color: #111827;
}

.cwl-list-switcher {
	padding: 6px 10px;
	border-radius: 6px;
	border: 1px solid #d1d5db;
	background: #fff;
	font-size: 13px;
}

.cwl-wishlist-empty {
	padding: 24px 20px;
	color: #6b7280;
	font-size: 14px;
}

.cwl-wishlist-items {
	display: flex;
	flex-direction: column;
}

.cwl-wishlist-row {
	display: flex;
	align-items: center;
	gap: 14px;
	padding: 14px 20px;
	border-bottom: 1px solid #eeeeee;
	flex-wrap: wrap;
}

.cwl-wishlist-row:last-child {
	border-bottom: none;
}

.cwl-col-image img {
	width: 56px;
	height: 56px;
	object-fit: cover;
	border-radius: 8px;
	display: block;
}

.cwl-col-info {
	flex: 1 1 200px;
	min-width: 140px;
	display: flex;
	flex-direction: column;
	gap: 2px;
}

.cwl-product-title {
	font-weight: 600;
	font-size: 14.5px;
	color: #1a1a1a;
	text-decoration: none;
}

.cwl-product-title:hover {
	text-decoration: underline;
}

.cwl-product-sub {
	font-size: 12.5px;
	color: #9ca3af;
}

.cwl-col-price {
	font-weight: 700;
	font-size: 14.5px;
	color: #1a1a1a;
	white-space: nowrap;
}

.cwl-col-actions {
	display: flex;
	align-items: center;
	gap: 8px;
	margin-left: auto;
}

.cwl-btn {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 9px 16px;
	border-radius: 8px;
	font-size: 13.5px;
	font-weight: 600;
	text-decoration: none;
	border: 1px solid #d1d5db;
	cursor: pointer;
	white-space: nowrap;
}

.cwl-btn-view {
	background: #111827;
	color: #ffffff;
	border-color: #111827;
}

.cwl-btn-view:hover {
	opacity: .9;
	color: #ffffff;
}

.cwl-btn-cart {
	background: #ffffff;
	color: #111827;
	border-color: #d1d5db;
}

.cwl-btn-cart:hover {
	background: #f3f4f6;
}

.cwl-btn-newlist {
	background: #ffffff;
	color: #111827;
	border-color: #d1d5db;
}

.cwl-btn-newlist:hover {
	background: #f3f4f6;
}

.cwl-btn-share {
	background: #ffffff;
	color: #111827;
	border-color: #d1d5db;
}

.cwl-btn-share:hover {
	background: #f3f4f6;
}

/* Generic secondary style used by modal Cancel buttons etc. */
.cwl-btn-secondary {
	background: #ffffff;
	color: #111827;
	border-color: #d1d5db;
}

.cwl-btn-secondary:hover {
	background: #f3f4f6;
}

.cwl-btn-remove {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
	width: 34px;
	height: 34px;
	min-width: 34px;
	border-radius: 8px;
	border: 1px solid transparent;
	background: #fdecea;
	color: #c0392b;
	cursor: pointer;
}

.cwl-btn-remove svg {
	display: block;
	width: 16px;
	height: 16px;
	flex-shrink: 0;
	color: inherit;
}

.cwl-btn-remove:hover {
	background: #fadbd8;
}

.cwl-wishlist-row.cwl-removing {
	opacity: 0.4;
	pointer-events: none;
}

/* Simple modal for create-list / share */
.cwl-modal-overlay {
	position: fixed;
	inset: 0;
	background: rgba(0,0,0,.45);
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 16px;
	z-index: 100000;
}

.cwl-modal-box {
	background: #fff;
	border-radius: 10px;
	padding: 20px;
	width: 100%;
	max-width: 380px;
}

.cwl-modal-box h3 {
	margin: 0 0 12px;
	font-size: 16px;
}

.cwl-modal-box input[type="text"] {
	width: 100%;
	padding: 9px 10px;
	border: 1px solid #d1d5db;
	border-radius: 6px;
	margin-bottom: 12px;
	box-sizing: border-box;
}

.cwl-modal-actions {
	display: flex;
	justify-content: flex-end;
	gap: 8px;
}

.cwl-toast {
	position: fixed;
	bottom: 20px;
	right: 20px;
	background: #111827;
	color: #fff;
	padding: 10px 16px;
	border-radius: 8px;
	font-size: 13.5px;
	z-index: 100001;
	opacity: 0;
	transform: translateY(10px);
	transition: all .25s ease;
}

.cwl-toast.cwl-show {
	opacity: 1;
	transform: translateY(0);
}

/* ---------------------------------------------------------------------
   Responsive: Tablet (≤900px)
   Below this width the row switches to a fully deterministic block
   layout (instead of relying on flex-wrap, whose line-packing behavior
   is unpredictable and was causing large empty gaps between items).
------------------------------------------------------------------------ */
@media (max-width: 900px) {
	.cwl-wishlist-header {
		flex-wrap: wrap;
		gap: 10px;
	}

	.cwl-list-switcher {
		max-width: 100%;
	}

	.cwl-wishlist-row {
		display: block;
	}

	.cwl-col-image,
	.cwl-col-info,
	.cwl-col-price,
	.cwl-col-actions {
		display: block;
		width: 100%;
		margin: 0 0 10px 0;
	}

	.cwl-col-image {
		margin-bottom: 8px;
	}

	.cwl-col-image img {
		width: 64px;
		height: 64px;
	}

	.cwl-col-price {
		white-space: normal;
	}

	.cwl-col-actions {
		display: flex;
		flex-wrap: wrap;
		align-items: center;
		gap: 8px;
		margin-bottom: 0;
	}

	.cwl-col-actions .cwl-btn {
		flex: 1 1 auto;
		justify-content: center;
	}

	.cwl-btn-remove {
		flex: 0 0 auto;
	}
}

/* ---------------------------------------------------------------------
   Responsive: Mobile (≤480px)
------------------------------------------------------------------------ */
@media (max-width: 480px) {
	.cwl-list-toolbar {
		flex-wrap: wrap;
	}

	.cwl-list-toolbar .cwl-btn {
		flex: 1 1 auto;
		justify-content: center;
	}

	.cwl-wishlist-header {
		flex-direction: column;
		align-items: flex-start;
	}

	.cwl-wishlist-header .cwl-list-switcher {
		width: 100%;
	}

	.cwl-col-actions .cwl-btn {
		padding: 8px 12px;
	}

	.cwl-modal-box {
		max-width: 90vw;
		width: 90vw;
	}

	.cwl-toast {
		left: 16px;
		right: 16px;
		bottom: 16px;
		text-align: center;
	}

	.cwl-wishlist-btn .cwl-btn-label {
		font-size: 13px;
	}

	.cwl-counter-icon {
		font-size: 18px;
	}
}
