/**
 * Breeze Evolution - Progressive Web App (PWA) & Web Push UI Stylesheet
 * Glassmorphism Design System with Mobile App Experience
 *
 * @package SmokyChix
 */

/* ==========================================================================
   1. SMART INSTALL BANNER (Floating Bottom Dock)
   ========================================================================== */
.smoky-pwa-banner {
	position: fixed;
	bottom: 24px;
	left: 50%;
	transform: translateX(-50%) translateY(120%);
	z-index: 99999;
	width: calc(100% - 32px);
	max-width: 580px;
	background: rgba(24, 26, 33, 0.94);
	backdrop-filter: blur(16px);
	-webkit-backdrop-filter: blur(16px);
	border: 1.5px solid rgba(255, 84, 0, 0.4);
	border-radius: 20px;
	box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6), 0 0 25px rgba(255, 84, 0, 0.2);
	padding: 16px 20px;
	opacity: 0;
	transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
	box-sizing: border-box;
}

.smoky-pwa-banner.visible {
	transform: translateX(-50%) translateY(0);
	opacity: 1;
}

.pwa-banner-inner {
	position: relative;
	display: flex;
	align-items: center;
	gap: 16px;
}

.pwa-close-btn {
	position: absolute;
	top: -6px;
	right: -8px;
	background: none;
	border: none;
	color: #94A3B8;
	font-size: 22px;
	cursor: pointer;
	line-height: 1;
	padding: 4px 8px;
	transition: color 0.2s ease;
}

.pwa-close-btn:hover {
	color: #FFFFFF;
}

.pwa-app-media {
	flex-shrink: 0;
}

.pwa-app-icon {
	width: 54px;
	height: 54px;
	border-radius: 14px;
	object-fit: cover;
	border: 1.5px solid var(--smoky-flame, #FF5400);
	box-shadow: 0 4px 15px rgba(255, 84, 0, 0.35);
	display: block;
}

.pwa-app-info {
	flex-grow: 1;
	min-width: 0;
}

.pwa-app-title-row {
	display: flex;
	align-items: center;
	gap: 8px;
}

.pwa-app-title-row h4 {
	margin: 0;
	font-size: 15px;
	font-weight: 800;
	color: #FFFFFF;
	font-family: var(--smoky-font-heading, 'Plus Jakarta Sans', sans-serif);
}

.pwa-badge-verified {
	font-size: 10.5px;
	font-weight: 800;
	color: #00F59B;
	background: rgba(0, 245, 155, 0.12);
	border: 1px solid rgba(0, 245, 155, 0.25);
	padding: 2px 7px;
	border-radius: 99px;
	display: inline-flex;
	align-items: center;
	gap: 3px;
}

.pwa-app-sub {
	margin: 4px 0 6px 0;
	font-size: 12px;
	color: #CBD5E1;
	line-height: 1.35;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.pwa-meta-chips {
	display: flex;
	gap: 6px;
	flex-wrap: wrap;
}

.pwa-chip {
	font-size: 10px;
	font-weight: 700;
	color: #E2E8F0;
	background: rgba(255, 255, 255, 0.08);
	padding: 2px 7px;
	border-radius: 6px;
}

.pwa-action-col {
	flex-shrink: 0;
}

.smoky-btn-pwa-install {
	background: linear-gradient(135deg, #FF5400 0%, #FF2A00 100%);
	color: #FFFFFF !important;
	border: none;
	font-family: var(--smoky-font-heading, 'Plus Jakarta Sans', sans-serif);
	font-size: 13px;
	font-weight: 800;
	padding: 10px 16px;
	border-radius: 12px;
	cursor: pointer;
	display: inline-flex;
	align-items: center;
	gap: 6px;
	white-space: nowrap;
	box-shadow: 0 4px 15px rgba(255, 84, 0, 0.4);
	transition: all 0.25s ease;
	animation: pwaPulse 2.5s infinite;
}

.smoky-btn-pwa-install:hover {
	transform: translateY(-2px);
	box-shadow: 0 6px 20px rgba(255, 84, 0, 0.6);
}

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

/* Light Mode Overrides for Install Banner */
body.smoky-body-light .smoky-pwa-banner {
	background: rgba(255, 255, 255, 0.96) !important;
	border-color: #CBD5E1 !important;
	box-shadow: 0 20px 50px rgba(0, 0, 0, 0.15), 0 0 20px rgba(255, 84, 0, 0.15) !important;
}

body.smoky-body-light .pwa-app-title-row h4 {
	color: #0F172A !important;
}

body.smoky-body-light .pwa-app-sub {
	color: #475569 !important;
}

body.smoky-body-light .pwa-chip {
	color: #334155 !important;
	background: #F1F5F9 !important;
	border: 1px solid #E2E8F0 !important;
}

/* Responsive adjustment for small mobile */
@media (max-width: 480px) {
	.smoky-pwa-banner {
		bottom: 12px;
		padding: 12px 14px;
	}
	.pwa-banner-inner {
		flex-wrap: wrap;
		gap: 12px;
	}
	.pwa-app-icon {
		width: 44px;
		height: 44px;
	}
	.pwa-action-col {
		width: 100%;
	}
	.smoky-btn-pwa-install {
		width: 100%;
		justify-content: center;
		padding: 10px 0;
	}
}

/* ==========================================================================
   2. iOS SAFARI ADD-TO-HOME-SCREEN MODAL
   ========================================================================== */
.smoky-pwa-modal-overlay {
	position: fixed;
	inset: 0;
	background: rgba(0, 0, 0, 0.75);
	backdrop-filter: blur(8px);
	z-index: 100000;
	display: flex;
	align-items: flex-end;
	justify-content: center;
	opacity: 0;
	pointer-events: none;
	transition: opacity 0.3s ease;
}

.smoky-pwa-modal-overlay.active {
	opacity: 1;
	pointer-events: auto;
}

.smoky-ios-sheet {
	width: 100%;
	max-width: 520px;
	background: #181A22;
	border-top-left-radius: 28px;
	border-top-right-radius: 28px;
	padding: 26px 24px;
	border: 1.5px solid #2F333E;
	border-bottom: none;
	box-shadow: 0 -20px 50px rgba(0, 0, 0, 0.6);
	transform: translateY(100%);
	transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
	box-sizing: border-box;
}

.smoky-pwa-modal-overlay.active .smoky-ios-sheet {
	transform: translateY(0);
}

.ios-sheet-header {
	display: flex;
	align-items: center;
	gap: 14px;
	position: relative;
	margin-bottom: 20px;
}

.ios-sheet-logo {
	width: 50px;
	height: 50px;
	border-radius: 12px;
	border: 1.5px solid var(--smoky-flame, #FF5400);
}

.ios-sheet-title h3 {
	margin: 0;
	font-size: 16px;
	font-weight: 800;
	color: #FFFFFF;
}

.ios-sheet-title p {
	margin: 3px 0 0 0;
	font-size: 12px;
	color: #94A3B8;
}

.ios-modal-close {
	position: absolute;
	top: -4px;
	right: -4px;
	background: none;
	border: none;
	color: #94A3B8;
	font-size: 24px;
	cursor: pointer;
}

.ios-sheet-steps {
	display: flex;
	flex-direction: column;
	gap: 12px;
	margin-bottom: 22px;
}

.ios-step-item {
	display: flex;
	align-items: flex-start;
	gap: 12px;
	background: rgba(255, 255, 255, 0.05);
	border: 1px solid rgba(255, 255, 255, 0.08);
	padding: 12px 14px;
	border-radius: 14px;
}

.step-num-bubble {
	width: 26px;
	height: 26px;
	border-radius: 50%;
	background: var(--smoky-flame, #FF5400);
	color: #FFFFFF;
	font-size: 12px;
	font-weight: 800;
	display: flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
}

.step-desc {
	font-size: 13px;
	color: #E2E8F0;
	line-height: 1.45;
}

.step-desc strong {
	color: #FFFFFF;
}

.smoky-btn-ios-done {
	width: 100%;
	background: var(--smoky-flame, #FF5400);
	color: #FFFFFF;
	border: none;
	font-size: 14px;
	font-weight: 800;
	padding: 12px 0;
	border-radius: 12px;
	cursor: pointer;
}

/* Light mode for iOS Sheet */
body.smoky-body-light .smoky-ios-sheet {
	background: #FFFFFF !important;
	border-color: #E2E8F0 !important;
}
body.smoky-body-light .ios-sheet-title h3 {
	color: #0F172A !important;
}
body.smoky-body-light .ios-step-item {
	background: #F8FAFC !important;
	border-color: #E2E8F0 !important;
}
body.smoky-body-light .step-desc {
	color: #334155 !important;
}
body.smoky-body-light .step-desc strong {
	color: #0F172A !important;
}

/* ==========================================================================
   3. WEB PUSH NOTIFICATION OPT-IN PROMPT
   ========================================================================== */
.smoky-push-prompt-box {
	position: fixed;
	top: 20px;
	right: 20px;
	z-index: 99998;
	width: calc(100% - 40px);
	max-width: 380px;
	background: rgba(24, 26, 33, 0.96);
	backdrop-filter: blur(16px);
	border: 1.5px solid var(--smoky-flame, #FF5400);
	border-radius: 18px;
	box-shadow: 0 15px 40px rgba(0, 0, 0, 0.5);
	padding: 16px 18px;
	opacity: 0;
	transform: translateY(-20px);
	transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
	box-sizing: border-box;
}

.smoky-push-prompt-box.visible {
	opacity: 1;
	transform: translateY(0);
}

.push-prompt-content {
	display: flex;
	gap: 12px;
	margin-bottom: 14px;
}

.push-prompt-icon {
	width: 38px;
	height: 38px;
	border-radius: 10px;
	background: rgba(255, 84, 0, 0.15);
	color: var(--smoky-flame, #FF5400);
	font-size: 20px;
	display: flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
}

.push-prompt-text strong {
	font-size: 13.5px;
	color: #FFFFFF;
	display: block;
	margin-bottom: 3px;
}

.push-prompt-text p {
	margin: 0;
	font-size: 12px;
	color: #CBD5E1;
	line-height: 1.4;
}

.push-prompt-actions {
	display: flex;
	gap: 8px;
	justify-content: flex-end;
}

.push-btn-accept {
	background: var(--smoky-flame, #FF5400);
	color: #FFFFFF;
	border: none;
	font-size: 12px;
	font-weight: 800;
	padding: 8px 14px;
	border-radius: 8px;
	cursor: pointer;
	display: inline-flex;
	align-items: center;
	gap: 4px;
}

.push-btn-decline {
	background: rgba(255, 255, 255, 0.1);
	color: #94A3B8;
	border: none;
	font-size: 12px;
	font-weight: 700;
	padding: 8px 12px;
	border-radius: 8px;
	cursor: pointer;
}

body.smoky-body-light .smoky-push-prompt-box {
	background: #FFFFFF !important;
	border-color: #E2E8F0 !important;
}
body.smoky-body-light .push-prompt-text strong {
	color: #0F172A !important;
}
body.smoky-body-light .push-prompt-text p {
	color: #475569 !important;
}

/* ==========================================================================
   4. PULL TO REFRESH INDICATOR
   ========================================================================== */
.smoky-ptr-indicator {
	position: fixed;
	top: -60px;
	left: 50%;
	transform: translateX(-50%);
	z-index: 99990;
	background: rgba(24, 26, 33, 0.95);
	backdrop-filter: blur(10px);
	border: 1px solid var(--smoky-flame, #FF5400);
	padding: 8px 16px;
	border-radius: 99px;
	display: flex;
	align-items: center;
	gap: 8px;
	box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4);
	pointer-events: none;
	opacity: 0;
	transition: opacity 0.2s ease;
}

.ptr-spinner-ring {
	font-size: 18px;
	color: var(--smoky-flame, #FF5400);
	transition: transform 0.2s ease;
}

.smoky-ptr-indicator.ready .ptr-spinner-ring {
	transform: rotate(180deg);
}

.smoky-ptr-indicator.refreshing .ptr-spinner-ring {
	animation: ptrSpin 0.8s linear infinite;
}

.ptr-text {
	font-size: 12px;
	font-weight: 700;
	color: #FFFFFF;
}

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

/* ==========================================================================
   5. NETWORK ONLINE/OFFLINE TOAST
   ========================================================================== */
.smoky-net-toast {
	position: fixed;
	bottom: 24px;
	left: 24px;
	z-index: 99999;
	padding: 10px 18px;
	border-radius: 12px;
	font-size: 12.5px;
	font-weight: 800;
	display: flex;
	align-items: center;
	gap: 8px;
	box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
	opacity: 0;
	transform: translateY(20px);
	transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
	pointer-events: none;
}

.smoky-net-toast.visible {
	opacity: 1;
	transform: translateY(0);
}

.smoky-net-toast.online {
	background: #064E3B;
	color: #6EE7B7;
	border: 1px solid #059669;
}

.smoky-net-toast.offline {
	background: #7F1D1D;
	color: #FCA5A5;
	border: 1px solid #DC2626;
}
