/**
 * Float Menu Styles
 * Styles for floating menu that appears on click (WooCommerce cart style)
 */

/* Overlay/Backdrop */
.forwp-float-menu-overlay {
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	background: rgba(0, 0, 0, 0.5);
	z-index: 999998;
	opacity: 0;
	visibility: hidden;
	transition: opacity 0.3s ease, visibility 0.3s ease;
	backdrop-filter: blur(1px);
}

.forwp-float-menu-overlay.is-open {
	opacity: 1;
	visibility: visible;
}

/* Float menu container - slides in from right */
.forwp-float-menu {
	position: fixed;
	top: 0;
	right: 0;
	bottom: 0;
	width: 100%;
	max-width: 500px;
	background: #fff;
	box-shadow: -2px 0 10px rgba(0, 0, 0, 0.1);
	padding: 0;
	margin: 0;
	overflow-y: auto;
	overflow-x: hidden; /* Prevent horizontal scroll unless needed */
	z-index: 999999;
	transform: translateX(100%);
	transition: transform 0.3s ease;
	display: flex;
	flex-direction: column;
}

.forwp-float-menu.is-open {
	transform: translateX(0);
}

/* Float menu header */
.forwp-float-menu-header {
	padding: 20px;
	border-bottom: 1px solid #e0e0e0;
	display: flex;
	justify-content: space-between;
	align-items: center;
	background: #fff;
	position: sticky;
	top: 0;
	z-index: 10;
}

.forwp-float-menu-title {
	font-size: 1.25rem;
	font-weight: 600;
	margin: 0;
}

.forwp-float-menu-close {
	background: none;
	border: none;
	font-size: 24px;
	cursor: pointer;
	padding: 0;
	width: 32px;
	height: 32px;
	display: flex;
	align-items: center;
	justify-content: center;
	border-radius: 4px;
	transition: background-color 0.2s ease;
	color: #666;
}

.forwp-float-menu-close:hover {
	background-color: #f0f0f0;
	color: #000;
}

/* Float menu content */
.forwp-float-menu-content {
	flex: 1;
	overflow-y: auto;
	overflow-x: hidden; /* Prevent horizontal scroll unless needed */
	width: 100%;
	max-width: 100%;
}

/* Float menu content */
.forwp-float-menu .wp-block-navigation__submenu-container {
	position: static;
	display: block;
	opacity: 1;
	visibility: visible;
	box-shadow: none;
	border: none;
	padding: 0;
	margin: 0;
	width: 100%;
}

.forwp-float-menu .mega-panel,
.forwp-float-menu .float-menu-container,
.forwp-float-menu > div {
	position: static;
	display: block !important;
	padding: 1rem 1rem;
	width: 100%;
	max-width: 100%;
	box-sizing: border-box;
	overflow-x: hidden; /* Prevent horizontal scroll */
}

.forwp-float-menu .float-menu-container {
	display: block !important;
}

/* Float menu trigger styling */
.forwp-float-menu-trigger {
	position: relative;
}

.forwp-float-menu-trigger.is-active > a {
	opacity: 0.8;
}

/* Remove any unwanted borders/outlines from float menu triggers */
.forwp-float-menu-trigger,
.forwp-float-menu-trigger * {
	outline: none !important;
	box-shadow: none !important;
}

.forwp-float-menu-trigger:focus,
.forwp-float-menu-trigger:focus-within {
	outline: none !important;
	box-shadow: none !important;
}

/* Ensure submenu is hidden for float menu triggers that use data-float-container-id */
.forwp-float-menu-trigger[data-float-container-id] .wp-block-navigation__submenu-container {
	display: none !important;
}

/* Hide float-menu-container blocks on the page (they will be shown in float menu) */
.float-menu-container {
	display: none !important;
}

/* Show float-menu-container when it's inside the float menu */
.forwp-float-menu .float-menu-container {
	display: block !important;
}

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

/* Responsive adjustments - will be overridden by dynamic CSS from theme.json breakpoints */
/* Default mobile styles (fallback if dynamic CSS doesn't load) */
@media (max-width: 599px) {
	.forwp-float-menu {
		max-width: 75%;
		width: 75%;
	}
}
