/**
 * NextWave sitewide app-bar — mobile-only bottom navigation.
 *
 * Brand accent comes from the --nwp-appbar-accent custom property (set inline
 * from the venue theme colour); no hardcoded brand values here. Desktop hides
 * the bar entirely — it is a phone affordance.
 */

.nwp-appbar {
	position: fixed;
	left: 0;
	right: 0;
	bottom: 0;
	z-index: 9998;
	display: none;
	box-sizing: border-box;
	background: #ffffff;
	border-top: 1px solid rgba( 0, 0, 0, 0.08 );
	box-shadow: 0 -2px 14px rgba( 0, 0, 0, 0.10 );
	padding-bottom: env( safe-area-inset-bottom, 0 );
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
	/* Promote to its own layer so iOS keeps the fixed dock steady during
	   momentum scroll (a transform on the fixed element itself does NOT break
	   its viewport-relative positioning — only ancestor transforms do). */
	transform: translateZ( 0 );
	-webkit-transform: translateZ( 0 );
}

/* Mobile only: show when the JS un-hides it. */
@media ( max-width: 768px ) {
	.nwp-appbar:not( [hidden] ) {
		display: block;
	}
}

/* Never on desktop, even if un-hidden. */
@media ( min-width: 769px ) {
	.nwp-appbar {
		display: none !important;
	}
}

/* Class selectors below would otherwise beat the UA [hidden] rule, so any JS
   toggles are respected explicitly. */
.nwp-appbar [hidden] {
	display: none !important;
}

/* Tab row — always four tabs, never collapsed. */
.nwp-appbar__tabs {
	display: flex;
	margin: 0;
	padding: 0;
	list-style: none;
}

.nwp-appbar__tabs li {
	flex: 1 1 0;
	margin: 0;
	padding: 0;
}

.nwp-appbar__tab {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 2px;
	min-height: 56px;
	padding: 6px 4px;
	text-decoration: none;
	color: #333333;
	font-size: 11px;
}

.nwp-appbar__tab:focus-visible {
	outline: 2px solid var( --nwp-appbar-accent, #0073aa );
	outline-offset: -2px;
}

.nwp-appbar__ico {
	font-size: 20px;
	line-height: 1;
}

/* Brand app-icon in the Membership/My Card tab (replaces the star glyph). */
.nwp-appbar__ico--brand {
	width: 22px;
	height: 22px;
	object-fit: contain;
	border-radius: 5px;
	vertical-align: middle;
}

.nwp-appbar__lbl {
	display: block;
}

/* Progressive action tab (Install / Enable alerts / Alerts) — highlighted with
   the brand accent while it is still encouraging install or push, then calms to
   a normal tab once the visitor is set up. */
.nwp-appbar[data-action="install"] .nwp-appbar__tab--action,
.nwp-appbar[data-action="push"] .nwp-appbar__tab--action {
	background: var( --nwp-appbar-accent, #0073aa );
	color: #ffffff;
}

/* Anon/member label swap — anonymous by default; .is-member flips it. */
.nwp-appbar__lbl--member {
	display: none;
}

.nwp-appbar.is-member .nwp-appbar__lbl--anon {
	display: none;
}

.nwp-appbar.is-member .nwp-appbar__lbl--member {
	display: block;
}

/* Dark-scheme friendliness. */
@media ( prefers-color-scheme: dark ) {
	.nwp-appbar {
		background: #1c1c1e;
		border-top-color: rgba( 255, 255, 255, 0.10 );
	}

	.nwp-appbar__tab {
		color: #e6e6e6;
	}
}

/* Alerts inbox popup (app-bar 4th tab). */
.nwp-appbar__badge {
	position: absolute; top: 4px; right: 22%; min-width: 16px; height: 16px; padding: 0 4px;
	border-radius: 999px; background: #d63638; color: #fff; font-size: 10px; font-weight: 800;
	line-height: 16px; text-align: center;
}
.nwp-appbar-inbox {
	position: fixed; inset: 0; z-index: 2147483000; display: flex; align-items: flex-end;
	justify-content: center; background: rgba( 0, 0, 0, 0.35 );
}
.nwp-appbar-inbox[hidden] { display: none; }
.nwp-appbar-inbox__panel {
	width: 100%; max-width: 480px; max-height: 70vh; overflow: auto;
	background: #fff; color: #1d2327; border-radius: 16px 16px 0 0;
	margin-bottom: 64px; box-shadow: 0 -8px 30px rgba( 0, 0, 0, 0.3 );
}
.nwp-appbar-inbox__head { display: flex; justify-content: space-between; align-items: center; padding: 14px 16px; border-bottom: 1px solid #e2e4e7; position: sticky; top: 0; background: #fff; }
.nwp-appbar-inbox__close { border: 0; background: none; font-size: 24px; line-height: 1; cursor: pointer; color: #646970; }
.nwp-appbar-inbox__list { padding: 8px; }
.nwp-appbar-inbox__empty { text-align: center; color: #646970; padding: 24px; }
.nwp-appbar-inbox__item { display: block; text-decoration: none; color: inherit; padding: 12px 14px; border-radius: 10px; }
.nwp-appbar-inbox__item strong { display: block; }
.nwp-appbar-inbox__item span { display: block; color: #50575e; font-size: 14px; }
.nwp-appbar-inbox__item.is-unread { background: #f0f6fc; }
.nwp-appbar-inbox__item + .nwp-appbar-inbox__item { border-top: 1px solid #f0f0f1; }

/* ── Feature strip (cart + admin quick-jumps) along the top of the dock ── */
.nwp-appbar__strip {
	display: flex;
	gap: 8px;
	align-items: center;
	justify-content: center;
	padding: 8px 12px;
	border-bottom: 1px solid rgba( 0, 0, 0, 0.06 );
	overflow-x: auto;
	-webkit-overflow-scrolling: touch;
	scrollbar-width: none;
}
.nwp-appbar__strip::-webkit-scrollbar { display: none; }
.nwp-appbar__strip:empty { display: none; }
.nwp-appbar__feature {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	flex: 0 0 auto;
	min-height: 36px;
	padding: 7px 14px;
	border-radius: 999px;
	text-decoration: none;
	font-size: 13px;
	font-weight: 700;
	line-height: 1;
	white-space: nowrap;
	color: var( --nwp-appbar-accent, #0073aa );
	background: rgba( 0, 0, 0, 0.05 );
}
.nwp-appbar__feature:active { transform: scale( 0.97 ); }
.nwp-appbar__feature:focus-visible { outline: 2px solid var( --nwp-appbar-accent, #0073aa ); outline-offset: 2px; }
.nwp-appbar__feature-ico { font-size: 15px; line-height: 1; }
/* Cart is the primary action — fill it with the brand accent. */
.nwp-appbar__feature--cart { background: var( --nwp-appbar-accent, #0073aa ); color: #fff; }
.nwp-appbar__feature-count {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 18px;
	height: 18px;
	padding: 0 5px;
	border-radius: 999px;
	background: #fff;
	color: var( --nwp-appbar-accent, #0073aa );
	font-size: 11px;
	font-weight: 800;
}
