#safer-env-widget.safer-env-panel {
	position: fixed;
	bottom: 20px;
	right: 12px;
	left: 12px;
	z-index: 9999;
	background: transparent;
	border: 0;
	border-radius: 0;
	box-shadow: none;
	padding: 0;
	min-width: unset;
	max-width: none;
	font-size: 13px;
	line-height: 1.4;
	display: flex;
	justify-content: flex-start;
	pointer-events: none;
}

#safer-env-widget {
	position: fixed;
	bottom: 20px;
	right: 12px;
	left: 12px;
	z-index: 9999;
	display: flex;
	justify-content: flex-start;
	pointer-events: none;
	background: transparent;
	border: 0;
	box-shadow: none;
	padding: 0;
	min-width: unset;
	max-width: calc(100vw - 24px);
}

#safer-env-widget .wwaq-popup {
	box-sizing: border-box;
	width: min(900px, 90vw);
	max-width: calc(100vw - 24px);
	background: #1f2937;
	border: 1px solid rgba(255, 255, 255, 0.08);
	border-radius: 12px;
	box-shadow: 0 12px 28px rgba(0, 0, 0, 0.45);
	overflow: hidden;
	color: #e5e7eb;
	font-family: system-ui, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
	font-size: 13px;
	pointer-events: auto;
}

.wwaq-popup.collapsed {
	width: 260px !important;
	max-width: 260px !important;
	padding: 0;
}

.wwaq-popup.collapsed .wwaq-body {
	display: none !important;
}

.wwaq-head {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 8px 10px;
	background: #005a66;
	border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.wwaq-title {
	color: #e5e7eb;
	font-weight: 700;
	font-size: 14px !important;
	letter-spacing: 0.2px;
	flex: 1;
}

.wwaq-loc {
	font-size: 13px !important;
	font-weight: 600;
	color: #e5e7eb;
}

.wwaq-btn {
	background: transparent;
	border: 0;
	color: #9ca3af;
	cursor: pointer;
	padding: 2px 6px;
	border-radius: 8px;
}

.wwaq-btn:hover {
	color: #cbd5e1;
	background: rgba(255, 255, 255, 0.06);
}

.wwaq-body {
	padding: 10px;
	max-height: min(72vh, 640px);
	overflow-y: auto;
}

.wwaq-banner {
	display: flex;
	gap: 8px;
	align-items: center;
	background: #0f172a;
	border: 1px solid rgba(255, 255, 255, 0.08);
	padding: 6px 8px;
	border-radius: 10px;
	margin-bottom: 10px;
}

.wwaq-banner-text {
	display: flex;
	flex-direction: column;
	gap: 2px;
}

.wwaq-banner small {
	color: #9ca3af;
}

.wwaq-banner .wwaq-links {
	margin-left: auto;
	font-size: 12px;
}

.wwaq-banner .wwaq-links a {
	color: #8ac7ff;
	text-decoration: none;
}

.wwaq-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
	gap: 10px;
}

.wwaq-grid-first,
.wwaq-grid-second {
	grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.wwaq-section {
	border: 1px dashed rgba(255, 255, 255, 0.12);
	border-radius: 10px;
	padding: 8px;
	background: rgba(255, 255, 255, 0.02);
}

.wwaq-sec-title {
	font-weight: 700;
	font-size: 15px;
	margin-bottom: 6px;
	display: flex;
	align-items: center;
	gap: 8px;
}

.wwaq-grid-inner {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 6px 10px;
}

.wwaq-grid-inner.single-col {
	grid-template-columns: 1fr;
}

.wwaq-grid-inner .cell {
	padding: 6px;
	border: 1px dashed rgba(255, 255, 255, 0.12);
	border-radius: 8px;
	background: rgba(255, 255, 255, 0.02);
}

.wwaq-grid-inner .title {
	font-size: 11.5px;
	color: #9ca3af;
	margin-bottom: 4px;
}

.wwaq-grid-inner .val {
	display: flex;
	align-items: center;
	gap: 8px;
	flex-wrap: wrap;
	min-height: 24px;
}

.wwaq-date {
	color: #9ca3af;
	font-size: 11.5px;
	margin-top: 6px;
}

.wwaq-badge {
	padding: 2px 8px;
	border-radius: 999px;
	background: rgba(255, 255, 255, 0.06);
	font-weight: 700;
}

.wwaq-links a,
.wwaq-date a {
	color: #fff;
	text-decoration: none;
	font-size: 12px;
}

/* Severity color classes */
.g-green .wwaq-sec-title { color: #b9f5dc; }
.g-yellow .wwaq-sec-title { color: #ffe8aa; }
.g-orange .wwaq-sec-title { color: #ffd3a1; }
.g-red .wwaq-sec-title { color: #ffb4b4; }
.g-purple .wwaq-sec-title { color: #e3d0ff; }
.g-maroon .wwaq-sec-title { color: #ffd0d0; }
.g-green { border-left: 4px solid rgba(16, 185, 129, 0.6); }
.g-yellow { border-left: 4px solid rgba(251, 191, 36, 0.8); }
.g-orange { border-left: 4px solid rgba(245, 158, 11, 0.8); }
.g-red { border-left: 4px solid rgba(239, 68, 68, 0.8); }
.g-purple { border-left: 4px solid rgba(139, 92, 246, 0.8); }
.g-maroon { border-left: 4px solid rgba(127, 29, 29, 0.8); }
.g-green .wwaq-badge { background: rgba(16, 185, 129, 0.18); color: #b9f5dc; }
.g-yellow .wwaq-badge { background: rgba(251, 191, 36, 0.8); color: #ffe8aa; }
.g-orange .wwaq-badge { background: rgba(245, 158, 11, 0.8); color: #ffd3a1; }
.g-red .wwaq-badge { background: rgba(239, 68, 68, 0.8); color: #ffb4b4; }
.g-purple .wwaq-badge { background: rgba(139, 92, 246, 0.8); color: #e3d0ff; }
.g-maroon .wwaq-badge { background: rgba(127, 29, 29, 0.35); color: #ffd0d0; }
.g-na .wwaq-badge { background: rgba(107, 114, 128, 0.2); color: #e5e7eb; }
.wwaq-grid-inner .cell.g-green .wwaq-badge { background: rgba(16, 185, 129, 0.18); color: #b9f5dc; }
.wwaq-grid-inner .cell.g-yellow .wwaq-badge { background: rgba(251, 191, 36, 0.8); color: #ffe8aa; }
.wwaq-grid-inner .cell.g-orange .wwaq-badge { background: rgba(245, 158, 11, 0.8); color: #ffd3a1; }
.wwaq-grid-inner .cell.g-red .wwaq-badge { background: rgba(239, 68, 68, 0.8); color: #ffb4b4; }
.wwaq-grid-inner .cell.g-purple .wwaq-badge { background: rgba(139, 92, 246, 0.8); color: #e3d0ff; }
.wwaq-grid-inner .cell.g-maroon .wwaq-badge { background: rgba(127, 29, 29, 0.35); color: #ffd0d0; }
.wwaq-grid-inner .cell.g-na .wwaq-badge { background: rgba(107, 114, 128, 0.2); color: #e5e7eb; }

.grid-spacer {
	opacity: 0.5;
	display: flex;
	align-items: center;
	justify-content: center;
	border: 1px dashed rgba(255, 255, 255, 0.08);
	border-radius: 10px;
	min-height: 76px;
}

.grid-logo {
	display: none;
}

.wwaq-logo-only {
	border: none;
	background: transparent;
	padding: 0;
}

.wwaq-logo-wrap {
	display: flex;
	align-items: center;
	justify-content: center;
	min-height: 76px;
	padding: 6px;
}

.wwaq-logo {
	min-width: 200px;
	width: 100%;
	height: 48px;
	background-image: url('../images/PHAN_logo.png');
	background-repeat: no-repeat;
	background-position: center;
	background-size: contain;
	filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.2));
}

.wwaq-github {
	text-align: center;
}

.wwaq-github a {
	color: #e5e7eb;
	font-size: 11.5px;
	margin-top: 6px;
	display: inline-block;
	transition: transform 0.2s ease-in-out;
}

.wwaq-github a:hover {
	transform: scale(1.08);
}

/* Responsive */
@media (max-width: 900px) {
	#safer-env-widget {
		bottom: 12px;
		right: 12px;
		left: 12px;
		justify-content: center;
	}
	.wwaq-grid {
		grid-template-columns: 1fr;
	}
	.grid-spacer,
	.grid-logo,
	.grid-covid,
	.grid-flu,
	.grid-rsv,
	.grid-aqi {
		grid-column: 1 !important;
	}
}

@media (max-width: 1200px) and (min-width: 901px) {
	.wwaq-grid {
		grid-template-columns: repeat(2, minmax(300px, 1fr));
	}
	.wwaq-grid-second {
		grid-template-columns: repeat(2, minmax(260px, 1fr));
	}
}
