/* ==========================================================================
   Loanworks Mega Menu â€” Software dropdown (The7 theme override)
   Scoped entirely to li.lw-mega so it never touches other dropdowns.

   The7 already renders nested .sub-nav as a right-hand flyout natively
   (see main.min.css: ".sub-nav .sub-nav{left:241px;top:0}") and shows /
   hides panels by toggling inline visibility+opacity via jQuery â€” NOT
   display. So we only need to:
     1. Resize the left column (.lw-mega's own .sub-nav) and the right
        column (Loan Origination's nested .sub-nav).
     2. Force Loan Origination's panel to always be visible whenever the
        Software dropdown itself is open â€” Commissions & Originator
        Portal have no nested .sub-nav, so nothing shows for them.
     3. On the mobile off-canvas menu (#mobile-menu), force every level
        open flat and hide the auto-inserted toggle arrow entirely.
   ========================================================================== */

:root {
	--lw-mega-left-col: 25vw;
	--lw-mega-right-col: 34vw;
	--lw-mega-gap: 14px;
}

/* -------------------------------------------------------------------- */
/* DESKTOP â€” #primary-menu                                              */
/* -------------------------------------------------------------------- */

/* Left column: Loan Origination / Commissions / Originator Portal */
#primary-menu > li.lw-mega > .sub-nav {
	width: var(--lw-mega-left-col);
	padding: 0;
}

/* Right column: Loan Origination's children (Quantum, Document
   Intelligence, Now Apply & Now Track). Overrides the theme default
   ".sub-nav .sub-nav{left:241px}" which assumed the default 240px width. */
#primary-menu > li.lw-mega > .sub-nav > li.has-children > .sub-nav {
	left: calc(var(--lw-mega-left-col) + var(--lw-mega-gap)) !important;
	top: 0;
	width: var(--lw-mega-right-col);
	padding: 0;
}

/* Always show Loan Origination's panel whenever the Software dropdown
   itself is open â€” no separate hover needed on "Loan Origination".
   Commissions / Originator Portal have no .sub-nav, so this rule simply
   doesn't apply to them and they behave as plain links. !important is
   required because The7's JS sets visibility/opacity as inline styles. */
#primary-menu > li.lw-mega > .sub-nav > li.has-children > .sub-nav {
	visibility: visible !important;
	opacity: 1 !important;
}

/* -------------------------------------------------------------------- */
/* MOBILE â€” #mobile-menu (The7's off-canvas menu, separate markup)      */
/* -------------------------------------------------------------------- */

/* Force every level open, always, in normal flow â€” no accordion. */
/* #mobile-menu li.lw-mega .sub-nav,
#mobile-menu li.lw-mega .sub-nav .sub-nav {
	position: static !important;
	visibility: visible !important;
	opacity: 1 !important;
	width: 100% !important;
	left: auto !important;
	box-shadow: none !important;
	background: transparent !important;
} */

/* Indent each level a bit so the hierarchy still reads clearly. */
/* #mobile-menu li.lw-mega > .sub-nav {
	padding-left: 16px;
} */

/* #mobile-menu li.lw-mega > .sub-nav > li.has-children > .sub-nav {
	padding-left: 16px;
} */

/* No toggle arrows anywhere in this dropdown on mobile. */
/* #mobile-menu li.lw-mega .next-level-button {
	display: none !important;
} */
