/* When already running as installed app, hide install prompts */
@media all and (display-mode: standalone) {
	.fmcs-install-banner,
	.custom-installation-banner {
		display: none !important;
	}
}

/* Floating install banner — pinned under Elementor header (id 109), not footer toasts */
.fmcs-install-banner[hidden] {
	display: none !important;
}
.fmcs-install-banner {
	position: fixed;
	left: 12px;
	right: 12px;
	top: calc(env(safe-area-inset-top, 0px) + 72px);
	bottom: auto;
	z-index: 99990;
	display: flex;
	align-items: center;
	gap: 0.75rem;
	padding: 0.85rem 0.9rem;
	padding-right: 2.25rem;
	background: #fff;
	color: #111;
	border-radius: 16px;
	box-shadow: 0 12px 40px rgba(30, 26, 82, 0.28);
	font-family: "Lexend Deca", system-ui, sans-serif;
}
@media (min-width: 640px) {
	.fmcs-install-banner {
		left: auto;
		right: 20px;
		width: min(420px, calc(100vw - 40px));
	}
}
.fmcs-install-banner__icon {
	width: 48px;
	height: 48px;
	border-radius: 12px;
	object-fit: cover;
	flex: 0 0 auto;
}
.fmcs-install-banner__copy {
	display: flex;
	flex-direction: column;
	gap: 0.15rem;
	min-width: 0;
	flex: 1 1 auto;
}
.fmcs-install-banner__copy strong {
	font-size: 0.95rem;
	line-height: 1.2;
}
.fmcs-install-banner__copy span {
	font-size: 0.8rem;
	color: #666;
	line-height: 1.3;
}
.fmcs-install-banner__cta {
	appearance: none;
	border: 0;
	border-radius: 999px;
	background: #1E1A52;
	color: #fff;
	font-weight: 600;
	font-size: 0.9rem;
	padding: 0.55rem 0.95rem;
	cursor: pointer;
	flex: 0 0 auto;
}
.fmcs-install-banner__dismiss {
	position: absolute;
	top: 0.35rem;
	right: 0.45rem;
	border: 0;
	background: transparent;
	color: #888;
	font-size: 1.35rem;
	line-height: 1;
	cursor: pointer;
}

/* On-site install modal */
.fmcs-install-modal[hidden] {
	display: none !important;
}
.fmcs-install-modal {
	position: fixed;
	inset: 0;
	z-index: 100000;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: max(0.75rem, env(safe-area-inset-top, 0px))
		max(0.75rem, env(safe-area-inset-right, 0px))
		max(0.75rem, env(safe-area-inset-bottom, 0px))
		max(0.75rem, env(safe-area-inset-left, 0px));
	box-sizing: border-box;
}
.fmcs-install-modal__backdrop {
	position: absolute;
	inset: 0;
	background: rgba(30, 26, 82, 0.55);
	border: 0;
	cursor: pointer;
}
.fmcs-install-modal__dialog {
	position: relative;
	width: min(100%, 420px);
	max-height: min(88dvh, 88vh, 760px);
	overflow-x: hidden;
	overflow-y: auto;
	-webkit-overflow-scrolling: touch;
	overscroll-behavior: contain;
	background: #fff;
	color: #111;
	border-radius: 18px;
	padding: 1.35rem 1.35rem 1.5rem;
	padding-top: 2.5rem;
	box-shadow: 0 24px 60px rgba(0, 0, 0, 0.28);
	font-family: "Lexend Deca", system-ui, sans-serif;
}
.fmcs-install-modal__close {
	position: absolute;
	top: 0.65rem;
	right: 0.75rem;
	z-index: 2;
	border: 0;
	background: transparent;
	font-size: 1.6rem;
	line-height: 1;
	cursor: pointer;
	color: #666;
	padding: 0.25rem 0.4rem;
}
.fmcs-install-modal__brand {
	display: flex;
	align-items: center;
	gap: 0.85rem;
	margin: 0.25rem 0 1.1rem;
}
.fmcs-install-modal__brand img {
	width: 56px;
	height: 56px;
	border-radius: 12px;
	object-fit: cover;
}
.fmcs-install-modal__brand h2 {
	margin: 0;
	font-size: 1.35rem;
	line-height: 1.15;
	font-weight: 700;
}
.fmcs-install-modal__brand p {
	margin: 0.15rem 0 0;
	color: #777;
	font-size: 0.95rem;
}
.fmcs-install-modal__actions {
	display: grid;
	gap: 0.65rem;
	margin-bottom: 1.25rem;
}
.fmcs-install-modal__actions button {
	appearance: none;
	border: 0;
	border-radius: 999px;
	padding: 0.85rem 1rem;
	font-size: 1rem;
	font-weight: 600;
	cursor: pointer;
}
.fmcs-install-modal__actions button:disabled {
	opacity: 0.55;
	cursor: not-allowed;
}
#fmcs-install-btn {
	background: #1E1A52;
	color: #fff;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.55rem;
}
#fmcs-notify-btn {
	background: #eef2f7;
	color: #1E1A52;
}
.fmcs-install-btn-icon {
	width: 1.1rem;
	height: 1.1rem;
	display: inline-block;
	background: currentColor;
	mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23000' d='M17 1.01 7 1c-1.1 0-2 .9-2 2v18c0 1.1.9 2 2 2h10c1.1 0 2-.9 2-2V3c0-1.1-.9-1.99-2-1.99M17 19H7V5h10z'/%3E%3C/svg%3E") center / contain no-repeat;
	-webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23000' d='M17 1.01 7 1c-1.1 0-2 .9-2 2v18c0 1.1.9 2 2 2h10c1.1 0 2-.9 2-2V3c0-1.1-.9-1.99-2-1.99M17 19H7V5h10z'/%3E%3C/svg%3E") center / contain no-repeat;
}
.fmcs-install-modal__section + .fmcs-install-modal__section {
	margin-top: 1.15rem;
}
.fmcs-install-modal__section h3 {
	margin: 0 0 0.35rem;
	font-size: 1.05rem;
}
.fmcs-install-modal__section p {
	margin: 0;
	color: #444;
	line-height: 1.45;
	font-size: 0.95rem;
}
.fmcs-install-modal__status {
	min-height: 1.25rem;
	margin: 0.35rem 0 0.85rem;
	font-size: 0.9rem;
	color: #1b6b3a;
}
.fmcs-install-modal__status.is-error {
	color: #a32020;
}
.fmcs-install-modal__ios {
	margin: 0 0 0.85rem;
	padding: 0.75rem 0.85rem;
	border-radius: 12px;
	background: #f4f6f9;
	font-size: 0.9rem;
	line-height: 1.4;
	color: #333;
}
html.fmcs-install-open,
html.fmcs-install-open body {
	overflow: hidden;
}

.fmcs-btn-secondary {
	appearance: none;
	border: 0;
	border-radius: 999px;
	padding: 0.75rem 1rem;
	font-size: 0.95rem;
	font-weight: 600;
	cursor: pointer;
	background: #eef2f7;
	color: #1E1A52;
	width: 100%;
}
.fmcs-cat-all,
.fmcs-category-list label {
	display: flex;
	align-items: flex-start;
	gap: 0.55rem;
	margin: 0.45rem 0;
	font-size: 0.92rem;
	line-height: 1.3;
	cursor: pointer;
}
.fmcs-pref-group {
	margin: 0 0 0.15rem;
}
.fmcs-pref-group[hidden] {
	display: none !important;
}
.fmcs-pref-subheading {
	margin: 1rem 0 0.35rem;
	font-size: 0.95rem;
	font-weight: 600;
}
.fmcs-pref-hint {
	margin: 0.15rem 0 0.75rem !important;
	font-size: 0.8rem !important;
	color: #666 !important;
	line-height: 1.35 !important;
}
.fmcs-category-list {
	max-height: 220px;
	overflow: auto;
	margin: 0.35rem 0 0.85rem;
	padding: 0.35rem 0.15rem;
	border-top: 1px solid #edf0f4;
	border-bottom: 1px solid #edf0f4;
}
.fmcs-category-list input,
.fmcs-cat-all input {
	margin-top: 0.15rem;
}

/* Desktop-only entry to the same modal (mobile uses Voxel menu #pwa-alerts). */
.fmcs-notify-manage {
	display: none;
}
.fmcs-notify-manage[hidden] {
	display: none !important;
}
@media (min-width: 960px) {
	.fmcs-notify-manage {
		display: block;
		position: fixed;
		right: 20px;
		bottom: 20px;
		left: auto;
		top: auto;
		z-index: 99980;
		appearance: none;
		border: 0;
		border-radius: 999px;
		background: #1E1A52;
		color: #fff;
		font-size: 0.82rem;
		font-weight: 600;
		padding: 0.55rem 0.9rem;
		cursor: pointer;
		box-shadow: 0 8px 24px rgba(30, 26, 82, 0.25);
		font-family: "Lexend Deca", system-ui, sans-serif;
	}
	.fmcs-notify-manage[hidden] {
		display: none !important;
	}
}

/* Pull-to-refresh — only when JS marks the document as installed standalone */
html.fmcs-is-standalone .fmcs-ptr {
	position: fixed;
	left: 0;
	right: 0;
	top: 0;
	z-index: 100001;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 0.5rem;
	padding: calc(env(safe-area-inset-top, 0px) + 0.35rem) 1rem 0.65rem;
	pointer-events: none;
	opacity: 0;
	transform: translateY(-120%);
	transition: opacity 0.15s ease, transform 0.15s ease;
	font-family: "Lexend Deca", system-ui, sans-serif;
	font-size: 0.85rem;
	font-weight: 600;
	color: #1E1A52;
	background: linear-gradient(to bottom, rgba(255, 255, 255, 0.96), rgba(255, 255, 255, 0.75));
}
html.fmcs-is-standalone .fmcs-ptr.is-visible {
	opacity: 1;
	transform: translateY(0);
}
html.fmcs-is-standalone .fmcs-ptr.is-refreshing .fmcs-ptr__spinner {
	animation: fmcs-ptr-spin 0.7s linear infinite;
}
html.fmcs-is-standalone .fmcs-ptr__spinner {
	width: 1rem;
	height: 1rem;
	border: 2px solid rgba(30, 26, 82, 0.2);
	border-top-color: #1E1A52;
	border-radius: 50%;
}
@keyframes fmcs-ptr-spin {
	to {
		transform: rotate(360deg);
	}
}
html.fmcs-is-standalone.fmcs-ptr-pulling,
html.fmcs-is-standalone.fmcs-ptr-pulling body {
	overscroll-behavior-y: none;
}

