/* WP PWA Master — Frontend styles */

.wppwa-balloon {
	position: fixed;
	left: 16px;
	right: 16px;
	bottom: 16px;
	max-width: 420px;
	margin: 0 auto;
	background: #fff;
	color: #1e1e1e;
	border-radius: 14px;
	box-shadow: 0 8px 30px rgba(0, 0, 0, 0.18);
	padding: 14px 16px;
	display: flex;
	align-items: center;
	gap: 12px;
	z-index: 999999;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
	font-size: 14px;
	line-height: 1.4;
}

.wppwa-balloon__icon {
	width: 44px;
	height: 44px;
	border-radius: 10px;
	flex: 0 0 auto;
	object-fit: cover;
}

.wppwa-balloon__body {
	flex: 1 1 auto;
}

.wppwa-balloon__steps {
	margin-top: 6px;
	font-size: 12.5px;
	color: #555;
}

.wppwa-balloon__steps span {
	display: inline-flex;
	align-items: center;
	gap: 4px;
}

.wppwa-balloon__actions {
	display: flex;
	flex-direction: column;
	align-items: flex-end;
	gap: 6px;
	flex: 0 0 auto;
}

.wppwa-balloon__close {
	background: transparent;
	border: none;
	font-size: 18px;
	line-height: 1;
	cursor: pointer;
	color: #999;
	padding: 2px 4px;
}

.wppwa-balloon__install-btn {
	background: #1e1e1e;
	color: #fff;
	border: none;
	border-radius: 8px;
	padding: 8px 14px;
	font-size: 13px;
	font-weight: 600;
	cursor: pointer;
	white-space: nowrap;
}

/* Animations */
.wppwa-balloon.wppwa-anim-drop {
	animation: wppwa-drop 0.45s cubic-bezier(0.34, 1.56, 0.64, 1);
}
@keyframes wppwa-drop {
	from { transform: translateY(-120%); opacity: 0; }
	to   { transform: translateY(0); opacity: 1; }
}

.wppwa-balloon.wppwa-anim-bubble {
	animation: wppwa-bubble 0.45s cubic-bezier(0.34, 1.56, 0.64, 1);
}
@keyframes wppwa-bubble {
	from { transform: scale(0.6); opacity: 0; }
	to   { transform: scale(1); opacity: 1; }
}

.wppwa-balloon.wppwa-anim-fade {
	animation: wppwa-fade 0.5s ease;
}
@keyframes wppwa-fade {
	from { opacity: 0; }
	to   { opacity: 1; }
}

.wppwa-balloon.wppwa-hide {
	animation: wppwa-fade-out 0.3s ease forwards;
}
@keyframes wppwa-fade-out {
	from { opacity: 1; }
	to   { opacity: 0; transform: translateY(10px); }
}

/* Loading spinner */
.wppwa-spinner {
	position: fixed;
	inset: 0;
	z-index: 9999999;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: opacity 0.25s ease;
}

.wppwa-spinner--circle .wppwa-spinner-inner {
	width: 42px;
	height: 42px;
	border-radius: 50%;
	border: 4px solid rgba(0, 0, 0, 0.1);
	border-top-color: currentColor;
	animation: wppwa-spin 0.8s linear infinite;
}
@keyframes wppwa-spin {
	to { transform: rotate(360deg); }
}

.wppwa-spinner--dots .wppwa-spinner-inner {
	display: flex;
	gap: 6px;
}
.wppwa-spinner--dots .wppwa-spinner-inner::before,
.wppwa-spinner--dots .wppwa-spinner-inner::after {
	content: "";
	width: 10px;
	height: 10px;
	border-radius: 50%;
	background: currentColor;
	animation: wppwa-dot-bounce 0.9s ease-in-out infinite;
}
.wppwa-spinner--dots .wppwa-spinner-inner::after {
	animation-delay: 0.15s;
}
@keyframes wppwa-dot-bounce {
	0%, 80%, 100% { transform: scale(0.6); opacity: 0.5; }
	40% { transform: scale(1); opacity: 1; }
}

.wppwa-spinner--bar .wppwa-spinner-inner {
	width: 160px;
	height: 4px;
	background: rgba(0, 0, 0, 0.1);
	border-radius: 4px;
	overflow: hidden;
	position: relative;
}
.wppwa-spinner--bar .wppwa-spinner-inner::before {
	content: "";
	position: absolute;
	top: 0; left: -40%;
	width: 40%; height: 100%;
	background: currentColor;
	animation: wppwa-bar-slide 1s ease-in-out infinite;
}
@keyframes wppwa-bar-slide {
	0% { left: -40%; }
	100% { left: 100%; }
}

.wppwa-spinner.wppwa-spinner-hide {
	opacity: 0;
	pointer-events: none;
}

/* Pull to refresh */
.wppwa-ptr-indicator {
	position: fixed;
	top: 0; left: 0; right: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	height: 60px;
	transform: translateY(-60px);
	transition: transform 0.2s ease;
	z-index: 999998;
	pointer-events: none;
}
.wppwa-ptr-indicator .wppwa-ptr-spinner {
	width: 26px;
	height: 26px;
	border-radius: 50%;
	border: 3px solid rgba(0, 0, 0, 0.15);
	border-top-color: currentColor;
}
.wppwa-ptr-indicator.wppwa-ptr-spin .wppwa-ptr-spinner {
	animation: wppwa-spin 0.7s linear infinite;
}

/* Bottom navigation bar */
.wppwa-bottom-nav {
	position: fixed;
	left: 0; right: 0; bottom: 0;
	height: 56px;
	padding-bottom: env(safe-area-inset-bottom, 0);
	display: flex;
	align-items: center;
	justify-content: space-around;
	box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.08);
	z-index: 999997;
}

.wppwa-bottom-nav button {
	background: transparent;
	border: none;
	width: 44px;
	height: 44px;
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	color: inherit;
}

.wppwa-bottom-nav button svg {
	width: 22px;
	height: 22px;
	fill: none;
	stroke: currentColor;
	stroke-width: 2;
}

.wppwa-bottom-nav button:disabled {
	opacity: 0.3;
	cursor: default;
}

/* When the bottom nav is visible, keep site content from being covered */
body.wppwa-has-bottom-nav {
	padding-bottom: 56px;
}

@media (min-width: 783px) {
	.wppwa-balloon {
		left: auto;
		right: 24px;
		bottom: 24px;
		max-width: 360px;
	}
}
