/* NWS Weather — light, self-contained, TagDiv-friendly (mirrors Tide Tracker) */

.nw-wrap {
	--nw-border: #d0d7de;
	--nw-bg: #f8fafc;
	--nw-card: #fff;
	--nw-text: #0f172a;
	--nw-muted: #64748b;
	--nw-day: #0284c7;
	--nw-night: #6366f1;
	--nw-alert: #b45309;
	--nw-alert-bg: #fffbeb;
	--nw-accent: #0f172a;
	--nw-radius: 10px;
	margin: 0 0 1.25rem;
	max-width: 100%;
	width: 100%;
	box-sizing: border-box;
	color: var(--nw-text);
	font-size: 0.95rem;
	line-height: 1.45;
	overflow: hidden;
}

.nw-wrap *,
.nw-wrap *::before,
.nw-wrap *::after {
	box-sizing: border-box;
}

/* City pills — full names, wrap to extra rows (no ellipsis / "Lincoln C...") */
.nw-tabs {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.35rem;
	margin: 0 0 0.75rem;
	width: 100%;
	max-width: 100%;
}

.nw-tab {
	appearance: none;
	flex: 0 1 auto;
	border: 1px solid var(--nw-border);
	background: var(--nw-card);
	color: var(--nw-text);
	border-radius: 999px;
	padding: 0.4rem 0.75rem;
	font: inherit;
	font-size: 0.82rem;
	font-weight: 600;
	line-height: 1.25;
	text-align: center;
	white-space: nowrap;
	overflow: visible;
	text-overflow: clip;
	cursor: pointer;
	transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.nw-tab:hover {
	border-color: #94a3b8;
}

.nw-tab.is-active {
	background: var(--nw-accent);
	border-color: var(--nw-accent);
	color: #fff;
}

.nw-panels {
	max-width: 100%;
	min-width: 0;
}

.nw-multi .nw-city {
	display: none;
}

.nw-multi .nw-city.is-active {
	display: block;
}

.nw-city {
	border: 1px solid var(--nw-border);
	background: var(--nw-bg);
	border-radius: var(--nw-radius);
	padding: 0.9rem 0.85rem 0.75rem;
	box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
	max-width: 100%;
	min-width: 0;
	overflow: hidden;
}

.nw-city + .nw-city {
	margin-top: 0.75rem;
}

.nw-multi .nw-city + .nw-city {
	margin-top: 0;
}

.nw-city-head {
	margin: 0 0 0.65rem;
	min-width: 0;
}

.nw-city-title {
	margin: 0;
	font-size: 1.15rem;
	font-weight: 700;
	letter-spacing: -0.01em;
	color: var(--nw-text);
	overflow-wrap: anywhere;
}

.nw-state {
	font-weight: 500;
	color: var(--nw-muted);
	font-size: 0.85em;
}

.nw-source {
	margin: 0.2rem 0 0;
	font-size: 0.78rem;
	color: var(--nw-muted);
}

/* Alerts */
.nw-alerts {
	display: grid;
	gap: 0.4rem;
	margin: 0 0 0.75rem;
}

.nw-alert {
	padding: 0.5rem 0.65rem;
	border-radius: 8px;
	background: var(--nw-alert-bg);
	border-left: 4px solid var(--nw-alert);
	min-width: 0;
}

.nw-sev-extreme,
.nw-sev-severe {
	background: #fef2f2;
	border-left-color: #dc2626;
}

.nw-sev-moderate {
	background: #fff7ed;
	border-left-color: #ea580c;
}

.nw-alert-event {
	display: block;
	font-weight: 700;
	font-size: 0.88rem;
	color: #92400e;
}

.nw-sev-extreme .nw-alert-event,
.nw-sev-severe .nw-alert-event {
	color: #991b1b;
}

.nw-alerts-label {
	margin-bottom: 0.35rem;
	color: #92400e;
}

.nw-alert-head {
	display: block;
	margin-top: 0.2rem;
	font-size: 0.8rem;
	color: #78350f;
	line-height: 1.35;
	overflow-wrap: anywhere;
}

.nw-alert-area {
	display: block;
	margin-top: 0.2rem;
	font-size: 0.75rem;
	color: #a16207;
	line-height: 1.3;
	overflow-wrap: anywhere;
}

.nw-alert-more {
	margin: 0.15rem 0 0;
	font-size: 0.78rem;
	color: var(--nw-muted);
	font-style: italic;
}

/* Current / next period hero */
.nw-now {
	padding: 0.7rem 0.75rem;
	margin: 0 0 0.75rem;
	border-radius: 8px;
	background: var(--nw-card);
	border-left: 4px solid var(--nw-day);
	max-width: 100%;
	min-width: 0;
}

.nw-now-night {
	border-left-color: var(--nw-night);
}

.nw-now-kicker {
	display: block;
	font-size: 0.72rem;
	text-transform: uppercase;
	letter-spacing: 0.06em;
	font-weight: 700;
	color: var(--nw-muted);
	margin-bottom: 0.25rem;
}

.nw-now-main {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	gap: 0.35rem 0.65rem;
	min-width: 0;
}

.nw-now-temp {
	font-size: 1.75rem;
	font-weight: 800;
	letter-spacing: -0.02em;
	font-variant-numeric: tabular-nums;
	line-height: 1.1;
	color: var(--nw-text);
}

.nw-now-short {
	flex: 1 1 8rem;
	min-width: 0;
	font-weight: 600;
	font-size: 0.98rem;
	color: #334155;
	overflow-wrap: anywhere;
}

.nw-now-wind {
	display: block;
	margin-top: 0.35rem;
	font-size: 0.82rem;
	color: var(--nw-muted);
}

.nw-section-label {
	margin: 0 0 0.4rem;
	font-size: 0.78rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	color: var(--nw-muted);
}

.nw-list {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	gap: 0.35rem;
	min-width: 0;
}

.nw-row {
	padding: 0.5rem 0.55rem;
	background: var(--nw-card);
	border-radius: 6px;
	border-left: 3px solid var(--nw-day);
	min-width: 0;
	max-width: 100%;
}

.nw-row.nw-night {
	border-left-color: var(--nw-night);
}

.nw-row-top {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 0.5rem;
	min-width: 0;
}

.nw-row-name {
	font-weight: 700;
	font-size: 0.88rem;
	min-width: 0;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.nw-row-temp {
	font-weight: 800;
	font-variant-numeric: tabular-nums;
	white-space: nowrap;
	font-size: 0.95rem;
	color: var(--nw-text);
}

.nw-row-short {
	margin-top: 0.15rem;
	font-size: 0.86rem;
	color: #475569;
	overflow-wrap: anywhere;
}

.nw-row-wind {
	margin-top: 0.15rem;
	font-size: 0.78rem;
	color: var(--nw-muted);
}

.nw-row-detail {
	margin: 0.4rem 0 0;
	font-size: 0.8rem;
	color: #64748b;
	line-height: 1.4;
	overflow-wrap: anywhere;
}

.nw-foot {
	margin: 0.7rem 0 0;
	font-size: 0.72rem;
	color: var(--nw-muted);
	line-height: 1.35;
	overflow-wrap: anywhere;
}

.nw-foot a {
	color: var(--nw-day);
	text-decoration: none;
}

.nw-foot a:hover {
	text-decoration: underline;
}

.nw-error {
	color: #b91c1c;
	margin: 0.35rem 0;
}

.nw-hint {
	color: var(--nw-muted);
	font-size: 0.85rem;
	margin: 0.25rem 0 0;
	font-style: italic;
}

/* Compact */
.nw-compact .nw-city {
	padding: 0.7rem 0.75rem;
}

.nw-compact .nw-city-title {
	font-size: 1.05rem;
}

.nw-compact .nw-now-temp {
	font-size: 1.45rem;
}

.nw-compact .nw-tab {
	font-size: 0.78rem;
	padding: 0.35rem 0.65rem;
}

.nw-compact .nw-row-detail {
	display: none;
}
