/* ─── KCdesi PWA Install Banner ─────────────────────────────── */

.kc-pwa-install-banner {
	position: fixed;
	bottom: 0;
	left: 0;
	right: 0;
	background: linear-gradient(135deg, #E07B39 0%, #d97030 100%);
	color: white;
	z-index: 9999;
	padding: 12px;
	box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.2);
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue", sans-serif;
}

.kc-pwa-install-content {
	display: flex;
	align-items: center;
	gap: 12px;
	max-width: 600px;
	margin: 0 auto;
	padding: 8px 0;
}

.kc-pwa-install-icon {
	font-size: 32px;
	flex-shrink: 0;
}

.kc-pwa-install-text {
	flex: 1;
	min-width: 0;
}

.kc-pwa-install-text strong {
	display: block;
	font-size: 14px;
	margin-bottom: 4px;
	line-height: 1.2;
}

.kc-pwa-install-text p {
	font-size: 12px;
	margin: 0;
	opacity: 0.95;
	line-height: 1.3;
}

.kc-pwa-install-btn {
	padding: 8px 16px;
	background: white;
	color: #b71c1c;
	border: none;
	border-radius: 4px;
	font-weight: 600;
	font-size: 13px;
	cursor: pointer;
	flex-shrink: 0;
	transition: all 0.2s;
}

.kc-pwa-install-btn:hover {
	background: #f5f5f5;
	transform: scale(1.05);
}

.kc-pwa-install-btn:active {
	transform: scale(0.98);
}

.kc-pwa-install-dismiss {
	padding: 4px 8px;
	background: none;
	border: none;
	color: white;
	font-size: 18px;
	cursor: pointer;
	opacity: 0.8;
	flex-shrink: 0;
	transition: opacity 0.2s;
}

.kc-pwa-install-dismiss:hover {
	opacity: 1;
}

/* Mobile adjustments */
@media (max-width: 768px) {
	.kc-pwa-install-content {
		flex-wrap: wrap;
		gap: 8px;
	}

	.kc-pwa-install-icon {
		font-size: 24px;
	}

	.kc-pwa-install-text strong {
		font-size: 13px;
	}

	.kc-pwa-install-text p {
		font-size: 11px;
	}

	.kc-pwa-install-btn {
		padding: 6px 12px;
		font-size: 12px;
	}
}

/* ─── KCdesi PWA Admin Settings ────────────────────────────── */

.kcdesi-pwa-admin {
	max-width: 900px;
}

.kcdesi-pwa-stats {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
	gap: 16px;
	margin: 20px 0;
}

.stat-card {
	background: white;
	border: 1px solid #ddd;
	border-radius: 8px;
	padding: 20px;
	text-align: center;
	box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.stat-number {
	display: block;
	font-size: 28px;
	font-weight: bold;
	color: #b71c1c;
	margin-bottom: 8px;
}

.stat-label {
	display: block;
	font-size: 12px;
	text-transform: uppercase;
	color: #666;
	letter-spacing: 0.5px;
}

.kcdesi-pwa-tabs {
	display: flex;
	gap: 8px;
	margin: 20px 0 0 0;
	border-bottom: 2px solid #e0e0e0;
}

.tab-link {
	padding: 12px 16px;
	border: none;
	background: none;
	cursor: pointer;
	font-size: 14px;
	color: #666;
	border-bottom: 3px solid transparent;
	transition: all 0.2s;
	text-decoration: none;
}

.tab-link:hover {
	color: #333;
	border-bottom-color: #ddd;
}

.tab-link.active {
	color: #b71c1c;
	border-bottom-color: #b71c1c;
}

.tab-content {
	display: none;
	padding: 20px 0;
}

.tab-content.active {
	display: block;
	animation: fadeIn 0.2s;
}

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

.kcdesi-pwa-notify-form {
	background: white;
	padding: 20px;
	border: 1px solid #ddd;
	border-radius: 4px;
}

.kcdesi-pwa-notify-form h2 {
	margin-top: 0;
	font-size: 18px;
	color: #333;
}

.kcdesi-pwa-notify-form p {
	color: #666;
	margin: 0 0 20px 0;
}

.kcdesi-pwa-result {
	display: inline-block;
	margin-left: 12px;
	font-size: 13px;
	padding: 6px 12px;
	border-radius: 3px;
}

.kcdesi-pwa-result.success {
	color: #155724;
	background: #d4edda;
}

.kcdesi-pwa-result.error {
	color: #721c24;
	background: #f8d7da;
}

#prepare-deactivate:disabled,
#send-notification:disabled {
	opacity: 0.6;
	cursor: not-allowed;
}

code {
	background: #f5f5f5;
	padding: 2px 6px;
	border-radius: 3px;
	font-family: "Courier New", monospace;
	font-size: 12px;
}

/* Responsive admin */
@media (max-width: 768px) {
	.kcdesi-pwa-tabs {
		flex-wrap: wrap;
	}

	.tab-link {
		padding: 10px 12px;
		font-size: 12px;
	}

	.kcdesi-pwa-stats {
		grid-template-columns: 1fr;
	}
}

/* ─── NEW UX FEATURES ──────────────────────────────── */

/* Modal Overlay & Dialog */
.kc-pwa-modal-overlay {
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	background: rgba(0, 0, 0, 0.5);
	display: flex;
	align-items: center;
	justify-content: center;
	z-index: 10000;
	padding: 16px;
	animation: fadeInModal 0.2s;
}

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

.kc-pwa-modal {
	background: white;
	border-radius: 12px;
	max-width: 400px;
	width: 100%;
	box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
	overflow: hidden;
	animation: scaleUp 0.2s;
}

@keyframes scaleUp {
	from { transform: scale(0.95); opacity: 0; }
	to { transform: scale(1); opacity: 1; }
}

.kc-pwa-modal-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 16px;
	border-bottom: 1px solid #f0f0f0;
}

.kc-pwa-modal-header h2 {
	margin: 0;
	font-size: 18px;
	color: #1a1008;
	font-weight: 600;
}

.kc-pwa-modal-close {
	background: none;
	border: none;
	font-size: 24px;
	cursor: pointer;
	color: #999;
	padding: 0 4px;
	line-height: 1;
}

.kc-pwa-modal-close:hover {
	color: #666;
}

.kc-pwa-modal-body {
	padding: 16px;
}

.kc-pwa-modal-footer {
	display: flex;
	gap: 8px;
	padding: 12px 16px;
	border-top: 1px solid #f0f0f0;
	justify-content: flex-end;
}

.kc-pwa-btn-primary,
.kc-pwa-btn-secondary {
	padding: 8px 16px;
	border: none;
	border-radius: 4px;
	font-size: 14px;
	font-weight: 600;
	cursor: pointer;
	transition: all 0.2s;
}

.kc-pwa-btn-primary {
	background: #E07B39;
	color: white;
}

.kc-pwa-btn-primary:hover {
	background: #d97030;
}

.kc-pwa-btn-primary:disabled {
	opacity: 0.6;
	cursor: not-allowed;
}

.kc-pwa-btn-secondary {
	background: transparent;
	color: #666;
	border: 1px solid #ddd;
}

.kc-pwa-btn-secondary:hover {
	background: #f5f5f5;
}

/* Share Button */
.kc-pwa-share-btn {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	background: #E07B39;
	color: white;
	border: none;
	padding: 8px 14px;
	border-radius: 4px;
	font-size: 13px;
	font-weight: 600;
	cursor: pointer;
	transition: all 0.2s;
	margin-top: 8px;
}

.kc-pwa-share-btn:hover {
	background: #d97030;
	transform: translateY(-1px);
	box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

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

/* Favorites Heart Button */
.kc-pwa-fav-btn {
	background: none;
	border: none;
	font-size: 20px;
	cursor: pointer;
	padding: 4px 8px;
	transition: transform 0.2s;
}

.kc-pwa-fav-btn:hover {
	transform: scale(1.2);
}

.kc-pwa-fav-btn.favorited {
	color: #E07B39;
}

/* Cache Info Panel */
.kc-pwa-cache-info {
	background: #f9f9f9;
	border: 1px solid #e0e0e0;
	border-radius: 6px;
	padding: 12px;
	margin: 12px 0;
	font-size: 13px;
	color: #666;
}

.kc-pwa-cache-stat {
	display: flex;
	justify-content: space-between;
	margin-bottom: 8px;
}

.kc-pwa-cache-stat:last-child {
	margin-bottom: 0;
}

.kc-pwa-cache-progress {
	width: 100%;
	height: 6px;
	background: #e0e0e0;
	border-radius: 3px;
	margin-top: 8px;
	overflow: hidden;
}

.kc-pwa-cache-progress-bar {
	height: 100%;
	background: linear-gradient(90deg, #E07B39, #d97030);
	border-radius: 3px;
}
