/**
 * Header Dropdowns Styles
 * 
 * Profile dropdown and minicart dropdown styles
 *
 * @package Genesis_Child
 * @since 1.0.0
 */

/* ========================================
 * PROFILE DROPDOWN
 * ======================================== */

/* Profile Dropdown - Hidden by Default */
.header-profile-dropdown {
	position: absolute;
	top: calc(100% + 10px);
	right: 0;
	background-color: #ffffff !important;
	border-radius: 4px;
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
	min-width: 360px;
	opacity: 0 !important;
	visibility: hidden !important;
	transform: translateY(-10px);
	transition: opacity 0.3s ease, visibility 0.3s ease, transform 0.3s ease;
	z-index: 10000;
	padding: 16px;
	display: none !important;
	pointer-events: none !important;
	height: 0 !important;
	width: 0 !important;
	overflow: hidden !important;
	margin: 0 !important;
}

/* Show dropdown when profile icon has active class */
.header-icon.header-profile-icon.active ~ .header-profile-dropdown,
.header-profile-wrapper.active .header-profile-dropdown,
.header-profile-wrapper .header-icon.header-profile-icon.active ~ .header-profile-dropdown {
	opacity: 1 !important;
	visibility: visible !important;
	transform: translateY(0);
	pointer-events: auto !important;
	display: block !important;
	height: auto !important;
	width: auto !important;
	min-width: 380px !important;
	overflow: visible !important;
}

/* Keep dropdown visible when hovering over it */
.header-profile-dropdown:hover {
	opacity: 1 !important;
	visibility: visible !important;
	transform: translateY(0);
	pointer-events: auto !important;
	display: block !important;
	height: auto !important;
	width: auto !important;
	min-width: 380px !important;
	overflow: visible !important;
}

.header-profile-data {
	display: flex;
	flex-direction: column;
	gap: 6px;
	width: 100%;
}

.header-profile-data .profile-name {
	color: #000000 !important;
	font-size: 15px;
	font-weight: 600;
	line-height: 1.4;
	display: block;
	margin: 0;
	padding: 0;
}

.header-profile-data .profile-email {
	color: #666666 !important;
	font-size: 13px;
	line-height: 1.4;
	display: block;
	margin: 0;
	padding: 0;
	word-break: break-word;
}

/* Profile Menu Items */
.header-profile-menu {
	margin-top: 12px;
	padding-top: 12px;
	border-top: 1px solid #e5e5e5;
	display: grid;
	grid-template-columns: 1fr 1fr;
	grid-template-rows: repeat(3, auto);
	grid-auto-flow: column;
	gap: 4px 10px;
	position: relative;
}

/* Vertical line in the middle */
.header-profile-menu::before {
	content: '';
	position: absolute;
	top: 0;
	left: 50%;
	transform: translateX(-50%);
	width: 0.5px;
	height: 100%;
	background-color: #e5e5e5;
}

.header-profile-menu .profile-menu-item {
	color: #333333 !important;
	font-size: 14px;
	font-weight: 400;
	line-height: 1.5;
	padding: 8px 12px;
	border-radius: 4px;
	text-decoration: none;
	transition: background-color 0.2s ease, color 0.2s ease;
	display: block;
	white-space: nowrap;
}

.header-profile-menu .profile-menu-item:hover {
	background-color: #f5f5f5;
	color: #F6218D !important;
}

.header-profile-menu .profile-menu-item.current {
	background-color: #fef2f8;
	color: #F6218D !important;
	font-weight: 500;
}

/* Dropdown Arrow */
.header-profile-dropdown::before {
	content: '';
	position: absolute;
	bottom: 100%;
	right: 16px;
	border: 8px solid transparent;
	border-bottom-color: #ffffff;
	margin-bottom: -1px;
}

.header-profile-dropdown {
	white-space: nowrap;
	overflow: visible;
}

.header-profile-data {
	white-space: normal;
}

/* ========================================
 * MINICART DROPDOWN
 * ======================================== */

/* Minicart Dropdown - Hidden by Default */
.header-minicart-dropdown {
	position: absolute;
	top: calc(100% + 10px);
	right: 0;
	background-color: #ffffff !important;
	border-radius: 4px;
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
	min-width: 350px;
	max-width: 400px;
	max-height: 500px;
	opacity: 0 !important;
	visibility: hidden !important;
	transform: translateY(-10px);
	transition: opacity 0.3s ease, visibility 0.3s ease, transform 0.3s ease;
	z-index: 10000;
	overflow: hidden;
	display: none !important;
	flex-direction: column;
	pointer-events: none !important;
	height: 0 !important;
	width: 0 !important;
	overflow: hidden !important;
}

/* Show minicart when cart icon has active class */
.header-icon.header-cart-icon.active ~ .header-minicart-dropdown,
.header-cart-wrapper.active .header-minicart-dropdown,
.header-cart-wrapper .header-icon.header-cart-icon.active ~ .header-minicart-dropdown {
	opacity: 1 !important;
	visibility: visible !important;
	transform: translateY(0);
	pointer-events: auto !important;
	display: flex !important;
	height: auto !important;
	width: auto !important;
	min-width: 350px !important;
	max-width: 400px !important;
	overflow: visible !important;
}

/* Keep minicart visible when hovering over it */
.header-minicart-dropdown:hover {
	opacity: 1 !important;
	visibility: visible !important;
	transform: translateY(0);
	pointer-events: auto !important;
	display: flex !important;
	height: auto !important;
	width: auto !important;
	min-width: 350px !important;
	max-width: 400px !important;
	overflow: visible !important;
}

/* Minicart Arrow */
.header-minicart-dropdown::before {
	content: '';
	position: absolute;
	bottom: 100%;
	right: 4px;
	border: 8px solid transparent;
	border-bottom-color: #ffffff;
	margin-bottom: -1px;
}

/* Minicart Content */
.header-minicart-content {
	padding: 0;
	background-color: #ffffff;
	width: 100%;
	display: flex;
	flex-direction: column;
}

/* Ensure all text in minicart is visible */
.header-minicart-dropdown * {
	color: inherit;
}

.header-minicart-dropdown a {
	color: #000000;
	text-decoration: none;
}

.header-minicart-dropdown a:hover {
	color: #ff4081;
}

/* WooCommerce Minicart Styles */
.header-minicart-dropdown .woocommerce-mini-cart {
	margin: 0;
	padding: 0;
	list-style: none;
	max-height: 300px;
	overflow-y: auto;
	scrollbar-width: thin;
	scrollbar-color: #ccc #f5f5f5;
}

.header-minicart-dropdown .woocommerce-mini-cart::-webkit-scrollbar {
	width: 6px;
}

.header-minicart-dropdown .woocommerce-mini-cart::-webkit-scrollbar-track {
	background: #f5f5f5;
}

.header-minicart-dropdown .woocommerce-mini-cart::-webkit-scrollbar-thumb {
	background: #ccc;
	border-radius: 3px;
}

.header-minicart-dropdown .woocommerce-mini-cart::-webkit-scrollbar-thumb:hover {
	background: #999;
}

.header-minicart-dropdown .woocommerce-mini-cart-item {
	padding: 16px !important;
	border-bottom: 1px solid #f0f0f0;
	display: flex !important;
	align-items: flex-start;
	gap: 12px;
	background-color: #ffffff;
	position: relative;
	transition: background-color 0.2s ease;
	flex-wrap: wrap;
	flex-direction: row;
}
.header-minicart-dropdown .woocommerce-mini-cart-item:before,
.header-minicart-dropdown .woocommerce-mini-cart-item:after {
	display: none !important;
}

.header-minicart-dropdown .woocommerce-mini-cart-item:hover {
	background-color: #fafafa;
}

.header-minicart-dropdown .woocommerce-mini-cart-item:last-child {
	border-bottom: none;
}
.header-minicart-dropdown .woocommerce-mini-cart-item .checkout-product-item img {
	display: none !important;
}

/* Product link/thumbnail area */
.header-minicart-dropdown .woocommerce-mini-cart-item > a:not(.remove):not(.remove_from_cart_button) {
	color: #000000;
	display: inline-flex;
	align-items: flex-start;
	gap: 12px;
	text-decoration: none;
	flex: 1;
	min-width: 0;
	padding-right: 30px;
}

.header-minicart-dropdown .woocommerce-mini-cart-item > a:not(.remove):not(.remove_from_cart_button):hover {
	color: #000000;
	text-decoration: none;
}

/* Product content area */
.header-minicart-dropdown .woocommerce-mini-cart-item > *:not(.remove):not(.remove_from_cart_button):not(.quantity):not(.variation) {
	display: flex !important;
	align-items: flex-start;
	gap: 12px;
	flex: 1;
	min-width: 0;
	padding-right: 35px !important;
}

/* Product thumbnail */
.header-minicart-dropdown .woocommerce-mini-cart-item img {
	width: 60px !important;
	height: 60px !important;
	object-fit: cover;
	border-radius: 4px;
	flex-shrink: 0;
	border: 1px solid #f0f0f0;
	display: block !important;
	margin: 0 !important;
	float: none !important;
}

/* Remove button */
.header-minicart-dropdown .woocommerce-mini-cart-item .remove,
.header-minicart-dropdown .woocommerce-mini-cart-item .remove_from_cart_button {
	position: absolute !important;
	top: 16px !important;
	right: 16px !important;
	left: auto !important;
	width: 20px !important;
	height: 20px !important;
	display: flex;
	align-items: center;
	justify-content: center;
	color: #999 !important;
	text-decoration: none;
	font-size: 20px;
	line-height: 1 !important;
	transition: color 0.3s ease;
	z-index: 10;
	background: transparent !important;
	border: none !important;
	cursor: pointer;
	padding: 0 !important;
	margin: 0 !important;
	text-align: center !important;
}

.header-minicart-dropdown .woocommerce-mini-cart-item .remove:hover,
.header-minicart-dropdown .woocommerce-mini-cart-item .remove_from_cart_button:hover {
	color: #ff4081 !important;
	background: transparent !important;
	opacity: 1;
}

/* Product name */
.header-minicart-dropdown .woocommerce-mini-cart-item .product-name,
.header-minicart-dropdown .woocommerce-mini-cart-item a:not(.remove),
.header-minicart-dropdown .woocommerce-mini-cart-item .woocommerce-mini-cart-item__title,
.header-minicart-dropdown .woocommerce-mini-cart-item .product-title {
	font-size: 14px !important;
	font-weight: 500 !important;
	color: #000000 !important;
	line-height: 1.4 !important;
	margin-bottom: 0px;
	display: block;
	word-wrap: break-word;
	text-decoration: none !important;
}

.header-minicart-dropdown .woocommerce-mini-cart-item a:not(.remove):hover {
	color: #F6218D !important;
	text-decoration: none;
}

/* Quantity */
.header-minicart-dropdown .woocommerce-mini-cart-item .quantity {
	display: block !important;
	width: 100%;
	font-size: 13px !important;
	color: #666666 !important;
	margin-top: 0px !important;
	font-weight: 400;
	line-height: 1.4;
	padding: 0 0 0 72px !important;
	clear: both;
}

.header-minicart-dropdown .woocommerce-mini-cart-item .quantity .amount {
	color: #666666 !important;
}

/* Variation data */
.header-minicart-dropdown .woocommerce-mini-cart-item .variation {
	font-size: 12px !important;
	color: #666 !important;
	margin-top: 4px !important;
	display: block !important;
	width: 100%;
	clear: both;
}

.header-minicart-dropdown .woocommerce-mini-cart-item .variation dt,
.header-minicart-dropdown .woocommerce-mini-cart-item .variation dd {
	display: inline;
	margin: 0;
}

.header-minicart-dropdown .woocommerce-mini-cart-item .product-details {
	flex: 1;
	min-width: 0;
	display: flex;
	flex-direction: column;
	gap: 4px;
}

.header-minicart-dropdown .woocommerce-mini-cart-item .woocommerce-mini-cart-item__thumbnail {
	flex-shrink: 0;
}

.header-minicart-dropdown .woocommerce-mini-cart-item > a:first-child {
	display: flex;
	align-items: flex-start;
	gap: 12px;
	flex: 1;
	padding-right: 30px;
}

/* Total & Buttons */
.header-minicart-dropdown .woocommerce-mini-cart__total {
	padding: 16px;
	border-top: 2px solid #f0f0f0;
	margin: 0;
	font-weight: 600;
	display: flex;
	justify-content: space-between;
	align-items: center;
	background-color: #ffffff;
	color: #000000;
	font-size: 16px;
}

.header-minicart-dropdown .woocommerce-mini-cart__total strong,
.header-minicart-dropdown .woocommerce-mini-cart__total .amount {
	font-weight: 600;
	color: #000000;
}

.header-minicart-dropdown .woocommerce-mini-cart__buttons {
	padding: 0 16px 16px;
	margin: 0;
	display: flex;
	gap: 10px;
}

.header-minicart-dropdown .woocommerce-mini-cart__buttons .button {
	flex: 1;
	padding: 12px 16px;
	text-align: center;
	text-decoration: none;
	font-size: 14px;
	font-weight: 600;
	transition: all 0.3s ease;
	display: inline-block;
	cursor: pointer;
	border: none;
}

.header-minicart-dropdown .woocommerce-mini-cart__buttons .button.wc-forward {
	background-color: #f6218d;
	color: #ffffff;
}

.header-minicart-dropdown .woocommerce-mini-cart__buttons .button.wc-forward:hover {
	background-color: #000000;
	color: #ffffff;
	transform: translateY(-1px);
	box-shadow: 0 2px 8px rgba(255, 64, 129, 0.3);
}

.header-minicart-dropdown .woocommerce-mini-cart__buttons .button.checkout {
	background-color: #000000;
	color: #ffffff;
}

.header-minicart-dropdown .woocommerce-mini-cart__buttons .button.checkout:hover {
	background-color: #f6218d;
	color: #ffffff;
	transform: translateY(-1px);
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.header-minicart-dropdown .woocommerce-mini-cart__empty-message {
	padding: 40px 20px;
	text-align: center;
	color: #666;
	margin: 0;
}

/* Minicart Loader */
.minicart-item-loading,
.woocommerce-mini-cart-item.minicart-item-loading,
.mini_cart_item.minicart-item-loading {
	position: relative;
	opacity: 0.7;
	pointer-events: none;
}

.minicart-item-loading .minicart-loader,
.woocommerce-mini-cart-item.minicart-item-loading .minicart-loader,
.mini_cart_item.minicart-item-loading .minicart-loader {
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	z-index: 10;
	background: rgba(255, 255, 255, 0.9);
	border-radius: 4px;
	padding: 10px;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.minicart-loader .spinner {
	display: inline-block;
	width: 20px;
	height: 20px;
	border: 3px solid #f3f3f3;
	border-top: 3px solid #0073aa;
	border-radius: 50%;
	animation: spin 0.8s linear infinite;
}

@keyframes spin {
	0% { transform: rotate(0deg); }
	100% { transform: rotate(360deg); }
}

/* Ensure dropdowns are above everything */
.header-profile-dropdown,
.header-minicart-dropdown {
	z-index: 99999 !important;
}

/* Fix for when dropdown content wraps */
.header-minicart-dropdown .woocommerce-mini-cart-item > * {
	max-width: 100%;
}

/* ========================================
 * MOBILE PROFILE MENU SIDEBAR
 * ======================================== */

/* Mobile Profile Menu Overlay */
.mobile-profile-menu-overlay {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background-color: rgba(0, 0, 0, 0.5);
	z-index: 99998;
	opacity: 0;
	visibility: hidden;
	transition: opacity 0.3s ease, visibility 0.3s ease;
}

.mobile-profile-menu-overlay.active {
	opacity: 1;
	visibility: visible;
}

/* Mobile Profile Menu Sidebar */
.mobile-profile-menu {
	position: fixed;
	top: 0;
	right: -100%;
	width: 80%;
	max-width: 400px;
	height: 100vh;
	background-color: #ffffff;
	z-index: 99999;
	overflow-y: auto;
	transition: right 0.3s ease;
	display: flex;
	flex-direction: column;
}

.mobile-profile-menu.active {
	right: 0;
}

/* Mobile Profile Menu Header (Pink) */
.mobile-profile-menu-header {
	background-color: #F6218D;
	padding: 20px;
	display: flex;
	justify-content: space-between;
	align-items: flex-start;
	flex-shrink: 0;
}

.mobile-profile-menu-user-info {
	display: flex;
	flex-direction: column;
	gap: 4px;
	flex: 1;
}

.mobile-profile-menu-name {
	font-size: 18px;
	font-weight: 600;
	color: #ffffff;
	line-height: 1.4;
}

.mobile-profile-menu-email {
	font-size: 14px;
	color: #ffffff;
	opacity: 0.9;
	line-height: 1.4;
}

.mobile-profile-menu-close {
	background: none;
	border: none;
	padding: 0;
	cursor: pointer;
	color: #ffffff;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 32px;
	height: 32px;
	flex-shrink: 0;
	margin-left: 16px;
}

.mobile-profile-menu-close svg {
	width: 24px;
	height: 24px;
}

.mobile-profile-menu-close:hover {
	opacity: 0.8;
}

/* Mobile Profile Menu Content */
.mobile-profile-menu-content {
	flex: 1;
	padding: 0;
	overflow-y: auto;
}

.mobile-profile-menu-item {
	display: block;
	padding: 16px 20px;
	color: #333333;
	text-decoration: none;
	font-size: 16px;
	line-height: 1.5;
	border-bottom: 1px dotted #e0e0e0;
	transition: background-color 0.2s ease, color 0.2s ease;
}

.mobile-profile-menu-item:last-child {
	border-bottom: none;
}

.mobile-profile-menu-item:hover {
	background-color: #f5f5f5;
	color: #F6218D;
}

.mobile-profile-menu-item.current {
	background-color: #fef2f8;
	color: #F6218D;
	font-weight: 500;
}

/* Mobile Profile Menu Footer */
.mobile-profile-menu-footer {
	padding: 20px;
	flex-shrink: 0;
	border-top: 1px solid #e0e0e0;
}

.mobile-profile-menu-button {
	display: block;
	width: 100%;
	padding: 14px 20px;
	background-color: #F6218D;
	color: #ffffff;
	text-align: center;
	text-decoration: none;
	font-size: 16px;
	font-weight: 500;
	border-radius: 4px;
	transition: background-color 0.3s ease;
}

.mobile-profile-menu-button:hover {
	background-color: #e01a7a;
	color: #ffffff;
}

/* Prevent body scroll when mobile menu is open */
body.mobile-profile-menu-open {
	overflow: hidden;
	position: fixed;
	width: 100%;
}

/* Hide mobile profile menu on desktop */
@media (min-width: 768px) {
	.mobile-profile-menu,
	.mobile-profile-menu-overlay {
		display: none !important;
	}
}

/* ========================================
 * MOBILE PROFILE MENU SIDEBAR
 * ======================================== */

/* Mobile Profile Menu Overlay */
.mobile-profile-menu-overlay {
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	background-color: rgba(0, 0, 0, 0.5);
	z-index: 99998;
	opacity: 0;
	visibility: hidden;
	transition: opacity 0.3s ease, visibility 0.3s ease;
}

.mobile-profile-menu-overlay.active {
	opacity: 1;
	visibility: visible;
}

/* Mobile Profile Menu Sidebar */
.mobile-profile-menu {
	position: fixed;
	top: 0;
	right: -100%;
	width: 70%;
	max-width: 400px;
	height: 100vh;
	background-color: #ffffff;
	z-index: 99999;
	transition: right 0.3s ease;
	display: flex;
	flex-direction: column;
	box-shadow: -2px 0 10px rgba(0, 0, 0, 0.1);
	overflow-y: auto;
}

.mobile-profile-menu.active {
	right: 0;
}

/* Prevent body scroll when menu is open */
body.mobile-profile-menu-open {
	overflow: hidden;
}

/* Mobile Profile Menu Header (Pink) */
.mobile-profile-menu-header {
	background-color: #F6218D;
	padding: 20px;
	display: flex;
	justify-content: space-between;
	align-items: flex-start;
	gap: 15px;
	position: relative;
}

.mobile-profile-menu-user-info {
	display: flex;
	flex-direction: column;
	gap: 5px;
	flex: 1;
}

.mobile-profile-menu-name {
	font-size: 18px;
	font-weight: 700;
	color: #ffffff;
	line-height: 1.3;
}

.mobile-profile-menu-email {
	font-size: 14px;
	color: #ffffff;
	opacity: 0.9;
	line-height: 1.3;
}

.mobile-profile-menu-close {
	background: none;
	border: none;
	padding: 5px;
	cursor: pointer;
	color: #ffffff;
	display: flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
	width: 32px;
	height: 32px;
	transition: opacity 0.2s ease;
}

.mobile-profile-menu-close:hover {
	opacity: 0.8;
}

.mobile-profile-menu-close svg {
	width: 24px;
	height: 24px;
}

/* Mobile Profile Menu Content */
.mobile-profile-menu-content {
	flex: 1;
	padding: 0;
	display: flex;
	flex-direction: column;
}

.mobile-profile-menu-item {
	display: block;
	padding: 18px 20px;
	color: #333333;
	text-decoration: none;
	font-size: 16px;
	border-bottom: 1px dotted #e0e0e0;
	transition: background-color 0.2s ease, color 0.2s ease;
}

.mobile-profile-menu-item:last-child {
	border-bottom: none;
}

.mobile-profile-menu-item:hover {
	background-color: #f5f5f5;
	color: #F6218D;
}

.mobile-profile-menu-item.current {
	background-color: #fef2f8;
	color: #F6218D;
	font-weight: 600;
}

/* Mobile Profile Menu Footer (Project Tenders Button) */
.mobile-profile-menu-footer {
	padding: 20px;
	background-color: #ffffff;
	border-top: 1px solid #e0e0e0;
}

.mobile-profile-menu-button {
	display: block;
	width: 100%;
	padding: 15px 20px;
	background-color: #F6218D;
	color: #ffffff;
	text-align: center;
	text-decoration: none;
	font-size: 16px;
	font-weight: 600;
	border-radius: 4px;
	transition: background-color 0.2s ease, opacity 0.2s ease;
}

.mobile-profile-menu-button:hover {
	background-color: #e01a7a;
	opacity: 0.9;
}

/* Hide mobile profile menu on desktop */
@media (min-width: 768px) {
	.mobile-profile-menu,
	.mobile-profile-menu-overlay {
		display: none !important;
	}
}

/* Mobile responsive adjustments */
@media (max-width: 575px) {
	.mobile-profile-menu {
		width: 80%;
		max-width: 350px;
	}

	.mobile-profile-menu-header {
		padding: 15px;
	}

	.mobile-profile-menu-name {
		font-size: 16px;
	}

	.mobile-profile-menu-email {
		font-size: 13px;
	}

	.mobile-profile-menu-item {
		padding: 15px 18px;
		font-size: 15px;
	}

	.mobile-profile-menu-footer {
		padding: 15px;
	}

	.mobile-profile-menu-button {
		padding: 12px 18px;
		font-size: 15px;
	}
}

