/* Desktop Navigation
--------------------------------------------- */

.wp-block-navigation__responsive-container:not(.is-menu-open) .wp-block-navigation__container .current-menu-item > a,
.wp-block-navigation__responsive-container:not(.is-menu-open) .wp-block-navigation__container .has-child button:hover {
	color: #39C1FF !important;
}

/* Drop nav */
.wp-block-navigation__responsive-container:not(.is-menu-open) .wp-block-navigation__submenu-container {
	border: none !important;
	font-size: var(--wp--preset--font-size--small);
	line-height: var(--wp--custom--line-height--snug);
	border-radius: 5px;
	min-width: 225px !important;
	margin-left: calc(var(--wp--preset--spacing--medium) * -1);
	padding: 0;
	z-index: 20 !important;
	border-radius: 5px;
	box-shadow: var(--wp--preset--shadow--small-light);
}

/* Drop nav submenu */
.wp-block-navigation__responsive-container:not(.is-menu-open) .wp-block-navigation__submenu-container .wp-block-navigation__submenu-container {
	margin-left: 0;
	top: 0 !important;
	left: 100%;
}

.wp-block-navigation__responsive-container:not(.is-menu-open) :where(.wp-block-navigation__submenu-container) li:first-child {
	padding-top: var(--wp--preset--spacing--small);
	border-top-left-radius: 5px;
	border-top-right-radius: 5px;
}

/* Add padding to bottom of drop menu */
.wp-block-navigation__responsive-container:not(.is-menu-open) :where(.wp-block-navigation__submenu-container) li:last-child {
	padding-bottom: var(--wp--preset--spacing--small);
	border-bottom-left-radius: 5px;
	border-bottom-right-radius: 5px;
}

/* Add margin to sub menu icon */
.wp-block-navigation__responsive-container:not(.is-menu-open) .has-child .wp-block-navigation__submenu-container .wp-block-navigation__submenu-icon {
	margin-right: var(--wp--preset--spacing--small);
}

/* Drop nav link padding */
.wp-block-navigation__responsive-container:not(.is-menu-open) :where(.wp-block-navigation__submenu-container) a,
.wp-block-navigation__responsive-container:not(.is-menu-open) :where(.wp-block-navigation__submenu-container) .wp-block-navigation-submenu__toggle {
	padding: var(--wp--preset--spacing--small) var(--wp--preset--spacing--medium) !important;
}

/* Mobile Navigation
--------------------------------------------- */

.wp-block-navigation__responsive-container.is-menu-open.has-modal-open {
	padding: var(--wp--preset--spacing--medium);
}

.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__responsive-container-content {
	gap: var(--wp--preset--spacing--medium);
}

.wp-block-navigation__responsive-container.is-menu-open.has-modal-open .wp-block-navigation__container {
	width: 100%;
	gap: 5px !important;
}

.wp-block-navigation__responsive-container.is-menu-open.has-modal-open .wp-block-page-list {
	width: 100%;
}

.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__responsive-container-content .has-child .wp-block-navigation__submenu-container {
	border-radius: 0;
	margin: 0;
	padding: 5px 0 0 20px;
	align-items: flex-start;
	flex-direction: column;
	gap: 5px;
	width: 100%;
}

.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__responsive-container-content .wp-block-navigation__submenu-icon {
	display: block;
	position: absolute;
	right: 0;
	top: 5px;
	height: auto;
	width: 60px;
	padding: 15px 0;
	margin: 0;
	z-index: 10;
}

body.rtl .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__responsive-container-content .wp-block-navigation__submenu-icon {
	left: 0;
	right: auto;
}

.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__responsive-container-content .wp-block-navigation__submenu-icon svg {
	height: 16px;
	margin: 0;
}

.wp-block-navigation .has-child .wp-block-navigation__submenu-container {
	display: none;
}

.wp-block-navigation-submenu__toggle[aria-expanded="true"] ~ .wp-block-navigation-submenu,
.wp-block-navigation-submenu__toggle[aria-expanded="true"] ~ .wp-block-navigation__submenu-container {
	display: flex;
}

.wp-block-navigation__responsive-container.is-menu-open.has-modal-open .wp-block-navigation__container li:not(.wp-social-link) {
	width: 100%;
	padding: 0 0;
	position: relative;
}

/* Mobile menu links */
.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__responsive-container-content .wp-block-navigation-item__content {
	width: 100%;
	font-size: var(--wp--preset--font-size--base);
	padding: 15px 60px 15px 15px;
	border-radius: 5px;
}

body.rtl .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__responsive-container-content .wp-block-navigation-item__content {
	padding: 15px 15px 15px 60px;
}

.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__container .current-menu-item > .wp-block-navigation-item__content,
.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__container .wp-block-navigation-item:hover > .wp-block-navigation-item__content {
	transition: .3s ease;
	text-decoration: none;
	background: color-mix(in srgb, currentColor, transparent 97%);
	-webkit-tap-highlight-color: transparent;
}

.wp-block-navigation__container .wp-block-navigation-item:has(.wp-block-navigation__submenu-container:hover) > .wp-block-navigation-item__content {
	background: transparent;
}

/* Mobile menu open button */
.wp-block-navigation__responsive-container-close,
.wp-block-navigation__responsive-container-open {
	padding: 4px;
	border-radius: 3px;
	background: var(--wp--preset--color--tertiary);
	color: var(--wp--preset--color--main);
}

/* Mobile menu close button */
.wp-block-navigation__responsive-container-close {
	background: var(--wp--preset--color--tertiary);
	color: var(--wp--preset--color--main);
}

.wp-block-ollie-mega-menu__menu-container {
	font-weight: 400;
}


.wp-block-navigation-item__content {
	transition: all 0.3s ease;
}
.wp-block-navigation-item__content:hover {
	color: #39C1FF !important;
	text-decoration: none;
}

/* Samsar Mobile Menu
--------------------------------------------- */

/* Closed + open: hamburger button — a single persistent toggle that morphs
   into an X when the menu opens. We hide the native SVG and draw the two
   lines via pseudo-elements so they can rotate. Hold the same screen coords
   in both states (top:40 right:24) so there's no shift, and let JS in the
   `samsar-mobile-menu` mu-plugin route the second click to WP's hidden
   close button. */
.wp-block-navigation__responsive-container-open {
	width: 24px;
	height: 24px;
	position: relative;
	background: transparent;
	color: var(--wp--preset--color--base);
	padding: 0;
	border-radius: 0;
}

.wp-block-navigation__responsive-container-open svg {
	display: none;
}

.wp-block-navigation__responsive-container-open::before,
.wp-block-navigation__responsive-container-open::after {
	content: "";
	position: absolute;
	left: 0;
	right: 0;
	height: 1.5px;
	background-color: currentColor;
	transform-origin: center;
	transition: transform 0.3s ease, top 0.3s ease;
}

.wp-block-navigation__responsive-container-open::before {
	top: 8px;
}

.wp-block-navigation__responsive-container-open::after {
	top: 15.5px;
}

/* Keep the hamburger visible above the modal while menu is open — its job
   becomes the close button. */
.wp-block-navigation:has(.is-menu-open) .wp-block-navigation__responsive-container-open {
	display: flex;
	position: fixed;
	top: 40px;
	right: 24px;
	z-index: 100002;
}

.wp-block-navigation:has(.is-menu-open) .wp-block-navigation__responsive-container-open::before {
	top: 11.5px;
	transform: rotate(45deg);
}

.wp-block-navigation:has(.is-menu-open) .wp-block-navigation__responsive-container-open::after {
	top: 11.5px;
	transform: rotate(-45deg);
}

/* Open: full-bleed dark overlay
   Specificity note: matches WP core's `.wp-block-navigation:not(.has-background) ... is-menu-open` (0,4,0) and wins on source order. */
.wp-block-navigation .wp-block-navigation__responsive-container.is-menu-open.has-modal-open {
	background-color: var(--wp--preset--color--main);
	color: var(--wp--preset--color--base);
}

/* Kill WP core's `overlay-menu__fade-in-animation` — it translates the modal
   0.5em (~7.3px) on open. Together with the sticky-header containing-block
   fix below, this is what guarantees the menu is in its final position at
   the *start* of the transition, not the end. */
.wp-block-navigation__responsive-container.is-menu-open {
	animation: none !important;
}

/* Containing-block escape for the sticky header.
   The Ollie sticky header sets `transform: translateY(...)` + `will-change: transform`
   to slide in/out on scroll. Either one creates a new containing block for any
   `position: fixed` descendants — including the WP nav modal — which means
   `inset: 0` would size the modal to the 104px header instead of the viewport.
   When the menu opens, neutralize both.
   `transition: none` is load-bearing: the header has `transition: transform 0.25s`,
   so without it the transform would interpolate from identity → none over 250ms,
   and during that window the interpolated value is still a non-`none` matrix
   that keeps the containing block alive — making the modal open into a 48px
   strip and snap to full-bleed at the end of the transition. */
body:has(.wp-block-navigation__responsive-container.is-menu-open) .site-header.is-pinned,
body:has(.wp-block-navigation__responsive-container.is-menu-open) .site-header.is-fixed {
	transform: none !important;
	will-change: auto !important;
	transition: none !important;
}

/* The native close (X) button is hidden — the hamburger above handles both
   open and close. Kept in the DOM so the mu-plugin can route the second
   hamburger click through it (preserves WP Interactivity's closeMenuOnClick). */
.wp-block-navigation__responsive-container-close {
	display: none !important;
}

/* Open: flex chain — the modal is `flex-direction: column`; make every wrapper
   participate in the flex chain so the content area can `flex-grow: 1` and the
   menu items center vertically in the available space. */
.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__responsive-close {
	display: flex;
	flex-direction: column;
	flex-grow: 1;
	width: 100%;
}

.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__responsive-dialog {
	display: flex;
	flex-direction: column;
	flex-grow: 1;
	position: relative;
}

/* Open: content area fills the dialog and centers the menu list both ways */
.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__responsive-container-content {
	flex-grow: 1;
	display: flex;
	align-items: center;
	justify-content: center;
	padding-top: 0;
}

/* Open: menu list as a centered column with Figma's 40px gap rhythm.
   `flex-grow: 0` is load-bearing — WP's `.is-responsive` rule grows the <ul>
   to fill the dialog, which would override the parent's `justify-content: center`
   and pin items to the top. */
.wp-block-navigation__responsive-container.is-menu-open.has-modal-open .wp-block-navigation__container {
	flex-direction: column;
	align-items: center;
	flex-grow: 0;
	width: auto;
	gap: 40px !important;
}

.wp-block-navigation__responsive-container.is-menu-open.has-modal-open .wp-block-navigation__container li:not(.wp-social-link) {
	width: auto;
	padding: 0;
}

/* Open: menu link typography per Figma (APK Galeria Bold 26px) */
.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__responsive-container-content .wp-block-navigation-item__content {
	width: auto;
	font-family: var(--wp--preset--font-family--primary), sans-serif;
	font-size: 26px;
	font-weight: 700;
	line-height: 1.1;
	color: var(--wp--preset--color--base);
	padding: 0;
	text-align: center;
	border-radius: 0;
}

/* Open: kill the current-item / hover wash */
.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__container .current-menu-item > .wp-block-navigation-item__content,
.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__container .wp-block-navigation-item:hover > .wp-block-navigation-item__content {
	background: transparent;
	color: var(--wp--preset--color--base);
}

/* Open: keep the site logo visible above the modal at its closed-state
   coords (header padding is 24px). No padding-right override — that would
   change the wrapper width and visually nudge the logo. */
body:has(.wp-block-navigation__responsive-container.is-menu-open) .wp-block-site-logo {
	position: fixed;
	top: 24px;
	left: 24px;
	z-index: 100001;
	margin: 0;
}

/* Open: pin the Get-a-Quote brand button 40px from the bottom (Figma) */
body:has(.wp-block-navigation__responsive-container.is-menu-open) .wp-block-buttons:has(.is-style-button-brand) {
	position: fixed;
	bottom: 40px;
	left: 50%;
	transform: translateX(-50%);
	z-index: 100001;
	margin: 0;
}

/* Closed mobile: WP's `space-between` header relies on the Quote button as the
   right-hand sibling. We hide that button on mobile, so we also need to push
   the logo+nav inner group to span the full row and place the hamburger at
   the right edge via internal `space-between`. Also hides the Quote button. */
@media (max-width: 599.98px) {
	.wp-block-group.alignwide > .wp-block-group:has(> .wp-block-site-logo) {
		flex-grow: 1;
		justify-content: space-between;
	}

	body:not(:has(.wp-block-navigation__responsive-container.is-menu-open)) .wp-block-buttons:has(.is-style-button-brand) {
		display: none;
	}
}
