/* NGMC PWA — App Mode (top bar, bottom tab bar, sheets).
   Everything is scoped to html.ngmc-app, which is set before first paint
   only when the site runs as the installed app (or on phones, if enabled). */

.ngmc-appbar,
.ngmc-tabbar,
.ngmc-sheet,
.ngmc-progress,
.ngmc-ptr {
	display: none;
}

html.ngmc-app {
	--ngmc-top-h: 56px;
	--ngmc-nav-h: 64px;
	--ngmc-safe-top: env(safe-area-inset-top, 0px);
	--ngmc-safe-bottom: env(safe-area-inset-bottom, 0px);
	--ngmc-ink: #0f172a;
	--ngmc-line: rgba(15, 23, 42, .08);
	scroll-padding-top: calc(var(--ngmc-top-h) + var(--ngmc-safe-top) + 8px);
	-webkit-tap-highlight-color: transparent;
}

html.ngmc-app body {
	padding-top: calc(var(--ngmc-top-h) + var(--ngmc-safe-top)) !important;
	padding-bottom: calc(var(--ngmc-nav-h) + var(--ngmc-safe-bottom)) !important;
	padding-left: env(safe-area-inset-left, 0px);
	padding-right: env(safe-area-inset-right, 0px);
}
/* our own pull-to-refresh replaces the bounce/glow in the installed app;
   phone browsers keep their native pull-to-refresh */
html.ngmc-app-standalone body {
	overscroll-behavior-y: none;
}

html.ngmc-app .ngmc-ic {
	width: 24px;
	height: 24px;
	flex: none;
	display: block;
}

/* ------------------------------------------------------------- top bar */

html.ngmc-app .ngmc-appbar {
	position: fixed;
	z-index: 9990;
	top: 0;
	left: 0;
	right: 0;
	display: flex;
	align-items: center;
	gap: 4px;
	height: calc(var(--ngmc-top-h) + var(--ngmc-safe-top));
	padding: var(--ngmc-safe-top) max(6px, env(safe-area-inset-right, 0px)) 0 max(6px, env(safe-area-inset-left, 0px));
	box-sizing: border-box;
	font-family: inherit;
	transition: transform .25s ease;
	view-transition-name: ngmc-appbar;
}
.ngmc-appbar--theme {
	background: var(--ngmc-app-theme, #25519a);
	color: #fff;
	box-shadow: 0 2px 10px rgba(0, 0, 0, .14);
}
.ngmc-appbar--light {
	background: #fff;
	color: var(--ngmc-ink, #0f172a);
	box-shadow: 0 1px 0 var(--ngmc-line, rgba(15, 23, 42, .08));
}
.ngmc-appbar__title {
	flex: 1;
	min-width: 0;
	padding: 0 8px;
	font-size: 18px;
	font-weight: 600;
	line-height: 1.2;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	letter-spacing: .1px;
}
.ngmc-appbar__brand {
	display: flex;
	align-items: center;
	padding: 0 4px 0 8px;
}
.ngmc-appbar__brand img {
	width: 32px;
	height: 32px;
	border-radius: 8px;
	display: block;
	background: #fff;
}
.ngmc-appbar__btn {
	appearance: none;
	-webkit-appearance: none;
	display: inline-grid;
	place-items: center;
	flex: none;
	width: 44px;
	height: 44px;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: transparent !important;
	color: inherit !important;
	cursor: pointer;
	text-decoration: none !important;
	box-shadow: none !important;
}
.ngmc-appbar__btn:active {
	background: rgba(127, 127, 127, .18) !important;
}
.ngmc-appbar__btn:focus-visible,
.ngmc-tab:focus-visible,
.ngmc-sheet button:focus-visible,
.ngmc-sheet a:focus-visible {
	outline: 3px solid var(--ngmc-tab-active, #25519a);
	outline-offset: -3px;
}
.ngmc-appbar--theme .ngmc-appbar__btn:focus-visible {
	outline-color: #fff;
}

/* ---------------------------------------------------------- tab bar */

html.ngmc-app .ngmc-tabbar {
	position: fixed;
	z-index: 9990;
	left: 0;
	right: 0;
	bottom: 0;
	display: grid;
	grid-template-columns: repeat(var(--ngmc-tabs, 4), minmax(0, 1fr));
	height: calc(var(--ngmc-nav-h) + var(--ngmc-safe-bottom));
	padding: 0 env(safe-area-inset-right, 0px) var(--ngmc-safe-bottom) env(safe-area-inset-left, 0px);
	box-sizing: border-box;
	background: var(--ngmc-tab-bg, #fff);
	box-shadow: 0 -1px 0 var(--ngmc-line, rgba(15, 23, 42, .08)), 0 -6px 20px rgba(15, 23, 42, .06);
	transition: transform .25s ease;
	view-transition-name: ngmc-tabbar;
}
.ngmc-tab {
	appearance: none;
	-webkit-appearance: none;
	position: relative;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 3px;
	min-width: 0;
	margin: 0;
	padding: 6px 2px;
	border: 0;
	background: transparent !important;
	color: var(--ngmc-tab-inactive, #64748b) !important;
	font: inherit;
	font-size: 11.5px;
	font-weight: 500;
	line-height: 1.1;
	letter-spacing: .1px;
	text-decoration: none !important;
	cursor: pointer;
	box-shadow: none !important;
	-webkit-user-select: none;
	user-select: none;
	touch-action: manipulation;
}
.ngmc-tab.is-active {
	color: var(--ngmc-tab-active, #25519a) !important;
	font-weight: 700;
}
.ngmc-tab__icon {
	position: relative;
	display: grid;
	place-items: center;
	width: 56px;
	height: 30px;
	border-radius: 999px;
	transition: background .2s ease, transform .15s ease;
}
.ngmc-tab__icon i.ngmc-ic {
	width: auto;
	height: auto;
	font-size: 20px;
	line-height: 1;
}
.ngmc-tab:active .ngmc-tab__icon {
	transform: scale(.92);
}
.ngmc-tab__label {
	max-width: 100%;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

/* indicator styles */
.ngmc-tabbar--pill .ngmc-tab.is-active .ngmc-tab__icon {
	background: color-mix(in srgb, var(--ngmc-tab-active, #25519a) 14%, transparent);
}
.ngmc-tabbar--line .ngmc-tab.is-active::before {
	content: "";
	position: absolute;
	top: 0;
	left: 28%;
	right: 28%;
	height: 3px;
	border-radius: 0 0 3px 3px;
	background: var(--ngmc-tab-active, #25519a);
}

/* label display */
.ngmc-tabbar--labels-none .ngmc-tab__label {
	position: absolute;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(0 0 0 0);
}
.ngmc-tabbar--labels-active .ngmc-tab:not(.is-active) .ngmc-tab__label {
	position: absolute;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(0 0 0 0);
}

/* install tab disappears once installed */
html.ngmc-app-standalone .ngmc-tab--install,
html.ngmc-app-standalone .ngmc-sheet .ngmc-pwa-install {
	display: none !important;
}

/* hide-on-scroll */
html.ngmc-bars-hidden .ngmc-appbar {
	transform: translateY(-100%);
}
html.ngmc-bars-hidden .ngmc-tabbar {
	transform: translateY(100%);
}

/* ------------------------------------------------------------- sheets */

html.ngmc-app .ngmc-sheet:not([hidden]) {
	display: block;
	position: fixed;
	inset: 0;
	z-index: 100003;
}
.ngmc-sheet__backdrop {
	position: absolute;
	inset: 0;
	background: rgba(15, 23, 42, .45);
	opacity: 0;
	transition: opacity .25s ease;
}
.ngmc-sheet.is-open .ngmc-sheet__backdrop {
	opacity: 1;
}
.ngmc-sheet__panel {
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	max-height: 86vh;
	max-height: 86dvh;
	display: flex;
	flex-direction: column;
	background: #fff;
	color: var(--ngmc-ink, #0f172a);
	border-radius: 20px 20px 0 0;
	box-shadow: 0 -10px 40px rgba(15, 23, 42, .25);
	padding-bottom: var(--ngmc-safe-bottom);
	transform: translateY(100%);
	transition: transform .28s cubic-bezier(.2, .8, .2, 1);
	will-change: transform;
}
.ngmc-sheet.is-open .ngmc-sheet__panel {
	transform: none;
}
.ngmc-sheet__grip {
	flex: none;
	height: 22px;
	display: grid;
	place-items: center;
	touch-action: none;
	cursor: grab;
}
.ngmc-sheet__grip::before {
	content: "";
	width: 40px;
	height: 4px;
	border-radius: 4px;
	background: #cbd5e1;
}
.ngmc-sheet__head {
	flex: none;
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 0 8px 8px 20px;
	border-bottom: 1px solid var(--ngmc-line, rgba(15, 23, 42, .08));
	font-size: 18px;
}
.ngmc-sheet__close {
	appearance: none;
	display: inline-grid;
	place-items: center;
	width: 44px;
	height: 44px;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: transparent !important;
	color: inherit !important;
	cursor: pointer;
	box-shadow: none !important;
}
.ngmc-sheet__body {
	flex: 1;
	overflow: auto;
	overscroll-behavior: contain;
	-webkit-overflow-scrolling: touch;
	padding: 8px 10px 16px;
}

/* menu tree */
.ngmc-tree {
	list-style: none;
	margin: 0;
	padding: 0;
}
.ngmc-tree--sub {
	margin: 0 0 4px 18px;
	padding-left: 10px;
	border-left: 2px solid #e2e8f0;
}
.ngmc-tree__item {
	margin: 0;
	list-style: none;
}
.ngmc-tree__row {
	display: flex;
	align-items: center;
}
.ngmc-tree__row a {
	flex: 1;
	min-width: 0;
	display: flex;
	align-items: center;
	gap: 12px;
	min-height: 48px;
	padding: 6px 12px;
	border-radius: 12px;
	color: var(--ngmc-ink, #0f172a) !important;
	font-size: 16px;
	font-weight: 600;
	line-height: 1.3;
	text-decoration: none !important;
}
.ngmc-tree--sub .ngmc-tree__row a {
	min-height: 42px;
	font-size: 15px;
	font-weight: 500;
}
.ngmc-tree__row a:active {
	background: #f1f5f9;
}
.ngmc-tree__item.is-current > .ngmc-tree__row > a {
	color: var(--ngmc-tab-active, #25519a) !important;
	background: color-mix(in srgb, var(--ngmc-tab-active, #25519a) 9%, transparent);
}
.ngmc-tree__fa {
	width: 32px;
	height: 32px;
	flex: none;
	display: inline-grid;
	place-items: center;
	border-radius: 9px;
	font-size: 14px;
	color: var(--ngmc-app-theme, #25519a);
	background: color-mix(in srgb, var(--ngmc-app-theme, #25519a) 10%, transparent);
}
.ngmc-tree__toggle {
	appearance: none;
	flex: none;
	display: inline-grid;
	place-items: center;
	width: 48px;
	height: 48px;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 12px;
	background: transparent !important;
	color: #64748b !important;
	cursor: pointer;
	box-shadow: none !important;
}
.ngmc-tree__toggle .ngmc-ic {
	transition: transform .2s ease;
}
.ngmc-tree__toggle[aria-expanded="true"] .ngmc-ic {
	transform: rotate(180deg);
}
.ngmc-sheet__contact {
	margin: 12px 12px 0;
	padding: 12px 14px;
	border-radius: 12px;
	background: #f8fafc;
	font-size: 14px;
	line-height: 1.6;
	color: #475569;
}
.ngmc-sheet__contact a {
	color: var(--ngmc-app-theme, #25519a) !important;
	font-weight: 600;
}
.ngmc-sheet__actions,
.ngmc-search__chips {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	padding: 14px 12px 4px;
}
.ngmc-chip {
	appearance: none;
	display: inline-flex;
	align-items: center;
	gap: 8px;
	margin: 0;
	padding: 9px 14px;
	border: 1px solid #e2e8f0;
	border-radius: 999px;
	background: #fff !important;
	color: var(--ngmc-ink, #0f172a) !important;
	font: inherit;
	font-size: 14px;
	font-weight: 600;
	line-height: 1.2;
	text-decoration: none !important;
	cursor: pointer;
	box-shadow: none !important;
}
.ngmc-chip .ngmc-ic {
	width: 18px;
	height: 18px;
	color: var(--ngmc-app-theme, #25519a);
}

/* search sheet: drops from the top */
.ngmc-sheet--search .ngmc-sheet__panel {
	top: 0;
	bottom: auto;
	border-radius: 0 0 20px 20px;
	padding: calc(10px + var(--ngmc-safe-top)) 10px 12px;
	transform: translateY(-100%);
}
.ngmc-search {
	display: flex;
	align-items: center;
	gap: 8px;
	margin: 0;
	padding: 4px 4px 4px 14px;
	border-radius: 14px;
	background: #f1f5f9;
}
.ngmc-search > .ngmc-ic {
	color: #64748b;
	width: 20px;
	height: 20px;
}
.ngmc-search input[type="search"] {
	flex: 1;
	min-width: 0;
	height: 44px;
	margin: 0 !important;
	padding: 0 !important;
	border: 0 !important;
	outline: 0;
	background: transparent !important;
	box-shadow: none !important;
	font: inherit;
	font-size: 16px !important; /* 16px stops iOS zooming in */
	color: var(--ngmc-ink, #0f172a);
}
.ngmc-search__chips {
	padding: 12px 2px 2px;
}

html.ngmc-locked,
html.ngmc-locked body {
	overflow: hidden !important;
}

/* ------------------------------------------------- loading & refresh */

html.ngmc-app .ngmc-progress {
	display: block;
	position: fixed;
	z-index: 9995;
	top: var(--ngmc-safe-top);
	left: 0;
	height: 3px;
	width: 0;
	background: var(--ngmc-tab-active, #25519a);
	box-shadow: 0 0 8px var(--ngmc-tab-active, #25519a);
	opacity: 0;
	pointer-events: none;
}
.ngmc-progress--light {
	background: #fff !important;
	box-shadow: 0 0 8px rgba(255, 255, 255, .8) !important;
}
html.ngmc-navigating .ngmc-progress {
	opacity: 1;
	animation: ngmc-progress 8s cubic-bezier(.1, .7, .2, 1) forwards;
}
@keyframes ngmc-progress {
	0% { width: 0; }
	10% { width: 35%; }
	40% { width: 70%; }
	100% { width: 92%; }
}

html.ngmc-app-standalone .ngmc-ptr {
	display: grid;
	place-items: center;
	position: fixed;
	z-index: 9991;
	top: calc(var(--ngmc-top-h) + var(--ngmc-safe-top) - 44px);
	left: 50%;
	width: 40px;
	height: 40px;
	border-radius: 50%;
	background: #fff;
	color: var(--ngmc-tab-active, #25519a);
	box-shadow: 0 3px 12px rgba(15, 23, 42, .22);
	opacity: 0;
	transform: translate(-50%, 0);
	pointer-events: none;
}
.ngmc-ptr .ngmc-ic {
	width: 22px;
	height: 22px;
}
.ngmc-ptr.is-ready {
	color: #fff;
	background: var(--ngmc-tab-active, #25519a);
}
.ngmc-ptr.is-loading .ngmc-ic {
	animation: ngmc-spin .7s linear infinite;
}
@keyframes ngmc-spin {
	to { transform: rotate(360deg); }
}

/* -------------------------------- other plugin & theme parts in app mode */

/* keep install banner, toasts and buttons clear of the bars */
html.ngmc-app .ngmc-pwa-toast {
	top: calc(var(--ngmc-top-h) + var(--ngmc-safe-top) + 8px);
}
html.ngmc-app .ngmc-pwa-banner:not(.ngmc-pwa-banner--top) {
	bottom: calc(var(--ngmc-nav-h) + var(--ngmc-safe-bottom) + 10px) !important;
}
html.ngmc-app .ngmc-pwa-banner--bar:not(.ngmc-pwa-banner--top) {
	padding-bottom: 14px;
}
html.ngmc-app .ngmc-pwa-banner--top {
	top: calc(var(--ngmc-top-h) + var(--ngmc-safe-top) + 10px) !important;
}
html.ngmc-app .ngmc-pwa-fab {
	bottom: calc(var(--ngmc-nav-h) + var(--ngmc-safe-bottom) + 14px);
}
html.ngmc-app .scroll-top,
html.ngmc-app #to-top,
html.ngmc-app .back-to-top {
	bottom: calc(var(--ngmc-nav-h) + var(--ngmc-safe-bottom) + 14px) !important;
}

/* NGM child theme: sticky elements sit under the app bar; compact banner */
html.ngmc-app .ngm-secnav {
	top: calc(var(--ngmc-top-h) + var(--ngmc-safe-top) + 12px);
}
html.ngmc-app.ngmc-compact .ngm-pagehead {
	padding: 22px 0 20px;
}
html.ngmc-app.ngmc-compact .ngm-pagehead .ngm-crumbs,
html.ngmc-app.ngmc-compact .ngm-pagehead::after {
	display: none;
}
html.ngmc-app.ngmc-compact .ngm-site .ngm-pagehead__title,
html.ngmc-app.ngmc-compact .ngm-pagehead__title {
	margin-top: 0;
	font-size: 24px;
}
html.ngmc-app.ngmc-compact .ngm-pagehead__ic {
	width: 42px;
	height: 42px;
	font-size: 18px;
	border-radius: 12px;
}
html.ngmc-app.ngmc-compact .ngm-pagehead__lead {
	font-size: 15px;
	margin-top: 8px;
}
html.ngmc-app.ngmc-compact .page-title .breadcrumbs {
	display: none;
}

@media (prefers-reduced-motion: reduce) {
	.ngmc-sheet__panel,
	.ngmc-sheet__backdrop,
	html.ngmc-app .ngmc-appbar,
	html.ngmc-app .ngmc-tabbar {
		transition: none;
	}
	html.ngmc-navigating .ngmc-progress {
		animation: none;
		width: 60%;
	}
}

@media print {
	.ngmc-appbar,
	.ngmc-tabbar,
	.ngmc-sheet,
	.ngmc-progress,
	.ngmc-ptr {
		display: none !important;
	}
	html.ngmc-app body {
		padding: 0 !important;
	}
}
