/**
 * FlexMart PWA — Frontend Styles
 */

#fpw-install-banner {
	position: fixed;
	left: 16px;
	right: 16px;
	top: 76px;
	z-index: 999999;
	max-width: 420px;
	margin: 0 auto;
	display: flex;
	align-items: center;
	gap: 12px;
	background: #fff;
	border-radius: 16px;
	box-shadow: 0 16px 40px rgba(15, 23, 42, 0.18);
	padding: 14px 16px;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
	opacity: 0;
	transform: translateY(-16px);
	transition: opacity 0.25s ease, transform 0.25s ease;
}

/* A logged-in admin viewing the frontend has the WordPress admin bar
   on top of everything else — push the banner down further so it
   still clears the header instead of overlapping it. */
body.admin-bar #fpw-install-banner {
	top: 108px;
}

@media screen and (max-width: 782px) {
	body.admin-bar #fpw-install-banner {
		top: 122px;
	}
}

#fpw-install-banner.is-visible {
	opacity: 1;
	transform: translateY(0);
}

.fpw-install-banner__icon {
	flex-shrink: 0;
	width: 44px;
	height: 44px;
	border-radius: 12px;
	overflow: hidden;
	background: #f1f5f9;
}

.fpw-install-banner__icon img {
	width: 100%;
	height: 100%;
	object-fit: contain;
}

.fpw-install-banner__text {
	flex: 1;
	min-width: 0;
}

.fpw-install-banner__title {
	font-size: 0.88rem;
	font-weight: 800;
	color: #111827;
	line-height: 1.3;
}

.fpw-install-banner__subtitle {
	font-size: 0.78rem;
	color: #6b7280;
	margin-top: 2px;
}

.fpw-install-banner__install {
	flex-shrink: 0;
	background: #2563eb;
	color: #fff;
	border: none;
	padding: 9px 16px;
	border-radius: 999px;
	font-size: 0.82rem;
	font-weight: 700;
	cursor: pointer;
	font-family: inherit;
}

.fpw-install-banner__close {
	flex-shrink: 0;
	width: 24px;
	height: 24px;
	border-radius: 50%;
	border: none;
	background: #f1f5f9;
	color: #6b7280;
	font-size: 1rem;
	line-height: 1;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
}

/* iOS instructional overlay */

#fpw-ios-overlay {
	position: fixed;
	inset: 0;
	z-index: 1000000;
	display: flex;
	align-items: flex-end;
	justify-content: center;
	background: rgba(15, 23, 42, 0.5);
	opacity: 0;
	transition: opacity 0.2s ease;
}

#fpw-ios-overlay.is-visible {
	opacity: 1;
}

.fpw-ios-overlay__card {
	width: 100%;
	max-width: 420px;
	background: #fff;
	border-radius: 20px 20px 0 0;
	padding: 24px 22px 28px;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

.fpw-ios-overlay__step {
	display: flex;
	align-items: center;
	gap: 12px;
	margin: 0 0 16px;
	font-size: 0.88rem;
	color: #111827;
	line-height: 1.4;
}

.fpw-ios-overlay__icon {
	flex-shrink: 0;
	width: 36px;
	height: 36px;
	border-radius: 10px;
	background: #eaf0ff;
	color: #2563eb;
	display: flex;
	align-items: center;
	justify-content: center;
}

.fpw-ios-overlay__icon svg {
	width: 18px;
	height: 18px;
}

.fpw-ios-overlay__done {
	width: 100%;
	margin-top: 6px;
	background: #2563eb;
	color: #fff;
	border: none;
	padding: 13px;
	border-radius: 12px;
	font-size: 0.92rem;
	font-weight: 700;
	cursor: pointer;
	font-family: inherit;
}

@media (max-width: 480px) {
	#fpw-install-banner {
		left: 10px;
		right: 10px;
		top: 68px;
		padding: 12px 14px;
	}
}
