/* Jen's Weather Hub styles — inherits site typography, card-based layout */
.jwh-wrap {
	--jwh-card: #ffffff;
	--jwh-border: rgba(0, 0, 0, 0.08);
	--jwh-ink: inherit;
	--jwh-muted: rgba(0, 0, 0, 0.55);
	--jwh-accent: #1a5fb4;
	max-width: 100%;
	display: grid;
	gap: 1.5rem;
}

.jwh-header { text-align: center; margin-bottom: 0; }
.jwh-location { margin: 0 0 0.25rem; }
.jwh-updated { color: var(--jwh-muted); font-size: 0.85em; margin: 0; }

.jwh-error {
	padding: 1rem;
	border: 1px dashed #c00;
	border-radius: 8px;
	background: #fff5f5;
}

/* ---- Alerts ---- */
.jwh-alerts { display: grid; gap: 0.5rem; }
.jwh-alert {
	border-radius: 10px;
	border: 1px solid var(--jwh-border);
	background: #fff8e6;
	padding: 0.6rem 1rem;
}
.jwh-alert summary { cursor: pointer; font-weight: 600; }
.jwh-alert-severe, .jwh-alert-extreme { background: #fdeaea; border-color: rgba(200, 0, 0, 0.35); }

/* ---- Current conditions ---- */
.jwh-current .jwh-now {
	background: var(--jwh-card);
	border: 1px solid var(--jwh-border);
	border-radius: 16px;
	padding: 1.5rem;
	box-shadow: 0 6px 24px rgba(0, 0, 0, 0.06);
}
.jwh-now-main {
	display: flex;
	align-items: center;
	gap: 1rem;
	flex-wrap: wrap;
	margin-bottom: 1rem;
}
.jwh-now-icon { font-size: 3.2rem; line-height: 1; }
.jwh-now-temp { font-size: 3.2rem; font-weight: 700; line-height: 1; }
.jwh-now-desc { font-size: 1.05rem; }
.jwh-now-desc small { color: var(--jwh-muted); }
.jwh-now-stats {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
	gap: 0.75rem;
	margin: 0;
}
.jwh-now-stats div {
	background: rgba(0, 0, 0, 0.03);
	border-radius: 10px;
	padding: 0.5rem 0.75rem;
}
.jwh-now-stats dt { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--jwh-muted); margin: 0; }
.jwh-now-stats dd { margin: 0; font-weight: 600; }

/* ---- Hourly strip ---- */
.jwh-hourly h3, .jwh-daily h3, .jwh-air h3, .jwh-embed h3, .jwh-sources h3 { margin: 0 0 0.6rem; }
.jwh-hours {
	display: flex;
	gap: 0.35rem;
	overflow-x: auto;
	padding-bottom: 0.5rem;
	-webkit-overflow-scrolling: touch;
}
.jwh-hour {
	flex: 0 0 3rem;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 0.25rem;
	font-size: 0.75rem;
}
.jwh-hour-temp { font-weight: 600; }
.jwh-hour-bar {
	height: 70px;
	width: 0.9rem;
	background: rgba(0, 0, 0, 0.05);
	border-radius: 999px;
	display: flex;
	align-items: flex-end;
	overflow: hidden;
}
.jwh-hour-bar span {
	display: block;
	width: 100%;
	background: linear-gradient(to top, var(--jwh-accent), #6db3f2);
	border-radius: 999px;
	transition: height 0.6s ease;
}
.jwh-hour-pop { color: var(--jwh-accent); min-height: 1em; }
.jwh-hour-time { color: var(--jwh-muted); white-space: nowrap; }

/* ---- 7-day grid ---- */
.jwh-daily-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
	gap: 0.75rem;
}
.jwh-day {
	background: var(--jwh-card);
	border: 1px solid var(--jwh-border);
	border-radius: 14px;
	padding: 0.9rem 0.6rem;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 0.3rem;
	text-align: center;
	transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.jwh-day:hover { transform: translateY(-4px); box-shadow: 0 10px 28px rgba(0, 0, 0, 0.1); }
.jwh-day-name { font-weight: 700; text-transform: uppercase; font-size: 0.78rem; letter-spacing: 0.08em; }
.jwh-day-icon { font-size: 1.9rem; line-height: 1; }
.jwh-day-desc { font-size: 0.8rem; color: var(--jwh-muted); }
.jwh-day-temps { font-size: 0.95rem; }
.jwh-day-pop { font-size: 0.8rem; color: var(--jwh-accent); }
.jwh-day-sun { font-size: 0.72rem; color: var(--jwh-muted); }

/* ---- Air quality ---- */
.jwh-aqi {
	border-radius: 14px;
	padding: 1rem 1.25rem;
	display: flex;
	align-items: baseline;
	gap: 0.9rem;
	flex-wrap: wrap;
	border: 1px solid var(--jwh-border);
}
.jwh-aqi-value { font-size: 2.2rem; font-weight: 800; line-height: 1; }
.jwh-aqi-label { font-weight: 600; }
.jwh-aqi-detail { color: var(--jwh-muted); font-size: 0.85rem; flex-basis: 100%; }
.jwh-aqi-good { background: #e7f6e7; }
.jwh-aqi-moderate { background: #fdf6dd; }
.jwh-aqi-usg { background: #fdeedd; }
.jwh-aqi-unhealthy { background: #fde3dd; }
.jwh-aqi-veryunhealthy { background: #f3ddfd; }
.jwh-aqi-hazardous { background: #efd4d4; }

/* ---- Embeds ---- */
.jwh-embed-frame {
	position: relative;
	width: 100%;
	aspect-ratio: 16 / 10;
	border-radius: 14px;
	overflow: hidden;
	border: 1px solid var(--jwh-border);
	box-shadow: 0 6px 24px rgba(0, 0, 0, 0.06);
}
.jwh-embed-frame iframe {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	border: 0;
}

/* ---- Sources ---- */
.jwh-sources ul {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
	gap: 0.4rem 1.25rem;
	list-style: none;
	padding: 0;
	margin: 0;
}
.jwh-sources li {
	padding: 0.45rem 0.2rem;
	border-bottom: 1px solid var(--jwh-border);
}

/* ---- Live Interactive Maps grid ---- */
.jwh-maps { display: grid; gap: 0.75rem; }
.jwh-maps-intro { color: var(--jwh-muted); font-size: 0.9rem; margin: 0; }
.jwh-maps-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
	gap: 1.25rem;
}
.jwh-maps-group {
	margin: 1.4rem 0 0.1rem;
	font-size: 1.05rem;
	color: var(--jwh-accent);
	border-bottom: 1px solid var(--jwh-border);
	padding-bottom: 0.35rem;
}
.jwh-map { margin: 0; display: grid; gap: 0.4rem; }
.jwh-map-cap {
	font-weight: 700;
	font-size: 0.95rem;
	color: var(--jwh-ink);
}
.jwh-map .jwh-embed-frame { aspect-ratio: 16 / 11; }
.jwh-map-lazy {
	display: flex;
	align-items: center;
	justify-content: center;
	background:
		radial-gradient(circle at 30% 30%, rgba(26, 95, 180, 0.12), transparent 60%),
		linear-gradient(135deg, rgba(0, 0, 0, 0.04), rgba(0, 0, 0, 0.08));
}
.jwh-map-load {
	cursor: pointer;
	border: none;
	background: rgba(255, 255, 255, 0.9);
	color: var(--jwh-accent);
	font-weight: 600;
	font-size: 0.85rem;
	padding: 0.55rem 1.1rem;
	border-radius: 999px;
	box-shadow: 0 3px 12px rgba(0, 0, 0, 0.12);
}
.jwh-models-live { display: grid; gap: 0.75rem; margin-top: 0.5rem; }

/* ---- Hurricane Central ---- */
.jwh-tropics { display: grid; gap: 1rem; }
.jwh-tropics-note {
	background: rgba(0, 0, 0, 0.03);
	border: 1px solid var(--jwh-border);
	border-radius: 12px;
	padding: 0.8rem 1rem;
	margin: 0;
}
.jwh-storm {
	background: var(--jwh-card);
	border: 1px solid rgba(180, 40, 40, 0.35);
	border-radius: 16px;
	padding: 1.25rem;
	box-shadow: 0 6px 24px rgba(0, 0, 0, 0.06);
	display: grid;
	gap: 0.9rem;
}
.jwh-storm h4 { margin: 0; font-size: 1.25rem; }
.jwh-storm-stats {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
	gap: 0.75rem;
	margin: 0;
}
.jwh-storm-stats div { background: rgba(0, 0, 0, 0.03); border-radius: 10px; padding: 0.5rem 0.75rem; }
.jwh-storm-stats dt { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--jwh-muted); margin: 0; }
.jwh-storm-stats dd { margin: 0; font-weight: 600; }
.jwh-storm-links { margin: 0; font-size: 0.9rem; }

.jwh-tropics-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
	gap: 1rem;
}
.jwh-fig {
	margin: 0;
	border: 1px solid var(--jwh-border);
	border-radius: 14px;
	overflow: hidden;
	background: var(--jwh-card);
}
.jwh-fig img { display: block; width: 100%; height: auto; }
.jwh-fig figcaption {
	padding: 0.5rem 0.75rem;
	font-size: 0.78rem;
	color: var(--jwh-muted);
	text-align: center;
}
.jwh-fig-note { color: var(--jwh-muted); font-size: 0.8rem; margin: 0.25rem 0 0.75rem; text-align: center; }
.jwh-models { margin: 0; font-size: 0.9rem; line-height: 1.7; }

/* ---- Extended Model & Analysis Suite ---- */
.jwh-analysis { display: grid; gap: 0.75rem; }
.jwh-analysis-intro { color: var(--jwh-muted); font-size: 0.9rem; margin: 0; }
.jwh-analysis-cat {
	border: 1px solid var(--jwh-border);
	border-radius: 14px;
	background: var(--jwh-card);
	overflow: hidden;
}
.jwh-analysis-cat summary {
	cursor: pointer;
	font-weight: 700;
	padding: 0.85rem 1.1rem;
	list-style: none;
	position: relative;
}
.jwh-analysis-cat summary::-webkit-details-marker { display: none; }
.jwh-analysis-cat summary::after {
	content: '+';
	position: absolute;
	right: 1.1rem;
	top: 50%;
	transform: translateY(-50%);
	font-size: 1.2rem;
	color: var(--jwh-accent);
	transition: transform 0.25s ease;
}
.jwh-analysis-cat[open] summary::after { transform: translateY(-50%) rotate(45deg); }
.jwh-analysis-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
	gap: 0.75rem;
	padding: 0 1.1rem 1.1rem;
}
.jwh-fig-sm figcaption { font-size: 0.72rem; }
.jwh-analysis-more { font-size: 0.85rem; color: var(--jwh-muted); text-align: center; margin: 0; }

.jwh-credit { color: var(--jwh-muted); font-size: 0.75rem; text-align: center; margin: 0; }

@media (max-width: 600px) {
	.jwh-now-temp, .jwh-now-icon { font-size: 2.5rem; }
	.jwh-daily-grid { grid-template-columns: repeat(auto-fit, minmax(105px, 1fr)); }
}
