/**
 * File Name: frontend-wishlist-widget.css
 * File Location: /assets/css/frontend-wishlist-widget.css
 *
 * Purpose:
 * Styles the DAF Marketplace header wishlist dropdown widget, wishlist badge,
 * mini product list, sticky dropdown action buttons, remove actions, empty state,
 * and toast UI. Shows 3 products in dropdown front view; remaining products scroll.
 *
 * Linked Files:
 * - /includes/frontend/class-frontend-wishlist-widget.php
 * - /assets/js/frontend-wishlist-widget.js
 * - /includes/frontend/class-frontend-wishlist-page.php
 * - /assets/css/frontend-wishlist-page.css
 */

/* ==========================================================================
   DAF Wishlist Widget - Parent Wrapper
   ========================================================================== */

.daf-wishlist-nav-item {
	position: relative !important;
	overflow: visible !important;
	display: inline-block !important;
}

.daf-wishlist-trigger-wrapper {
	position: relative !important;
	display: flex !important;
	align-items: center !important;
	margin-left: 8px !important;
	overflow: visible !important;
}

.daf-wishlist-trigger {
	position: relative !important;
	z-index: 5 !important;
	display: inline-flex !important;
	align-items: center !important;
	justify-content: center !important;
	text-decoration: none !important;
	cursor: pointer !important;
}

.daf-header-wl-icon {
	width: 22px !important;
	height: 22px !important;
	display: inline-block !important;
	vertical-align: middle !important;
	object-fit: contain !important;
}

/* ==========================================================================
   DAF Wishlist Widget - Badge
   ========================================================================== */

.daf-wl-count-badge {
	position: absolute !important;
	top: 5px !important;
	right: -9px !important;
	min-width: 18px !important;
	height: 18px !important;
	display: flex !important;
	align-items: center !important;
	justify-content: center !important;
	padding: 0 !important;
	border: 2px solid #ffffff !important;
	border-radius: 999px !important;
	background: #8cc63f !important;
	color: #ffffff !important;
	font-size: 10px !important;
	font-weight: 800 !important;
	line-height: 1 !important;
	box-shadow: 0 2px 4px rgba(0, 0, 0, 0.12) !important;
	z-index: 10 !important;
	box-sizing: border-box !important;
}

/* ==========================================================================
   DAF Wishlist Widget - Dropdown Container
   ========================================================================== */

.daf-ghost-wishlist-widget {
	position: absolute !important;
	top: 135% !important;
	right: 0 !important;
	left: auto !important;
	width: 390px !important;
	max-width: calc(100vw - 24px) !important;
	min-width: 0 !important;
	display: block !important;
	padding: 0 !important;
	border: 1px solid #e2e8f0 !important;
	border-radius: 14px !important;
	background: #ffffff !important;
	box-shadow: 0 24px 42px -12px rgba(15, 23, 42, 0.22), 0 10px 18px -12px rgba(15, 23, 42, 0.16) !important;
	z-index: 999999999 !important;
	opacity: 0 !important;
	visibility: hidden !important;
	transform: translateY(12px) !important;
	transform-origin: top right !important;
	transition: opacity 0.22s ease, visibility 0.22s ease, transform 0.22s ease !important;
	pointer-events: none !important;
	overflow: hidden !important;
	box-sizing: border-box !important;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif !important;
}

.daf-wishlist-active .daf-ghost-wishlist-widget,
.daf-wishlist-nav-item.is-active .daf-ghost-wishlist-widget,
.daf-ghost-wishlist-widget.active,
.daf-ghost-wishlist-widget.open {
	opacity: 1 !important;
	visibility: visible !important;
	transform: translateY(0) !important;
	pointer-events: auto !important;
}

/* ==========================================================================
   DAF Wishlist Widget - Header
   ========================================================================== */

.daf-ghost-wishlist-widget .daf-dropdown-header {
	padding: 16px 18px !important;
	display: flex !important;
	align-items: center !important;
	justify-content: space-between !important;
	gap: 12px !important;
	border-bottom: 1px solid #eef2f7 !important;
	background: #ffffff !important;
	box-sizing: border-box !important;
}

.daf-ghost-wishlist-widget .daf-dropdown-title {
	display: block !important;
	color: #0f172a !important;
	font-size: 14px !important;
	font-weight: 900 !important;
	line-height: 1.2 !important;
	letter-spacing: 0.5px !important;
	text-transform: uppercase !important;
}

.daf-ghost-wishlist-widget .daf-dropdown-subtitle {
	display: block !important;
	margin-top: 4px !important;
	color: #64748b !important;
	font-size: 12px !important;
	font-weight: 600 !important;
	line-height: 1.2 !important;
}

.daf-ghost-wishlist-widget .daf-dropdown-view-link {
	color: #2271b1 !important;
	font-size: 12px !important;
	font-weight: 800 !important;
	text-decoration: none !important;
	white-space: nowrap !important;
}

/* ==========================================================================
   DAF Wishlist Widget - Body Layout
   ========================================================================== */

.daf-ghost-wishlist-widget .daf-dropdown-body {
	padding: 0 !important;
	display: flex !important;
	flex-direction: column !important;
	background: #ffffff !important;
	box-sizing: border-box !important;
	overflow: hidden !important;
}

.daf-wl-widget-scroll {
	max-height: 246px !important;
	overflow-y: auto !important;
	overflow-x: hidden !important;
	background: #ffffff !important;
	box-sizing: border-box !important;
	-webkit-overflow-scrolling: touch !important;
	overscroll-behavior: contain !important;
}

.daf-wl-widget-scroll::-webkit-scrollbar {
	width: 7px !important;
}

.daf-wl-widget-scroll::-webkit-scrollbar-track {
	background: #f8fafc !important;
}

.daf-wl-widget-scroll::-webkit-scrollbar-thumb {
	background: #cbd5e1 !important;
	border-radius: 999px !important;
}

.daf-wl-widget-scroll::-webkit-scrollbar-thumb:hover {
	background: #94a3b8 !important;
}

.daf-wl-widget-products {
	display: flex !important;
	flex-direction: column !important;
	padding: 0 !important;
	margin: 0 !important;
}

/* ==========================================================================
   DAF Wishlist Widget - Product Item
   ========================================================================== */

.daf-wl-widget-item {
	min-height: 82px !important;
	display: grid !important;
	grid-template-columns: 72px minmax(0, 1fr) 34px !important;
	gap: 12px !important;
	align-items: center !important;
	padding: 10px 16px !important;
	border-bottom: 1px solid #f1f5f9 !important;
	background: #ffffff !important;
	box-sizing: border-box !important;
}

.daf-wl-widget-item:hover {
	background: #fbfdff !important;
}

.daf-wl-widget-item:last-child {
	border-bottom: 0 !important;
}

.daf-wl-widget-thumb {
	width: 72px !important;
	height: 54px !important;
	display: block !important;
	overflow: hidden !important;
	border: 1px solid #eef2f7 !important;
	border-radius: 10px !important;
	background: #f1f5f9 !important;
	box-sizing: border-box !important;
}

.daf-wl-widget-thumb img {
	width: 100% !important;
	height: 100% !important;
	display: block !important;
	object-fit: cover !important;
	object-position: center !important;
}

.daf-wl-widget-info {
	min-width: 0 !important;
	display: flex !important;
	flex-direction: column !important;
	gap: 7px !important;
}

.daf-wl-widget-name {
	color: #0f172a !important;
	font-size: 13px !important;
	font-weight: 800 !important;
	line-height: 1.28 !important;
	text-decoration: none !important;
	white-space: normal !important;
	overflow: hidden !important;
	display: -webkit-box !important;
	-webkit-line-clamp: 2 !important;
	-webkit-box-orient: vertical !important;
}

.daf-wl-widget-name:hover {
	color: #2271b1 !important;
}

.daf-wl-widget-price {
	color: #8cc63f !important;
	font-size: 13px !important;
	font-weight: 900 !important;
	line-height: 1 !important;
}

/* ==========================================================================
   DAF Wishlist Widget - Remove Button
   ========================================================================== */

.daf-wl-widget-remove {
	width: 34px !important;
	height: 34px !important;
	display: inline-flex !important;
	align-items: center !important;
	justify-content: center !important;
	padding: 0 !important;
	border: 1px solid #fecaca !important;
	border-radius: 10px !important;
	background: #fff7f7 !important;
	color: #ef4444 !important;
	font-size: 0 !important;
	font-weight: 900 !important;
	line-height: 1 !important;
	cursor: pointer !important;
	transition: all 0.2s ease !important;
	box-shadow: 0 4px 10px rgba(239, 68, 68, 0.08) !important;
	box-sizing: border-box !important;
}

.daf-wl-widget-remove span {
	font-size: 20px !important;
	line-height: 1 !important;
	transform: translateY(-1px) !important;
}

.daf-wl-widget-remove:hover {
	background: #ef4444 !important;
	border-color: #ef4444 !important;
	color: #ffffff !important;
	transform: translateY(-1px) !important;
	box-shadow: 0 10px 18px rgba(239, 68, 68, 0.22) !important;
}

.daf-wl-widget-remove:active {
	transform: translateY(0) !important;
}

/* ==========================================================================
   DAF Wishlist Widget - View More Link
   ========================================================================== */

.daf-wl-widget-more {
	flex: 0 0 auto !important;
	display: block !important;
	padding: 10px 16px !important;
	border-top: 1px solid #f1f5f9 !important;
	background: #ffffff !important;
	color: #2271b1 !important;
	font-size: 12px !important;
	font-weight: 800 !important;
	text-align: center !important;
	text-decoration: none !important;
}

/* ==========================================================================
   DAF Wishlist Widget - Sticky Actions
   ========================================================================== */

.daf-wl-widget-actions {
	position: sticky !important;
	bottom: 0 !important;
	z-index: 3 !important;
	flex: 0 0 auto !important;
	display: grid !important;
	grid-template-columns: 1fr 1fr !important;
	gap: 8px !important;
	padding: 14px 16px 16px !important;
	border-top: 1px solid #e2e8f0 !important;
	background: #f8fafc !important;
	box-sizing: border-box !important;
}

.daf-wl-widget-btn {
	height: 38px !important;
	display: inline-flex !important;
	align-items: center !important;
	justify-content: center !important;
	padding: 0 12px !important;
	border: 0 !important;
	border-radius: 8px !important;
	color: #ffffff !important;
	font-size: 12px !important;
	font-weight: 900 !important;
	line-height: 1 !important;
	text-align: center !important;
	text-decoration: none !important;
	cursor: pointer !important;
	transition: all 0.2s ease !important;
	box-sizing: border-box !important;
}

.daf-wl-widget-btn:hover {
	color: #ffffff !important;
	text-decoration: none !important;
	opacity: 0.93 !important;
	transform: translateY(-1px) !important;
}

.daf-wl-widget-add-cart {
	background: #8cc63f !important;
}

.daf-wl-widget-clear {
	background: #ef4444 !important;
}

.daf-wl-widget-view {
	grid-column: 1 / -1 !important;
	background: #0f172a !important;
}

/* ==========================================================================
   DAF Wishlist Widget - Empty / Guest State
   ========================================================================== */

.daf-wl-widget-empty {
	padding: 38px 22px !important;
	display: flex !important;
	flex-direction: column !important;
	align-items: center !important;
	gap: 9px !important;
	color: #64748b !important;
	text-align: center !important;
	box-sizing: border-box !important;
}

.daf-wl-widget-empty-icon {
	width: 54px !important;
	height: 54px !important;
	display: flex !important;
	align-items: center !important;
	justify-content: center !important;
	border-radius: 50% !important;
	background: #f1f5f9 !important;
	color: #8cc63f !important;
	font-size: 30px !important;
	font-weight: 900 !important;
	line-height: 1 !important;
}

.daf-wl-widget-empty strong {
	color: #0f172a !important;
	font-size: 15px !important;
	font-weight: 900 !important;
}

.daf-wl-widget-empty span {
	max-width: 260px !important;
	color: #64748b !important;
	font-size: 13px !important;
	line-height: 1.5 !important;
}

.daf-wl-widget-empty a {
	margin-top: 8px !important;
	padding: 10px 18px !important;
	border-radius: 8px !important;
	background: #0f172a !important;
	color: #ffffff !important;
	font-size: 12px !important;
	font-weight: 900 !important;
	text-decoration: none !important;
}

/* ==========================================================================
   DAF Wishlist Widget - Toast
   ========================================================================== */

#daf-wishlist-toast-container {
	position: fixed !important;
	top: 50% !important;
	left: 50% !important;
	z-index: 1000000 !important;
	display: flex !important;
	flex-direction: column !important;
	gap: 15px !important;
	pointer-events: none !important;
	transform: translate(-50%, -50%) !important;
}

.daf-toast {
	min-width: 280px !important;
	display: flex !important;
	align-items: center !important;
	justify-content: center !important;
	gap: 12px !important;
	padding: 14px 28px !important;
	border-radius: 50px !important;
	background: #10b981 !important;
	color: #ffffff !important;
	font-size: 15px !important;
	font-weight: 800 !important;
	box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.3) !important;
	opacity: 0 !important;
	transform: scale(0.8) !important;
	transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275) !important;
	box-sizing: border-box !important;
}

.daf-toast.daf-toast-visible {
	opacity: 1 !important;
	transform: scale(1) !important;
}

.daf-toast.removed {
	background: #0f172a !important;
}

/* ==========================================================================
   DAF Wishlist Widget - Tablet / Mobile Safe Positioning
   ========================================================================== */

@media (max-width: 1199px) {
	.daf-mp-mobile-actions .daf-wishlist-trigger-wrapper,
	.daf-mp-mobile-actions .daf-wishlist-trigger {
		width: 34px !important;
		height: 34px !important;
		min-width: 34px !important;
		min-height: 34px !important;
		margin: 0 !important;
	}

	/*
	 * Closed state:
	 * Keep closed wishlist dropdown invisible without drawing a vertical edge.
	 */
	.daf-mp-mobile-action-slot--wishlist .daf-ghost-wishlist-widget:not(.active):not(.open),
	.daf-mp-mobile-action-slot--wishlist:not(.daf-wishlist-active) .daf-ghost-wishlist-widget,
	.daf-mp-mobile-action-slot--wishlist .daf-wishlist-trigger-wrapper:not(.daf-wishlist-active) .daf-ghost-wishlist-widget {
		position: absolute !important;
		top: calc(100% + 12px) !important;
		left: auto !important;
		right: 0 !important;
		width: 0 !important;
		min-width: 0 !important;
		max-width: 0 !important;
		height: 0 !important;
		max-height: 0 !important;
		border-color: transparent !important;
		box-shadow: none !important;
		opacity: 0 !important;
		visibility: hidden !important;
		pointer-events: none !important;
		overflow: hidden !important;
		transform: translateY(12px) !important;
	}

	/*
	 * Open state:
	 * True viewport panel with equal left/right gap.
	 */
	.daf-mp-mobile-action-slot--wishlist .daf-ghost-wishlist-widget.active,
	.daf-mp-mobile-action-slot--wishlist .daf-ghost-wishlist-widget.open,
	.daf-mp-mobile-action-slot--wishlist.daf-wishlist-active .daf-ghost-wishlist-widget,
	.daf-mp-mobile-action-slot--wishlist.is-active .daf-ghost-wishlist-widget,
	.daf-mp-mobile-action-slot--wishlist .daf-wishlist-trigger-wrapper.daf-wishlist-active .daf-ghost-wishlist-widget,
	.daf-mp-mobile-action-slot--wishlist .daf-wishlist-trigger-wrapper.is-active .daf-ghost-wishlist-widget,
	.daf-mp-mobile-action-slot--wishlist .daf-wishlist-trigger-wrapper.active .daf-ghost-wishlist-widget,
	.daf-mp-mobile-action-slot--wishlist .daf-wishlist-trigger-wrapper.open .daf-ghost-wishlist-widget,
	.daf-wishlist-nav-item.daf-wishlist-active .daf-ghost-wishlist-widget,
	.daf-wishlist-nav-item.is-active .daf-ghost-wishlist-widget {
		position: fixed !important;
		top: 142px !important;
		left: 18px !important;
		right: 18px !important;
		bottom: auto !important;
		width: auto !important;
		max-width: none !important;
		height: auto !important;
		max-height: calc(100vh - 170px) !important;
		border-color: #e2e8f0 !important;
		box-shadow: 0 24px 42px -12px rgba(15, 23, 42, 0.22), 0 10px 18px -12px rgba(15, 23, 42, 0.16) !important;
		opacity: 1 !important;
		visibility: visible !important;
		transform: none !important;
		transform-origin: top center !important;
		pointer-events: auto !important;
		z-index: 2147483646 !important;
		box-sizing: border-box !important;
		overflow: hidden !important;
	}

	.daf-mp-mobile-action-slot--wishlist .daf-ghost-wishlist-widget.active .daf-wl-widget-scroll,
	.daf-mp-mobile-action-slot--wishlist .daf-ghost-wishlist-widget.open .daf-wl-widget-scroll,
	.daf-mp-mobile-action-slot--wishlist.daf-wishlist-active .daf-ghost-wishlist-widget .daf-wl-widget-scroll,
	.daf-wishlist-nav-item.daf-wishlist-active .daf-ghost-wishlist-widget .daf-wl-widget-scroll,
	.daf-wishlist-nav-item.is-active .daf-ghost-wishlist-widget .daf-wl-widget-scroll {
		max-height: min(420px, calc(100vh - 250px)) !important;
	}
}

@media (max-width: 767px) {
	.daf-mp-mobile-actions .daf-wishlist-trigger-wrapper,
	.daf-mp-mobile-actions .daf-wishlist-trigger {
		width: 32px !important;
		height: 32px !important;
		min-width: 32px !important;
		min-height: 32px !important;
	}

	.daf-mp-mobile-action-slot--wishlist .daf-ghost-wishlist-widget.active,
	.daf-mp-mobile-action-slot--wishlist .daf-ghost-wishlist-widget.open,
	.daf-mp-mobile-action-slot--wishlist.daf-wishlist-active .daf-ghost-wishlist-widget,
	.daf-mp-mobile-action-slot--wishlist.is-active .daf-ghost-wishlist-widget,
	.daf-mp-mobile-action-slot--wishlist .daf-wishlist-trigger-wrapper.daf-wishlist-active .daf-ghost-wishlist-widget,
	.daf-mp-mobile-action-slot--wishlist .daf-wishlist-trigger-wrapper.is-active .daf-ghost-wishlist-widget,
	.daf-mp-mobile-action-slot--wishlist .daf-wishlist-trigger-wrapper.active .daf-ghost-wishlist-widget,
	.daf-mp-mobile-action-slot--wishlist .daf-wishlist-trigger-wrapper.open .daf-ghost-wishlist-widget,
	.daf-wishlist-nav-item.daf-wishlist-active .daf-ghost-wishlist-widget,
	.daf-wishlist-nav-item.is-active .daf-ghost-wishlist-widget {
		top: 126px !important;
		left: 14px !important;
		right: 14px !important;
		width: auto !important;
		max-width: none !important;
		max-height: calc(100vh - 146px) !important;
	}

	.daf-mp-mobile-action-slot--wishlist .daf-ghost-wishlist-widget.active .daf-wl-widget-scroll,
	.daf-mp-mobile-action-slot--wishlist .daf-ghost-wishlist-widget.open .daf-wl-widget-scroll,
	.daf-mp-mobile-action-slot--wishlist.daf-wishlist-active .daf-ghost-wishlist-widget .daf-wl-widget-scroll,
	.daf-wishlist-nav-item.daf-wishlist-active .daf-ghost-wishlist-widget .daf-wl-widget-scroll,
	.daf-wishlist-nav-item.is-active .daf-ghost-wishlist-widget .daf-wl-widget-scroll {
		max-height: min(48vh, calc(100vh - 245px)) !important;
	}

	.daf-wl-widget-item {
		grid-template-columns: 58px minmax(0, 1fr) 30px !important;
		min-height: 76px !important;
		gap: 10px !important;
		padding: 10px 12px !important;
	}

	.daf-wl-widget-thumb {
		width: 58px !important;
		height: 48px !important;
	}

	.daf-wl-widget-remove {
		width: 30px !important;
		height: 30px !important;
	}

	.daf-wl-widget-actions {
		grid-template-columns: 1fr !important;
	}

	.daf-wl-widget-view {
		grid-column: auto !important;
	}

	#daf-wishlist-toast-container {
		left: 12px !important;
		right: 12px !important;
		width: auto !important;
		transform: translateY(-50%) !important;
	}

	.daf-toast {
		min-width: 0 !important;
		width: 100% !important;
	}
}

@media (max-width: 389px) {
	.daf-mp-mobile-actions .daf-wishlist-trigger-wrapper,
	.daf-mp-mobile-actions .daf-wishlist-trigger {
		width: 30px !important;
		height: 30px !important;
		min-width: 30px !important;
		min-height: 30px !important;
	}

	.daf-mp-mobile-action-slot--wishlist .daf-ghost-wishlist-widget.active,
	.daf-mp-mobile-action-slot--wishlist .daf-ghost-wishlist-widget.open,
	.daf-mp-mobile-action-slot--wishlist.daf-wishlist-active .daf-ghost-wishlist-widget,
	.daf-mp-mobile-action-slot--wishlist.is-active .daf-ghost-wishlist-widget,
	.daf-mp-mobile-action-slot--wishlist .daf-wishlist-trigger-wrapper.daf-wishlist-active .daf-ghost-wishlist-widget,
	.daf-mp-mobile-action-slot--wishlist .daf-wishlist-trigger-wrapper.is-active .daf-ghost-wishlist-widget,
	.daf-mp-mobile-action-slot--wishlist .daf-wishlist-trigger-wrapper.active .daf-ghost-wishlist-widget,
	.daf-mp-mobile-action-slot--wishlist .daf-wishlist-trigger-wrapper.open .daf-ghost-wishlist-widget,
	.daf-wishlist-nav-item.daf-wishlist-active .daf-ghost-wishlist-widget,
	.daf-wishlist-nav-item.is-active .daf-ghost-wishlist-widget {
		top: 122px !important;
		left: 10px !important;
		right: 10px !important;
		max-height: calc(100vh - 138px) !important;
	}
}