body {
	margin: 0;
	font-family: system-ui, sans-serif;
	background: #0b1020;
	color: #eaf0ff;
}

.wrap {
	max-width: 1000px;
	margin: auto;
	padding: 20px;
}

header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 20px;
}

.title {
	font-size: 1.8rem;
	font-weight: bolder;
	color: #a9b3c9;
}

.card {
	background: #121831;
	padding: 20px;
	border-radius: 12px;
	margin-bottom: 20px;
}

.hero {
	display: flex;
	align-items: center;
	justify-content: space-between;
}

.hero .temp {
	font-size: 2.4rem;
	font-weight: 700;
}

.now {
	display: flex;
	align-items: center;
	gap: 14px;
}

.now.compact {
	gap: 14px;
}

.cond-icon {
	width: 160px;
	height: 160px;
	display: flex;
	align-items: center;
	justify-content: center;
	border-radius: 12px;
	flex-shrink: 0;
}

.cond-icon svg {
	width: 140px;
	height: 140px;
}

.cond-icon img {
	width: 140px;
	height: 140px;
	object-fit: contain;
}

.now-main {
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.meta {
	color: #a9b3c9;
	margin-top: 0;
	font-size: 1rem;
}

.meta-inline {
	color: #a9b3c9;
	font-size: 1rem;
}

.details {
	color: #9aa6c3;
	font-size: 0.92rem;
	display: flex;
	gap: 12px;
	flex-wrap: wrap;
}

.details div {
	opacity: 0.95;
}

.days {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
	gap: 10px;
}

.day {
	background: #1f294b;
	padding: 10px;
	border-radius: 8px;
	text-align: center;
}

.day .mini-icon {
	margin: 8px auto;
	display: flex;
	align-items: center;
	justify-content: center;
}

.day .mini-icon img {
	width: 56px;
	height: 56px;
}

.loc-form input {
	border: 1px solid #333;
	padding: 6px;
	border-radius: 6px;
}

.loc-form button {
	background: #6aa5ff;
	border: none;
	padding: 6px 12px;
	border-radius: 6px;
	color: #000;
	font-weight: bold;
}

/* settings link/button styles are below (footer link) */

/* Basic settings panel styling so the nested buttons sit nicely */
#settingsPanel {
	display: flex;
	gap: 8px;
	align-items: center;
	background: rgba(255, 255, 255, 0.02);
	padding: 8px;
	border-radius: 8px;
	margin-left: 12px;
}

/* Footer settings link and panel */
#settingsFooter {
	margin-top: 18px;
	display: flex;
	align-items: center;
	justify-content: center;
}

#settingsLink {
	display: inline-block;
	text-decoration: none;
}

#settingsLink {
	background: #6aa5ff;
	color: #000;
	padding: 6px 12px;
	border-radius: 6px;
	font-weight: bold;
}

#settingsPanel {
	margin-left: 12px;
}

.maps {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 12px;
	margin-bottom: 20px;
}

.map-card {
	background: #0f1733;
	border-radius: 10px;
	padding: 8px;
}

.map-frame {
	width: 100%;
	height: 320px;
	border: 0;
	border-radius: 8px;
}

@media (max-width:800px) {
	.hero-inner {
		flex-direction: column;
		align-items: center;
		gap: 20px;
	}
}

@media (max-width:750px) {
	#currentcond {
		flex-direction: column;
	}

	#now {
		flex-direction: column;
	}
}

@media (max-width:700px) {
	.maps {
		grid-template-columns: 1fr;
	}

	.map-frame {
		height: 260px;
	}
}

@media (max-width:800px) {
	header {
		flex-direction: column;
	}

	.title {
		margin: 20px;
		;
	}
}

@media (max-width:550px) {
	.title {
		text-align: center;
	}
}

/* Hourly strip styles */
.card.hourly {
	overflow: hidden;
}

.hour-strip {
	display: flex;
	gap: 10px;
	overflow-x: auto;
	padding: 8px 4px;
}

.hour {
	background-color: #1f294b;
	min-width: 88px;
	padding: 8px;
	border-radius: 8px;
	text-align: center;
	box-shadow: 0 1px 0 rgba(255, 255, 255, 0.02);
}

.hour-time {
	color: #a9b3c9;
	font-size: 0.9rem;
	margin-bottom: 6px;
}

.hour-icon img {
	width: 48px;
	height: 48px;
}

.hour-temp {
	margin-top: 6px;
	font-weight: 700;
}

.hour-strip::-webkit-scrollbar {
	height: 8px;
}

.hour-strip::-webkit-scrollbar-thumb {
	background: rgba(255, 255, 255, 0.06);
	border-radius: 8px;
}

/* Footer */
.site-footer {
	color: #9aa6c3;
	font-size: 0.9rem;
	text-align: center;
	padding: 12px 0;
}

.site-footer .wrap-footer {
	max-width: 1000px;
	margin: auto;
}

.site-footer a {
	color: #9fc7ff;
	text-decoration: underline;
}

/* Header photo */
header.site-hero {
	height: 350px;
	display: flex;
	align-items: center;
	justify-content: center;
	position: relative;
	overflow: hidden;
	border-radius: 12px;
	margin-bottom: 20px;
}

header.site-hero .hero-overlay {
	position: absolute;
	inset: 0;
	background: linear-gradient(180deg, rgba(11, 16, 32, 0.45), rgba(11, 16, 32, 0.45));
}

header.site-hero .hero-inner {
	position: relative;
	z-index: 2;
	display: flex;
	align-items: center;
	justify-content: space-between;
	width: 100%;
	max-width: 1000px;
	padding: 20px;
}

header.site-hero .title {
	color: #fff;
}

header.site-hero .loc-form {
	z-index: 2;
}

header.site-hero::before {
	content: "";
	position: absolute;
	inset: 0;
	background-position: center top;
	background-size: cover;
	background-repeat: no-repeat;
	filter: brightness(0.95) saturate(0.95);
}

header.site-hero::before {
	background-image: var(--hero-image);
}

.photo-attrib {
	font-size: 0.82rem;
	color: #b6c8e6;
	text-align: center;
	margin-top: 6px;
}

/* Header alerts */
.hero-inner {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 12px;
}

.hero-left {
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.hero-right {
	display: flex;
	align-items: center;
}

.alerts-strip {
	display: flex;
	flex-direction: row;
	gap: 8px;
	align-items: center;
}

.alert-item {
	background: rgba(255, 80, 80, 0.06);
	color: inherit;
	padding: 6px 8px;
	border-radius: 6px;
	font-weight: 600;
}

/* Alert link colors: advisory (yellow), watch (orange), warning (red).
	Use link color rules that apply to all link states so visited links keep same color. */
.alert-link {
	color: inherit;
	text-decoration: none;
}

.alert-link { cursor: pointer; }

.alert-link.alert-advisory,
.alert-link.alert-advisory:visited,
.alert-link.alert-advisory:active,
.alert-link.alert-advisory:hover {
	color: #FFD700;
	/* gold/yellow */
}

.alert-link.alert-watch,
.alert-link.alert-watch:visited,
.alert-link.alert-watch:active,
.alert-link.alert-watch:hover {
	color: #FF8C00;
	/* dark orange */
}

.alert-link.alert-warning,
.alert-link.alert-warning:visited,
.alert-link.alert-warning:active,
.alert-link.alert-warning:hover {
	color: #FF3333;
	/* red */
}

.alert-link.alert-info,
.alert-link.alert-info:visited,
.alert-link.alert-info:active,
.alert-link.alert-info:hover {
	color: #9fc7ff;
	/* fallback/info color */
}

/* Alert JSON modal styles */
.modal-backdrop {
	position: fixed;
	inset: 0;
	background: rgba(2, 6, 23, 0.6);
	display: none;
	align-items: center;
	justify-content: center;
	z-index: 9999;
	padding: 20px;
}

.modal-backdrop.show {
	display: flex;
}

.modal {
	background: linear-gradient(180deg, #0b1226, #0f1733);
	color: #eaf0ff;
	border-radius: 12px;
	width: 100%;
	max-width: 920px;
	max-height: 86vh;
	overflow: hidden;
	box-shadow: 0 8px 40px rgba(2, 6, 23, 0.7);
	display: flex;
	flex-direction: column;
}

.modal-header {
	padding: 12px 16px;
	border-bottom: 1px solid rgba(255, 255, 255, 0.04);
	display: flex;
	align-items: center;
	justify-content: space-between;
}

.modal-title {
	font-weight: 700;
	font-size: 1.1rem;
	color: #cfe6ff;
}

.modal-close {
	background: transparent;
	border: 0;
	color: #9aa6c3;
	font-size: 1rem;
	padding: 6px;
	cursor: pointer;
}

.modal-body {
	padding: 12px 16px;
	overflow: auto;
	display: flex;
	gap: 16px;
}

.modal-summary {
	flex: 1;
	background: rgba(255, 255, 255, 0.02);
	padding: 12px;
	border-radius: 8px;
	font-size: 0.95rem;
}

@media (max-width:800px) {
	.modal-body {
		flex-direction: column;
	}

	.modal-summary {
		width: 100%;
		max-width: none;
	}
}

/* Cookie consent banner */
.cookie-banner {
	position: fixed;
	left: 16px;
	right: 16px;
	bottom: 18px;
	background: linear-gradient(180deg, #071226, #0b1730);
	color: #eaf0ff;
	border-radius: 10px;
	box-shadow: 0 8px 30px rgba(2, 6, 23, 0.6);
	z-index: 10000;
}

.cookie-inner {
	display: flex;
	gap: 12px;
	align-items: center;
	justify-content: space-between;
	padding: 12px;
}

.cookie-text {
	flex: 1;
	color: #cfe6ff;
	font-size: 0.95rem;
}

.cookie-actions {
	display: flex;
	gap: 8px;
	align-items: center;
}

.cookie-actions button {
	background: #6aa5ff;
	border: none;
	color: #000;
	padding: 8px 10px;
	border-radius: 6px;
	font-weight: 700;
	cursor: pointer;
}

.cookie-actions button.secondary {
	background: transparent;
	border: 1px solid rgba(255, 255, 255, 0.06);
	color: #cfe6ff;
}

.cookie-link {
	color: #9fc7ff;
	text-decoration: underline;
	margin-left: 8px;
}

@media (max-width:640px) {
	.cookie-inner {
		flex-direction: column;
		align-items: flex-start;
	}

	.cookie-actions {
		width: 100%;
		justify-content: flex-end;
	}
}

/* Toast */
.toast {
	position: fixed;
	left: 50%;
	transform: translateX(-50%) translateY(16px);
	bottom: 12px;
	background: rgba(20,28,50,0.98);
	color: #eaf0ff;
	padding: 8px 12px;
	border-radius: 8px;
	box-shadow: 0 8px 28px rgba(0,0,0,0.5);
	opacity: 0;
	transition: opacity 220ms ease, transform 220ms ease;
	z-index: 13000;
	pointer-events: none;
	font-size: 0.95rem;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); pointer-events: auto; }
.toast .toast-inner { white-space: nowrap; }