/* PWA Install Modal Styles */
.pwa-install-modal,
.pwa-instructions-modal {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	z-index: 9999;
	display: flex;
	align-items: center;
	justify-content: center;
	opacity: 0;
	visibility: hidden;
	transition: all 0.3s ease;
}

.pwa-install-modal.show,
.pwa-instructions-modal.show {
	opacity: 1;
	visibility: visible;
}

.pwa-modal-overlay {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background-color: rgba(0, 0, 0, 0.5);
	backdrop-filter: blur(4px);
}

.pwa-modal-content {
	position: relative;
	background: white;
	border-radius: 16px;
	padding: 24px;
	margin: 20px;
	max-width: 400px;
	width: 100%;
	max-height: 90vh;
	overflow-y: auto;
	box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1),
		0 10px 10px -5px rgba(0, 0, 0, 0.04);
	transform: scale(0.9);
	transition: transform 0.3s ease;
}

.pwa-install-modal.show .pwa-modal-content,
.pwa-instructions-modal.show .pwa-modal-content {
	transform: scale(1);
}

.pwa-close-btn {
	position: absolute;
	top: 16px;
	left: 16px;
	width: 32px;
	height: 32px;
	border: none;
	background: #f3f4f6;
	border-radius: 8px;
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	color: #6b7280;
	transition: all 0.2s ease;
	z-index: 10;
}

.pwa-close-btn:hover {
	background: #e5e7eb;
	color: #374151;
}

.pwa-modal-header {
	text-align: center;
	margin-bottom: 24px;
	padding-top: 8px;
}

.pwa-app-icon {
	margin-bottom: 16px;
}

.pwa-app-icon img {
	border-radius: 12px;
	box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.pwa-modal-title {
	font-size: 20px;
	font-weight: 700;
	color: #1f2937;
	margin-bottom: 8px;
	line-height: 1.3;
}

.pwa-modal-subtitle {
	font-size: 14px;
	color: #6b7280;
	line-height: 1.5;
	margin: 0;
}

.pwa-modal-body {
	margin-bottom: 24px;
}

/* Android Benefits */
.pwa-benefits {
	display: flex;
	flex-direction: column;
	gap: 12px;
}

.pwa-benefit-item {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 12px;
	background: #f9fafb;
	border-radius: 8px;
	border: 1px solid #e5e7eb;
}

.pwa-benefit-item svg {
	flex-shrink: 0;
}

.pwa-benefit-item span {
	font-size: 14px;
	color: #374151;
	font-weight: 500;
}

/* iOS Instructions */
.pwa-instructions {
	display: flex;
	flex-direction: column;
	gap: 16px;
}

.pwa-step {
	display: flex;
	align-items: flex-start;
	gap: 12px;
}

.pwa-step-number {
	width: 24px;
	height: 24px;
	background: #6ac847;
	color: white;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 12px;
	font-weight: 700;
	flex-shrink: 0;
	margin-top: 2px;
}

.pwa-step-content p {
	font-size: 14px;
	color: #374151;
	line-height: 1.5;
	margin: 0;
}

.pwa-step-content strong {
	color: #1f2937;
	font-weight: 600;
}

/* iOS Detailed Instructions */
.pwa-ios-steps {
	display: flex;
	flex-direction: column;
	gap: 20px;
}

.pwa-ios-step {
	display: flex;
	align-items: center;
	gap: 16px;
	padding: 16px;
	background: #f9fafb;
	border-radius: 12px;
	border: 1px solid #e5e7eb;
}

.pwa-ios-step-image {
	flex-shrink: 0;
}

.pwa-ios-step p {
	font-size: 14px;
	color: #374151;
	line-height: 1.5;
	margin: 0;
}

.pwa-ios-step strong {
	color: #1f2937;
	font-weight: 600;
}

/* Modal Footer */
.pwa-modal-footer {
	display: flex;
	flex-direction: column;
	gap: 12px;
}

.pwa-install-btn {
	background: #6ac847;
	color: white;
	border: none;
	border-radius: 8px;
	padding: 12px 24px;
	font-size: 16px;
	font-weight: 600;
	cursor: pointer;
	transition: all 0.2s ease;
	width: 100%;
}

.pwa-install-btn:hover {
	background: #5aaf3a;
	transform: translateY(-1px);
}

.pwa-install-btn:active {
	transform: translateY(0);
}

.pwa-later-btn {
	background: transparent;
	color: #6b7280;
	border: 1px solid #d1d5db;
	border-radius: 8px;
	padding: 12px 24px;
	font-size: 14px;
	font-weight: 500;
	cursor: pointer;
	transition: all 0.2s ease;
	width: 100%;
}

.pwa-later-btn:hover {
	background: #f9fafb;
	border-color: #9ca3af;
	color: #374151;
}

/* Responsive Design */
@media (max-width: 480px) {
	.pwa-modal-content {
		margin: 16px;
		padding: 20px;
	}

	.pwa-modal-title {
		font-size: 18px;
	}

	.pwa-benefit-item,
	.pwa-ios-step {
		padding: 12px;
	}

	.pwa-install-btn,
	.pwa-later-btn {
		padding: 14px 20px;
		font-size: 15px;
	}
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
	.pwa-modal-content {
		background: #1f2937;
		color: #f9fafb;
	}

	.pwa-modal-title {
		color: #f9fafb;
	}

	.pwa-modal-subtitle {
		color: #d1d5db;
	}

	.pwa-benefit-item,
	.pwa-ios-step {
		background: #374151;
		border-color: #4b5563;
	}

	.pwa-benefit-item span,
	.pwa-step-content p,
	.pwa-ios-step p {
		color: #d1d5db;
	}

	.pwa-close-btn {
		background: #374151;
		color: #d1d5db;
	}

	.pwa-close-btn:hover {
		background: #4b5563;
		color: #f9fafb;
	}

	.pwa-later-btn {
		background: transparent;
		color: #d1d5db;
		border-color: #4b5563;
	}

	.pwa-later-btn:hover {
		background: #374151;
		border-color: #6b7280;
		color: #f9fafb;
	}
}

/* Animation for step numbers */
.pwa-step-number {
	animation: pulse 2s infinite;
}

@keyframes pulse {
	0%,
	100% {
		transform: scale(1);
	}
	50% {
		transform: scale(1.1);
	}
}

/* Smooth transitions for all interactive elements */
.pwa-benefit-item,
.pwa-ios-step,
.pwa-install-btn,
.pwa-later-btn {
	transition: all 0.2s ease;
}

/* Focus states for accessibility */
.pwa-install-btn:focus,
.pwa-later-btn:focus,
.pwa-close-btn:focus {
	outline: 2px solid #6ac847;
	outline-offset: 2px;
}

/* Loading state for install button */
.pwa-install-btn.loading {
	background: #9ca3af;
	cursor: not-allowed;
	pointer-events: none;
}

.pwa-install-btn.loading::after {
	content: "";
	width: 16px;
	height: 16px;
	border: 2px solid transparent;
	border-top: 2px solid white;
	border-radius: 50%;
	animation: spin 1s linear infinite;
	margin-left: 8px;
	display: inline-block;
}

@keyframes spin {
	0% {
		transform: rotate(0deg);
	}
	100% {
		transform: rotate(360deg);
	}
}
