/**
 * NextWave member PWA — install affordance + iOS walkthrough styling.
 *
 * Uses the brand custom property (--nwp-primary) already defined by the
 * member templates, falling back to a neutral colour.
 *
 * @package NextWave_Platform
 */

.nwp-pwa-install {
	position: fixed;
	left: 50%;
	bottom: 16px;
	transform: translateX(-50%);
	z-index: 9999;
	max-width: 420px;
	width: calc(100% - 32px);
}

.nwp-pwa-install[hidden],
.nwp-pwa-ios[hidden] {
	display: none;
}

.nwp-pwa-install__inner {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 12px 14px;
	border-radius: 14px;
	background: #111;
	color: #fff;
	box-shadow: 0 8px 28px rgba(0, 0, 0, 0.35);
	font-family: inherit;
}

.nwp-pwa-install__text {
	flex: 1;
	font-size: 14px;
	line-height: 1.3;
}

.nwp-pwa-install__btn {
	border: 0;
	cursor: pointer;
	padding: 8px 16px;
	border-radius: 999px;
	font-weight: 700;
	font-size: 14px;
	color: #fff;
	background: var(--nwp-primary, #0073aa);
}

.nwp-pwa-install__dismiss {
	border: 0;
	background: transparent;
	color: rgba(255, 255, 255, 0.7);
	font-size: 20px;
	line-height: 1;
	cursor: pointer;
	padding: 0 4px;
}

/* iOS guided walkthrough */
.nwp-pwa-ios {
	position: fixed;
	inset: 0;
	z-index: 10000;
	display: flex;
	align-items: flex-end;
	justify-content: center;
	background: rgba(0, 0, 0, 0.5);
	padding: 16px;
}

.nwp-pwa-ios__card {
	background: #fff;
	color: #111;
	border-radius: 18px;
	padding: 20px;
	max-width: 420px;
	width: 100%;
	box-shadow: 0 -8px 40px rgba(0, 0, 0, 0.3);
}

.nwp-pwa-ios__title {
	margin: 0 0 12px;
	font-size: 18px;
}

.nwp-pwa-ios__steps {
	margin: 0 0 16px;
	padding-left: 20px;
	font-size: 15px;
	line-height: 1.5;
}

.nwp-pwa-ios__close {
	width: 100%;
	border: 0;
	cursor: pointer;
	padding: 12px;
	border-radius: 12px;
	font-weight: 700;
	color: #fff;
	background: var(--nwp-primary, #0073aa);
}

/* Web Push opt-in UI (NN-321/NN-577) — previously unstyled, so it inherited
 * whatever the theme gives bare <button>s (broken contrast on dark themes).
 * Same idiom as the install affordance: dark pill, brand-accent button. */
.nwp-push-enable[hidden],
.nwp-push-denied[hidden],
.nwp-push-consent[hidden],
.nwp-push-ios-install[hidden] {
	display: none;
}

/* Floating banner: fixed above the page bottom — and above the app-bar dock
 * when it is active. Shown only while push is enableable, not yet granted,
 * and not inside the dismissal backoff (nwp-push.js decides). */
.nwp-push-enable {
	position: fixed;
	left: 50%;
	bottom: calc( 16px + env( safe-area-inset-bottom, 0px ) );
	transform: translateX(-50%);
	z-index: 9998;
	max-width: 420px;
	width: calc(100% - 32px);
	margin: 0;
	padding: 0;
}

body.nwp-appbar-active .nwp-push-enable {
	bottom: calc( 72px + env( safe-area-inset-bottom, 0px ) );
}

.nwp-push-enable__inner {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 12px 14px;
	border-radius: 14px;
	background: #111;
	color: #fff;
	box-shadow: 0 8px 28px rgba(0, 0, 0, 0.35);
}

.nwp-push-enable__text {
	flex: 1;
	font-size: 14px;
	line-height: 1.3;
}

.nwp-push-enable__btn {
	border: 0;
	cursor: pointer;
	padding: 8px 16px;
	border-radius: 999px;
	font-weight: 700;
	font-size: 14px;
	white-space: nowrap;
	color: #fff;
	background: var(--nwp-appbar-accent, var(--nwp-primary, #0073aa));
}

.nwp-push-enable__dismiss {
	border: 0;
	background: transparent;
	color: rgba(255, 255, 255, 0.7);
	font-size: 20px;
	line-height: 1;
	cursor: pointer;
	padding: 0 2px;
}

.nwp-push-denied,
.nwp-push-ios-install {
	max-width: 420px;
	margin: 12px auto;
	padding: 0 16px;
	font-size: 13px;
	opacity: 0.8;
	text-align: center;
}

.nwp-push-ios-install__how {
	border: 0;
	cursor: pointer;
	margin-top: 8px;
	padding: 6px 14px;
	border-radius: 999px;
	font-weight: 700;
	font-size: 13px;
	color: #fff;
	background: var(--nwp-appbar-accent, var(--nwp-primary, #0073aa));
}

.nwp-push-ios-install__how[hidden] {
	display: none;
}

/* Soft-ask consent dialog: centered card above everything (incl. the dock). */
.nwp-push-consent {
	position: fixed;
	left: 50%;
	top: 50%;
	transform: translate(-50%, -50%);
	z-index: 10001;
	max-width: 420px;
	width: calc(100% - 32px);
	background: #fff;
	color: #111;
	border-radius: 18px;
	padding: 20px;
	box-shadow: 0 12px 48px rgba(0, 0, 0, 0.45);
}

.nwp-push-consent__title {
	margin: 0 0 8px;
	font-size: 18px;
	color: inherit;
}

.nwp-push-consent__desc {
	margin: 0 0 12px;
	font-size: 14px;
	line-height: 1.4;
}

.nwp-push-consent__optin {
	display: flex;
	align-items: center;
	gap: 8px;
	margin: 0 0 16px;
	font-size: 14px;
}

.nwp-push-consent__actions {
	display: flex;
	gap: 10px;
	justify-content: flex-end;
}

.nwp-push-consent__cancel,
.nwp-push-consent__accept {
	border: 0;
	cursor: pointer;
	padding: 10px 16px;
	border-radius: 999px;
	font-weight: 700;
	font-size: 14px;
}

.nwp-push-consent__cancel {
	background: #eee;
	color: #111;
}

.nwp-push-consent__accept {
	color: #fff;
	background: var(--nwp-appbar-accent, var(--nwp-primary, #0073aa));
}
