/**
 * Full-screen menu panes (17.31.0) — the ONE stylesheet for every pane: the top-bar hamburger menu and the bottom
 * bar's Menu, Tools and Custom Menu Panes. Markup: include/pane.php. Behaviour: js/pane.js. Colours, width, side,
 * text size and the heading's look are printed on top of these defaults by include/navbars-inline-css.php from
 * Customize -> Top and Bottom Menu Panes.
 */

/* =====================================================
   FULL-SCREEN MENU PANES — one set of rules for the top-bar hamburger menu and the bottom bar's Menu, Tools
   and Custom panes (17.31.0; they used to be two copies, in topnav.css and bottomnav.css)
   Uses opacity/visibility toggle — no translateY,
   no transitionend reliance. Android Chrome safe.
===================================================== */

.bottomnav-menu-overlay {
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	bottom: var(--bottomnav-h, 0px);
	z-index: 99998;
	/* Hidden state */
	opacity: 0;
	visibility: hidden;
	pointer-events: none;
	transition: opacity 0.22s ease, visibility 0s linear 0.22s;
}
/* When bottom nav is hidden on desktop, overlays go full height.
   Kept in sync with the 1024px hide-desktop breakpoint above — must
   move together, or the full-screen menu overlay/mobile panel would
   go full-height (assuming no bar) in a width range where the bar is
   actually still visible, and vice versa. */
@media (min-width: 1024px) {
	body.has-bottomnav-hide-desktop .bottomnav-menu-overlay { bottom: 0; }
}
.bottomnav-menu-overlay.is-open {
	opacity: 1;
	visibility: visible;
	pointer-events: auto;
	transition: opacity 0.22s ease, visibility 0s linear 0s;
}

/* Dimmed backdrop */
.bottomnav-menu-overlay-backdrop {
	position: absolute;
	inset: 0;
	background: rgba(0,0,0,0.72);
}

/* Scrollable panel — centred card */
.bottomnav-menu-overlay-panel {
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	display: flex;
	flex-direction: column;
	background: #1e1e1e;
	overflow: hidden;
}

/* Header */
.bottomnav-menu-overlay-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	/* 17.27.0: 4px on the right (was 20px) — the close button sits further out, so the heading text gets more room. */
	padding: 16px 4px 14px 20px;
	border-bottom: 1px solid rgba(255,255,255,0.1);
	flex-shrink: 0;
}
.bottomnav-menu-overlay-title {
	/* 17.27.0: shown as typed (it used to be forced to CAPITALS with wide letter-spacing), and free to
	   use the whole width left of the close button — a long heading wraps instead of being cut off.
	   Colour, opacity and size can be changed in Customize -> Bottom Navigation Bar (see
	   include/navbars-inline-css.php); these are the defaults. */
	flex: 1 1 auto;
	min-width: 0;
	padding-right: 8px;
	font-size: 13px;
	font-weight: 700;
	color: rgba(255,255,255,0.5);
	line-height: 1.25;
	overflow-wrap: anywhere;
}
.bottomnav-menu-overlay-close {
	background: none;
	border: none;
	color: rgba(255,255,255,0.6);
	cursor: pointer;
	width: 44px; height: 44px;
	display: flex;
	align-items: center;
	justify-content: center;
	border-radius: 8px;
	transition: color 0.2s, background 0.2s;
	flex-shrink: 0;
}
.bottomnav-menu-overlay-close:hover {
	color: #ffffff;
	background: rgba(255,255,255,0.1);
}
.bottomnav-menu-overlay-close svg {
	width: 18px;
	height: 18px;
	display: block;
}

/* A pane with NO heading row (heading area switched off, or a hyphen typed for that pane): there is no row for
   the X to sit in, so the very same button is simply positioned in the panel's top-right corner — same size,
   colour and hover as the X in the heading row. The first row of the list keeps 52px free beside it. */
.bottomnav-menu-overlay-close--float {
	position: absolute;
	top: 3px;
	right: 4px;
	z-index: 3;
}
.bottomnav-menu-overlay-close--float ~ .bottomnav-menu-overlay-body .bottomnav-menu-overlay-menu > li:first-child {
	padding-right: 52px;
}

/* Scrollable body */
.bottomnav-menu-overlay-body {
	overflow-y: auto;
	-webkit-overflow-scrolling: touch;
	flex: 1;
	padding: 0 0 20px;
}

/* Menu items */
.bottomnav-menu-overlay-menu {
	list-style: none !important;
	margin: 0 !important;
	padding: 0 !important;
}
.bottomnav-menu-overlay-menu > li {
	margin: 0 !important;
	list-style: none !important;
}
.bottomnav-menu-overlay-menu > li > a {
	display: flex;
	align-items: center;
	color: #ffffff;
	text-decoration: none;
	padding: 15px 24px;
	font-size: 15px;
	font-weight: 500;
	line-height: 1.3;
	border-bottom: 1px solid rgba(255,255,255,0.06);
	transition: background 0.15s, color 0.15s;
}
.bottomnav-menu-overlay-menu > li:last-child > a {
	border-bottom: none;
}
.bottomnav-menu-overlay-menu > li > a:hover,
.bottomnav-menu-overlay-menu > li.current-menu-item > a,
.bottomnav-menu-overlay-menu > li.current_page_item > a {
	background: rgba(255,255,255,0.06);
	color: #fff551;
}

/* Sub-menu items */
.bottomnav-menu-overlay-menu ul {
	list-style: none !important;
	margin: 0 !important;
	padding: 0 !important;
}
.bottomnav-menu-overlay-menu ul li {
	list-style: none !important;
	margin: 0 !important;
}
.bottomnav-menu-overlay-menu ul li a {
	display: block;
	color: rgba(255,255,255,0.65);
	text-decoration: none;
	padding: 11px 24px 11px 44px;
	font-size: 14px;
	line-height: 1.3;
	border-bottom: 1px solid rgba(255,255,255,0.04);
	transition: background 0.15s, color 0.15s;
}
.bottomnav-menu-overlay-menu ul li a:hover {
	color: #ffffff;
	background: rgba(255,255,255,0.04);
}


/* =====================================================
   MENU OVERLAY FOOTER BUTTONS (WhatsApp + PDFs)
   Shared by both topnav panel and bottomnav overlay.
   Always pinned at the bottom — menu items scroll above.
===================================================== */
.menu-overlay-footer {
	display: flex;
	flex-direction: row;
	gap: 12px;
	justify-content: center;
	align-items: center;
	padding: 14px 20px;
	flex-shrink: 0;
	border-top: 1px solid rgba(255,255,255,0.1);
}
.menu-overlay-footer-btn {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 56px;
	height: 56px;
	border-radius: 10px;
	background: rgba(255,255,255,0.12);
	color: #ffffff;
	text-decoration: none;
	transition: background 0.2s, color 0.2s;
	flex-shrink: 0;
}
.menu-overlay-footer-btn:hover {
	background: rgba(255,255,255,0.22);
	color: #fff551;
}
.menu-overlay-footer-btn svg {
	width: 26px;
	height: 26px;
	display: block;
	fill: currentColor;
	transition: fill 0.2s;
}
.menu-overlay-footer-btn:hover svg {
	fill: #fff551;
}


/* =====================================================
   TOOLS DRAWER FOOTER (17.10.0)
   The Tools pane reuses every pane style above.
   Its footer buttons can carry a text label ("[icon] All Tools"),
   which turns the square icon button into a wider pill.
===================================================== */
.menu-overlay-footer-btn.menu-overlay-footer-btn--labeled {
	width: auto;
	min-width: 56px;
	height: 48px;
	padding: 0 20px;
	gap: 10px;
	font-size: 16px;
	font-weight: 600;
	line-height: 1;
	white-space: nowrap;
}
.menu-overlay-footer-btn--labeled svg,
.menu-overlay-footer-btn--labeled img {
	width: 20px;
	height: 20px;
	display: block;
	flex-shrink: 0;
}
.menu-overlay-footer-btn img {
	width: 26px;
	height: 26px;
	display: block;
	object-fit: contain;
}
