@property --amir-pwa-angle {
	syntax: '<angle>';
	inherits: false;
	initial-value: 0deg;
}

#amir-pwa-prompt-overlay {
	position: fixed;
	inset: 0;
	z-index: 999999;
	display: none;
	font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Tahoma, sans-serif;
	direction: rtl;
}

#amir-pwa-prompt-overlay.is-bottom,
#amir-pwa-prompt-overlay.is-center {
	display: block;
	pointer-events: none;
}

#amir-pwa-prompt-overlay.is-center {
	background: rgba(5, 6, 7, 0);
	backdrop-filter: blur(0);
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 20px;
	box-sizing: border-box;
	transition: background .35s ease, backdrop-filter .35s ease;
}

#amir-pwa-prompt-overlay.is-center.is-visible {
	background: rgba(5, 6, 7, 0.55);
	backdrop-filter: blur(3px);
	pointer-events: auto;
}

.amir-pwa-card {
	position: relative;
	max-width: 380px;
	width: 100%;
	border-radius: 20px;
	padding: 2px;
	isolation: isolate;
	opacity: 0;
	transform: translateY(24px) scale(.97);
	transition: opacity .35s ease, transform .35s cubic-bezier(.22,1,.36,1);
	pointer-events: auto;
}

#amir-pwa-prompt-overlay.is-bottom .amir-pwa-card {
	position: fixed;
	left: 16px;
	right: 16px;
	bottom: 16px;
	max-width: 420px;
	margin: 0 auto;
	width: auto;
}

#amir-pwa-prompt-overlay.is-visible .amir-pwa-card {
	opacity: 1;
	transform: translateY(0) scale(1);
}

.amir-pwa-card-border {
	position: absolute;
	inset: 0;
	border-radius: 20px;
	padding: 1px;
	background: conic-gradient(
		from var(--amir-pwa-angle),
		#00FF96 0deg, #00D4FF 60deg, #8A6BFF 120deg,
		#FF5FA2 180deg, #FFB020 240deg, #00FF96 300deg, #00FF96 360deg
	);
	-webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
	mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
	-webkit-mask-composite: xor;
	mask-composite: exclude;
	animation: amir-pwa-rotate 4.5s linear infinite;
	opacity: .7;
	pointer-events: none;
	z-index: 1;
}

@keyframes amir-pwa-rotate { to { --amir-pwa-angle: 360deg; } }

.amir-pwa-card-inner {
	position: relative;
	z-index: 2;
	border-radius: 19px;
	background:
		radial-gradient(120% 140% at 50% -10%, rgba(0, 255, 150, 0.07), transparent 55%),
		linear-gradient(160deg, rgba(18,20,22,0.97), rgba(10,11,13,0.98));
	border: 1px solid rgba(255, 255, 255, 0.06);
	backdrop-filter: blur(18px) saturate(140%);
	-webkit-backdrop-filter: blur(18px) saturate(140%);
	color: #eafff5;
	padding: 20px 20px 18px;
	box-shadow: 0 24px 60px -20px rgba(0,0,0,.6);
}

.amir-pwa-card-close {
	position: absolute;
	top: 10px;
	left: 10px;
	width: 26px;
	height: 26px;
	border-radius: 50%;
	border: none;
	background: rgba(255,255,255,0.06);
	color: rgba(234,255,245,.6);
	cursor: pointer;
	display: grid;
	place-items: center;
	z-index: 3;
	font-size: 14px;
	line-height: 1;
	transition: background .2s ease;
}
.amir-pwa-card-close:hover { background: rgba(255,255,255,0.12); }

.amir-pwa-card-head {
	display: flex;
	align-items: center;
	gap: 12px;
	margin-bottom: 12px;
	padding-left: 28px;
}

.amir-pwa-icon {
	width: 48px;
	height: 48px;
	border-radius: 13px;
	object-fit: cover;
	flex-shrink: 0;
	box-shadow: 0 6px 18px -6px rgba(0,255,150,.35);
}

.amir-pwa-icon-fallback {
	width: 48px;
	height: 48px;
	border-radius: 13px;
	flex-shrink: 0;
	display: grid;
	place-items: center;
	background: rgba(0,255,150,.1);
	color: #00FF96;
}
.amir-pwa-icon-fallback svg { width: 24px; height: 24px; }

.amir-pwa-title {
	font-size: 15px;
	font-weight: 700;
	margin: 0 0 2px;
	color: #eafff5;
}

.amir-pwa-desc {
	font-size: 12.5px;
	line-height: 1.7;
	color: rgba(234,255,245,.6);
	margin: 0 0 16px;
}

.amir-pwa-actions {
	display: flex;
	gap: 10px;
}

.amir-pwa-btn {
	flex: 1;
	border-radius: 12px;
	padding: 11px 14px;
	font-size: 13.5px;
	font-weight: 600;
	font-family: inherit;
	cursor: pointer;
	border: 1px solid transparent;
	transition: transform .15s ease, background .2s ease;
}
.amir-pwa-btn:active { transform: scale(.97); }

.amir-pwa-btn-primary {
	background: linear-gradient(135deg, #00FF96, #00c976);
	color: #06100b;
	box-shadow: 0 10px 26px -10px rgba(0,255,150,.55);
}
.amir-pwa-btn-primary:hover { filter: brightness(1.06); }

.amir-pwa-btn-ghost {
	background: rgba(255,255,255,0.04);
	border-color: rgba(255,255,255,0.1);
	color: rgba(234,255,245,.75);
}
.amir-pwa-btn-ghost:hover { background: rgba(255,255,255,0.08); }

@media (prefers-reduced-motion: reduce) {
	.amir-pwa-card, .amir-pwa-card-border {
		animation: none !important;
		transition: none !important;
	}
}
