/**
 * Frontend PWA Styles
 */

:root {
	--wp-pwa-indigo: #6366f1;
	--wp-pwa-indigo-hover: #4f46e5;
	--wp-pwa-bg: rgba(15, 23, 42, 0.88);
	--wp-pwa-border: rgba(255, 255, 255, 0.08);
	--wp-pwa-text-main: #f8fafc;
	--wp-pwa-text-muted: #94a3b8;
}

/* Banner Container */
.wp-pwa-banner {
	position: fixed;
	bottom: 24px;
	right: 24px;
	z-index: 999999;
	max-width: 380px;
	width: calc(100% - 48px);
	box-sizing: border-box;
	animation: wp-pwa-slide-up 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* Glassmorphic Card */
.wp-pwa-banner-card {
	position: relative;
	background: var(--wp-pwa-bg);
	border: 1px solid var(--wp-pwa-border);
	border-radius: 20px;
	padding: 24px;
	box-shadow: 0 20px 50px rgba(0, 0, 0, 0.4);
	backdrop-filter: blur(16px);
	-webkit-backdrop-filter: blur(16px);
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
	color: var(--wp-pwa-text-main);
}

/* Close button */
.wp-pwa-close-btn {
	position: absolute;
	top: 16px;
	right: 16px;
	background: transparent;
	border: none;
	color: var(--wp-pwa-text-muted);
	cursor: pointer;
	padding: 4px;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: all 0.2s ease;
}

.wp-pwa-close-btn:hover {
	background: rgba(255, 255, 255, 0.06);
	color: var(--wp-pwa-text-main);
}

.wp-pwa-close-btn svg {
	width: 18px;
	height: 18px;
}

/* Header */
.wp-pwa-banner-header {
	display: flex;
	align-items: center;
	margin-bottom: 16px;
}

.wp-pwa-app-icon-container {
	position: relative;
	width: 52px;
	height: 52px;
	margin-right: 14px;
	flex-shrink: 0;
}

.wp-pwa-app-icon-container img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	border-radius: 12px;
	border: 1px solid rgba(255, 255, 255, 0.1);
}

.wp-pwa-icon-fallback {
	width: 100%;
	height: 100%;
	background: var(--wp-pwa-indigo);
	color: #fff;
	border-radius: 12px;
	font-size: 22px;
	font-weight: bold;
	display: flex;
	align-items: center;
	justify-content: center;
	text-transform: uppercase;
}

.wp-pwa-app-details h3 {
	margin: 0 0 2px 0;
	font-size: 16px;
	font-weight: 600;
	color: var(--wp-pwa-text-main);
	line-height: 1.2;
}

.wp-pwa-app-sub {
	margin: 0;
	font-size: 12px;
	color: var(--wp-pwa-text-muted);
}

/* Prompt Texts */
.wp-pwa-prompt-text {
	margin: 0 0 20px 0;
	font-size: 14px;
	line-height: 1.5;
	color: var(--wp-pwa-text-muted);
}

/* Action Buttons */
.wp-pwa-action-buttons {
	display: flex;
	gap: 10px;
}

.wp-pwa-btn {
	flex: 1;
	padding: 11px 16px;
	font-size: 14px;
	font-weight: 600;
	border-radius: 10px;
	border: none;
	cursor: pointer;
	transition: all 0.2s ease;
	text-align: center;
	box-sizing: border-box;
}

.wp-pwa-btn-primary {
	background: var(--wp-pwa-indigo);
	color: #ffffff;
	box-shadow: 0 4px 12px rgba(99, 102, 241, 0.2);
}

.wp-pwa-btn-primary:hover {
	background: var(--wp-pwa-indigo-hover);
	transform: translateY(-1px);
	box-shadow: 0 6px 16px rgba(99, 102, 241, 0.3);
}

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

.wp-pwa-btn-secondary {
	background: rgba(255, 255, 255, 0.05);
	color: var(--wp-pwa-text-main);
	border: 1px solid rgba(255, 255, 255, 0.08);
}

.wp-pwa-btn-secondary:hover {
	background: rgba(255, 255, 255, 0.1);
}

/* iOS Step List Styles */
.wp-pwa-ios-steps {
	margin: 0;
	padding: 0;
	list-style: none;
}

.wp-pwa-ios-steps li {
	display: flex;
	align-items: center;
	justify-content: space-between;
	background: rgba(255, 255, 255, 0.03);
	border: 1px solid rgba(255, 255, 255, 0.05);
	border-radius: 10px;
	padding: 10px 14px;
	margin-bottom: 8px;
	font-size: 13px;
	color: var(--wp-pwa-text-main);
}

.wp-pwa-ios-steps li:last-child {
	margin-bottom: 0;
}

.wp-pwa-ios-icon-svg {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 24px;
	height: 24px;
	color: var(--wp-pwa-indigo);
	flex-shrink: 0;
	margin-left: 10px;
}

.wp-pwa-ios-icon-svg svg {
	width: 20px;
	height: 20px;
}

/* Slide Up Keyframes */
@keyframes wp-pwa-slide-up {
	0% {
		opacity: 0;
		transform: translateY(40px) scale(0.95);
	}
	100% {
		opacity: 1;
		transform: translateY(0) scale(1);
	}
}

/* Push Notification Subscription Popup Styles */
.wp-pwa-notif-popup {
	position: fixed;
	bottom: 24px;
	left: 24px;
	z-index: 999998;
	max-width: 380px;
	width: calc(100% - 48px);
	box-sizing: border-box;
	animation: wp-pwa-slide-up 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.wp-pwa-notif-card {
	position: relative;
	background: var(--wp-pwa-bg);
	border: 1px solid var(--wp-pwa-border);
	border-radius: 20px;
	padding: 24px;
	box-shadow: 0 20px 50px rgba(0, 0, 0, 0.4);
	backdrop-filter: blur(16px);
	-webkit-backdrop-filter: blur(16px);
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
	color: var(--wp-pwa-text-main);
}

.wp-pwa-notif-header {
	display: flex;
	align-items: center;
	margin-bottom: 14px;
}

.wp-pwa-notif-icon-badge {
	position: relative;
	width: 48px;
	height: 48px;
	border-radius: 14px;
	background: linear-gradient(135deg, rgba(99, 102, 241, 0.25), rgba(79, 70, 229, 0.1));
	border: 1px solid rgba(99, 102, 241, 0.3);
	display: flex;
	align-items: center;
	justify-content: center;
	margin-right: 14px;
	flex-shrink: 0;
	color: var(--wp-pwa-indigo);
}

.wp-pwa-bell-icon {
	width: 24px;
	height: 24px;
	z-index: 1;
	animation: wp-pwa-bell-ring 3.5s infinite ease-in-out;
}

.wp-pwa-icon-ping {
	position: absolute;
	top: 6px;
	right: 6px;
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background: #ef4444;
	box-shadow: 0 0 8px #ef4444;
	animation: wp-pwa-ping 1.5s cubic-bezier(0, 0, 0.2, 1) infinite;
}

.wp-pwa-notif-title-area h3 {
	margin: 0 0 2px 0;
	font-size: 16px;
	font-weight: 600;
	color: var(--wp-pwa-text-main);
	line-height: 1.2;
}

.wp-pwa-notif-sub {
	margin: 0;
	font-size: 12px;
	color: #818cf8;
	font-weight: 500;
}

.wp-pwa-notif-description {
	margin: 0 0 18px 0;
	font-size: 13.5px;
	line-height: 1.5;
	color: var(--wp-pwa-text-muted);
}

.wp-pwa-notif-status {
	margin-bottom: 16px;
	padding: 10px 14px;
	border-radius: 10px;
	font-size: 13px;
	line-height: 1.4;
	display: flex;
	align-items: center;
	gap: 8px;
}

.wp-pwa-notif-status.is-loading {
	background: rgba(99, 102, 241, 0.15);
	color: #a5b4fc;
	border: 1px solid rgba(99, 102, 241, 0.3);
}

.wp-pwa-notif-status.is-success {
	background: rgba(16, 185, 129, 0.15);
	color: #6ee7b7;
	border: 1px solid rgba(16, 185, 129, 0.3);
}

.wp-pwa-notif-status.is-error {
	background: rgba(239, 68, 68, 0.15);
	color: #fca5a5;
	border: 1px solid rgba(239, 68, 68, 0.3);
}

.wp-pwa-btn-glow {
	position: relative;
	overflow: hidden;
}

.wp-pwa-btn-icon {
	width: 16px;
	height: 16px;
	margin-right: 6px;
	display: inline-block;
	vertical-align: middle;
}

.wp-pwa-spinner {
	width: 16px;
	height: 16px;
	border: 2px solid currentColor;
	border-right-color: transparent;
	border-radius: 50%;
	animation: wp-pwa-spin 0.75s linear infinite;
	display: inline-block;
	flex-shrink: 0;
}

@keyframes wp-pwa-bell-ring {
	0%, 100% { transform: rotate(0); }
	5%, 15% { transform: rotate(14deg); }
	10%, 20% { transform: rotate(-14deg); }
	25% { transform: rotate(0); }
}

@keyframes wp-pwa-ping {
	75%, 100% {
		transform: scale(2);
		opacity: 0;
	}
}

@keyframes wp-pwa-spin {
	to { transform: rotate(360deg); }
}

/* Responsive adjustments */
@media (max-width: 480px) {
	.wp-pwa-banner,
	.wp-pwa-notif-popup {
		bottom: 16px;
		left: 16px;
		right: 16px;
		width: calc(100% - 32px);
		max-width: none;
	}
	.wp-pwa-banner-card,
	.wp-pwa-notif-card {
		padding: 20px;
	}
}

