/* Overlay */
#app-popup-overlay {
	position: fixed;
	inset: 0;
	background: rgba(0, 0, 0, 0.5);
	z-index: 9999;
	display: flex;
	align-items: flex-end;
	justify-content: center;
	padding: 0;
	animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
	from { opacity: 0; }
	to   { opacity: 1; }
}

@keyframes slideUp {
	from { transform: translateY(100%); opacity: 0; }
	to   { transform: translateY(0);    opacity: 1; }
}

/* Popup card */
#app-popup {
	background: #fff;
	border-radius: 20px 20px 0 0;
	padding: 2rem 1.75rem 2.5rem;
	width: 100%;
	max-width: 480px;
	text-align: center;
	position: relative;
	animation: slideUp 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* Drag handle */
#app-popup::before {
	content: '';
	display: block;
	width: 40px;
	height: 4px;
	background: #e0e0e0;
	border-radius: 2px;
	margin: 0 auto 1.5rem;
}

/* Close button */
#app-popup-close {
	position: absolute;
	top: 1.25rem;
	right: 1.25rem;
	background: #f5f5f5;
	border: none;
	width: 30px;
	height: 30px;
	border-radius: 50%;
	cursor: pointer;
	font-size: 14px;
	color: #666;
	display: flex;
	align-items: center;
	justify-content: center;
	line-height: 1;
}
#app-popup-close:hover { background: #ebebeb; }

/* App icon */
#app-popup-icon {
	width: 80px;
	height: 80px;
	border-radius: 20px;
	margin: 0 auto 1rem;
	overflow: hidden;
	box-shadow: 0 4px 16px rgba(0,0,0,0.12);
}
#app-popup-icon img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

/* Text */
#app-popup-title {
	font-size: 20px;
	font-weight: 600;
	margin: 0 0 6px;
	color: #111;
}
#app-popup-desc {
	font-size: 14px;
	color: #666;
	margin: 0 0 1.5rem;
	line-height: 1.5;
}

/* Badges */
#app-popup-badges {
	display: flex;
	gap: 12px;
	justify-content: center;
	flex-wrap: wrap;
	margin-bottom: 1rem;
}
#app-popup-badges a {
	display: inline-block;
	border: none;
}
#app-popup-badges img {
	height: 52px;
	display: block;
}

/* Fallback styled button */
.app-store-btn {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	background: #111;
	color: #fff;
	text-decoration: none;
	padding: 10px 20px;
	border-radius: 12px;
	font-size: 14px;
	font-weight: 500;
}

#app-popup-note {
	font-size: 12px;
	color: #aaa;
	margin: 0;
}

/* Desktop: centered modal instead of bottom sheet */
@media (min-width: 600px) {
	#app-popup-overlay {
		align-items: center;
	}
	#app-popup {
		border-radius: 20px;
		max-width: 380px;
		padding: 2rem 2rem 2.5rem;
	}
	#app-popup::before { display: none; }
}