/**
 * Public-facing styles for Nova PWA.
 */

/* Install prompt banner (beforeinstallprompt, Chromium). */
.nova-pwa-install-banner {
	position: fixed;
	z-index: 999999;
	left: 0;
	right: 0;
	bottom: 0;
	padding: 1rem;
	box-sizing: border-box;
	pointer-events: none;
}

.nova-pwa-install-banner__inner {
	position: relative;
	max-width: 32rem;
	margin: 0 auto;
	padding: 1rem 2.5rem 1rem 1rem;
	background: #fff;
	border-radius: 0.5rem;
	box-shadow: 0 4px 24px rgba( 0, 0, 0, 0.15 );
	border: 1px solid rgba( 0, 0, 0, 0.08 );
	pointer-events: auto;
}

.nova-pwa-install-banner__text {
	margin: 0 0 0.75rem;
	font-size: 0.9375rem;
	line-height: 1.45;
	color: #1d2327;
}

.nova-pwa-install-banner__actions {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
	align-items: center;
}

/* Avoid theme .button rules (display, pointer-events) breaking the install CTA. */
.nova-pwa-install-banner__btn {
	display: inline-block;
	margin: 0;
	padding: 0.5rem 1rem;
	cursor: pointer;
	pointer-events: auto;
	font-size: 0.875rem;
	font-weight: 600;
	line-height: 1.4;
	color: #fff;
	background: #2271b1;
	border: 1px solid #2271b1;
	border-radius: 0.25rem;
	box-sizing: border-box;
	-webkit-appearance: none;
	appearance: none;
}

.nova-pwa-install-banner__btn:hover,
.nova-pwa-install-banner__btn:focus {
	background: #135e96;
	border-color: #135e96;
	color: #fff;
}

.nova-pwa-install-banner__close {
	position: absolute;
	top: 0.35rem;
	right: 0.35rem;
	width: 2rem;
	height: 2rem;
	padding: 0;
	margin: 0;
	border: 0;
	background: transparent;
	font-size: 1.5rem;
	line-height: 1;
	color: #50575e;
	cursor: pointer;
	border-radius: 0.25rem;
}

.nova-pwa-install-banner__close:hover,
.nova-pwa-install-banner__close:focus {
	color: #1d2327;
	background: rgba( 0, 0, 0, 0.06 );
}

/* iOS / Safari install instructions modal. */
.nova-pwa-ios-modal {
	position: fixed;
	z-index: 999999;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 1rem;
	box-sizing: border-box;
	pointer-events: none;
}

.nova-pwa-ios-modal__backdrop {
	position: absolute;
	inset: 0;
	background: rgba( 0, 0, 0, 0.45 );
	pointer-events: auto;
}

.nova-pwa-ios-modal__dialog {
	position: relative;
	z-index: 1;
	width: 100%;
	max-width: 22rem;
	margin: 0;
	padding: 1.5rem 2.5rem 1.25rem 1.25rem;
	background: #fff;
	border-radius: 0.5rem;
	box-shadow: 0 8px 32px rgba( 0, 0, 0, 0.2 );
	border: 1px solid rgba( 0, 0, 0, 0.08 );
	box-sizing: border-box;
	pointer-events: auto;
}

.nova-pwa-ios-modal__title {
	margin: 0 0 0.75rem;
	padding: 0;
	font-size: 1.0625rem;
	font-weight: 600;
	line-height: 1.35;
	color: #1d2327;
}

.nova-pwa-ios-modal__instructions {
	margin: 0 0 1.25rem;
	font-size: 0.9375rem;
	line-height: 1.5;
	color: #50575e;
	white-space: pre-line;
}

.nova-pwa-ios-modal__actions {
	display: flex;
	justify-content: flex-end;
}

.nova-pwa-ios-modal__btn {
	display: inline-block;
	margin: 0;
	padding: 0.5rem 1rem;
	cursor: pointer;
	font-size: 0.875rem;
	font-weight: 600;
	line-height: 1.4;
	color: #fff;
	background: #2271b1;
	border: 1px solid #2271b1;
	border-radius: 0.25rem;
	box-sizing: border-box;
	-webkit-appearance: none;
	appearance: none;
}

.nova-pwa-ios-modal__btn:hover,
.nova-pwa-ios-modal__btn:focus {
	background: #135e96;
	border-color: #135e96;
	color: #fff;
}

.nova-pwa-ios-modal__close {
	position: absolute;
	top: 0.35rem;
	right: 0.35rem;
	width: 2rem;
	height: 2rem;
	padding: 0;
	margin: 0;
	border: 0;
	background: transparent;
	font-size: 1.5rem;
	line-height: 1;
	color: #50575e;
	cursor: pointer;
	border-radius: 0.25rem;
}

.nova-pwa-ios-modal__close:hover,
.nova-pwa-ios-modal__close:focus {
	color: #1d2327;
	background: rgba( 0, 0, 0, 0.06 );
}
