/* Adapted from GS2 CSS/main.css (2007), modernised: self-hosted Poppins */

@font-face {
	font-family: 'Poppins';
	font-style: normal;
	font-weight: 400;
	font-display: swap;
	src: url('../fonts/poppins-400.woff2') format('woff2');
}
@font-face {
	font-family: 'Poppins';
	font-style: normal;
	font-weight: 600;
	font-display: swap;
	src: url('../fonts/poppins-600.woff2') format('woff2');
}
@font-face {
	font-family: 'Poppins';
	font-style: normal;
	font-weight: 700;
	font-display: swap;
	src: url('../fonts/poppins-700.woff2') format('woff2');
}

* { box-sizing: border-box; }

html {
	-webkit-text-size-adjust: 100%;
}

body {
	background: #FFFFFF;
	font-family: 'Poppins', 'Trebuchet MS', 'Century Gothic', sans-serif;
	padding-top: 10px;
	font-size: 17px;
	line-height: 1.55;
	color: #2b2b2b;
	margin: 8px;
	overflow-wrap: break-word;
}

main {
	width: min(100%, 1180px);
	margin: 0 auto;
}

a:hover { text-decoration: underline; }
a { font-weight: 600; color: #2C5A66; text-decoration: none; }

.button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 44px;
	padding: 8px 16px;
	background: #356A78;
	color: white;
	font-weight: 600;
	border: solid 1px #356A78;
	border-radius: 6px;
	text-decoration: none;
	cursor: pointer;
}
.button:hover { background: #2C5A66; border-color: #2C5A66; text-decoration: none; }
.button.secondary {
	background: transparent;
	color: #356A78;
	border: solid 1px #356A78;
}
.button.secondary:hover { background: #f4f7f8; }

input {
	font-family: 'Poppins', 'Trebuchet MS', 'Century Gothic', sans-serif;
	max-width: 100%;
	width: 280px;
	font-size: 17px;
	padding: 4px 6px;
	border: solid 1px #9a9a9a;
	border-radius: 3px;
}

input.button {
	width: auto;
	font-size: 18px;
	-webkit-appearance: none;
}

p { padding-top: 0; margin-top: 0; }

h1 {
	font-size: 30px; font-weight: 700;
	color: #505050;
	margin-bottom: 5px;
}

h2 {
	font-size: 23px; font-weight: 600;
	color: #505050;
	margin-bottom: 5px;
}

/* -------------------------------------------------------------- header/nav */
.siteHeader {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	padding: 10px 0;
	margin-bottom: 10px;
	border-bottom: solid 1px #e4e8ea;
}
.siteHeader .brand {
	display: flex;
	align-items: center;
	min-height: 44px;
}
.siteHeader .brand img { display: block; height: 40px; width: auto; }
#siteNav {
	display: flex;
	flex-wrap: wrap;
	gap: 4px 16px;
	font-size: 14px;
}
#siteNav a {
	display: inline-flex;
	align-items: center;
	min-height: 44px;
	color: #2b2b2b;
	font-weight: 600;
}
#siteNav a.navActive { color: #356A78; }
.siteHeader.navOnly { justify-content: flex-end; }

/* --------------------------------------------------------------- breadcrumbs */
.breadcrumbs { margin: 4px 0 14px; }
.breadcrumbs ol {
	display: flex;
	flex-wrap: wrap;
	list-style: none;
	margin: 0;
	padding: 0;
	font-size: 13px;
	color: #6d6d6d;
}
.breadcrumbs li { display: flex; align-items: center; }
.breadcrumbs li + li::before {
	content: '\203A';
	margin: 0 6px;
	color: #b0b8bb;
}
.breadcrumbs a { color: #6d6d6d; font-weight: 400; }
.breadcrumbs a:hover { color: #356A78; }
.breadcrumbs li[aria-current="page"] { color: #2b2b2b; font-weight: 600; }

/* -------------------------------------------------------------------- cards */
.card {
	border: solid 1px #e4e8ea;
	border-radius: 10px;
	padding: 20px;
	margin-bottom: 15px;
}
.cardTitle { font-size: 20px; font-weight: 600; color: #505050; margin: 0 0 8px; text-align: left; }
.cardSub { font-size: 80%; color: #6d6d6d; }

/* -------------------------------------------------------------------- forms */
.formRow { margin-bottom: 14px; }
.formRow label { display: block; margin-bottom: 4px; font-weight: 600; }
.hint { font-size: 70%; color: #6d6d6d; font-weight: 400; }
.formActions { display: flex; align-items: center; justify-content: flex-end; gap: 10px; margin-top: 14px; }
.formActions.start { justify-content: flex-start; flex-wrap: wrap; }
.formActions.between { justify-content: space-between; flex-wrap: wrap; }
.checkboxRow { display: flex; align-items: center; gap: 8px; margin-top: 8px; }
.checkboxRow input[type="checkbox"] { width: auto; }

/* --------------------------------------------------------------- spot chips */
.spotChips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.spotChip {
	display: inline-flex;
	align-items: center;
	min-height: 36px;
	padding: 4px 12px;
	border: solid 1px #356A78;
	border-radius: 999px;
	font-weight: 600;
	font-size: 14px;
	color: #356A78;
}
.spotChip.default { background: #356A78; color: white; }
.addChip {
	border-style: dashed;
	color: #6d6d6d;
	border-color: #b0b8bb;
}

/* ---------------------------------------------------------------------- home */
.heroLead { font-size: 18px; color: #505050; margin-bottom: 16px; }
.mapCard { padding: 14px; }
.mapCard #map { height: min(62vh, 620px); min-height: 380px; }
.selectionBar {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 10px;
	margin-top: 12px;
	padding: 12px 14px;
	border: solid 1px #356A78;
	border-left-width: 4px;
	border-radius: 8px;
	background: #f4f7f8;
}
.selectionBar .selectionInfo { flex: 1 1 260px; font-size: 14px; color: #505050; }
.selectionBar input[type="text"] { flex: 1 1 200px; width: auto; }

/* ------------------------------------------------------------- forecast page */
.forecastMap { width: 100%; height: 340px; border: solid 1px #c0c0c0; border-radius: 8px; }
.mapLegend { margin: 10px 0 0; font-size: 14px; color: #505050; }
.swellArrowWrap { background: none; border: none; }
.swellArrow {
	width: 56px;
	height: 56px;
	transform-origin: 50% 50%;
	filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.45));
}
.swellArrow svg { width: 100%; height: 100%; }
.swellArrow svg path { fill: #E15B2E; stroke: white; stroke-width: 1; }

.dayStrip { display: grid; grid-template-columns: repeat(7, 1fr); gap: 8px; }
.dayCard {
	border: solid 1px #e4e8ea;
	border-radius: 8px;
	padding: 10px 6px;
	text-align: center;
	background: white;
	font: inherit;
	cursor: pointer;
}
.dayCard:hover { border-color: #356A78; }
.dayCard.today .dayName { color: #356A78; }
.dayCard.selected { border-color: #356A78; box-shadow: inset 0 0 0 1px #356A78; background: #f4f7f8; }
.dayName { font-size: 12px; font-weight: 600; color: #6d6d6d; text-transform: uppercase; }
.dayWave { font-size: 24px; font-weight: 700; color: #356A78; line-height: 1.2; }
.dayWave .unit { font-size: 13px; font-weight: 600; margin-left: 2px; }
.dayRange, .dayMeta { font-size: 12px; color: #505050; }
.dayWind {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 4px;
	font-size: 12px;
	margin-top: 4px;
	color: #505050;
}
.dayWind .dot { width: 8px; height: 8px; border-radius: 50%; flex: 0 0 auto; }
.dayWind.good .dot { background: #2f8f4e; }
.dayWind.fair .dot { background: #d99a1b; }
.dayWind.poor .dot { background: #c0392b; }

.daySummary {
	margin: 14px 0 0;
	padding: 10px 14px;
	border-left: solid 4px #E15B2E;
	background: #fdf6f2;
	border-radius: 0 8px 8px 0;
	font-size: 16px;
	color: #505050;
}

/* ---------------------------------------------------------------- save panel */
.savePanel { border-left: solid 4px #356A78; }
.savePanel.saved { border-left-color: #2f8f4e; }
.savePanel .okText { color: #2f8f4e; font-weight: 600; }

/* ------------------------------------------------------------- outlook table */
table.weatherTable { border-radius: 8px; overflow: hidden; }
table.weatherTable thead th { padding: 8px 6px; text-align: left; font-weight: bold; }
table.weatherTable tbody tr:nth-child(even) { background: #f4f7f8; }
.tableNote { font-size: 70%; color: #6d6d6d; text-align: right; }

/* --------------------------------------------------------------------- charts */
.chartTitle { font-size: 16px; font-weight: 600; margin: 0 0 4px; text-align: left; }
.outlookHead { display: flex; justify-content: space-between; align-items: baseline; flex-wrap: wrap; gap: 4px 12px; }

/* ----------------------------------------------------------------------- map */
#map { width: 100%; height: 555px; border: solid 1px #c0c0c0; }
#map.mapShort { height: 420px; }

/* ------------------------------------------------------------------- utility */
.muted { color: #6d6d6d; }
.errorBox { color: red; border: solid 1px #efefef; margin: 15px 0; padding: 10px; }

#footer {
	font-size: 80%;
	margin-top: 100px;
	padding-top: 10px;
	border-top: solid 1px #efefef;
	width: 90%;
	margin-left: auto;
	margin-right: auto;
	text-align: center;
}

#errorDisplay { display: none; color: red; border: solid 1px #efefef; margin: 15px; padding: 10px; }

table.weatherTable {
	font-family: 'Poppins', Verdana, sans-serif;
	font-size: 15px;
	border-collapse: collapse;
	border: solid 1px #356A78;
	width: 100%;
}
table.weatherTable tr td { padding: 5px 6px; }
table.weatherTable thead { background-color: #356A78; color: white; font-weight: bold; }
table.weatherTable thead a { color: white; font-weight: normal; }

.chartBox { text-align: center; margin-top: 5px; }
.chartBox canvas { width: 100%; max-width: 100%; }

select {
	font-family: 'Poppins', 'Trebuchet MS', sans-serif;
	font-size: 18px;
	margin-top: 2px;
}

span.big { font-size: 120%; }
span.small { font-size: 80%; }
p.cloud span { padding: 5px; display: inline-block; }
span.h { left: -999px; position: absolute; width: 990px; }

table.plainTable { width: 100%; border-collapse: collapse; }
table.plainTable thead th { font-weight: bold; border-bottom: solid 1px #efefef; padding: 4px 2px; text-align: left; }
table.plainTable tbody td { padding: 4px 2px; border-bottom: solid 1px #f7f7f7; }

.shopGrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 15px; }
.shopItem {
	display: flex;
	flex-direction: column;
	border: solid 1px #e4e8ea;
	border-radius: 8px;
	padding: 14px;
	text-align: center;
	font-size: 80%;
}
.shopItem .price { color: #356A78; font-weight: bold; font-size: 110%; }
.shopBuy { margin-top: auto; padding-top: 10px; }
.shopItemFeature { max-width: 320px; }
.shopImg { width: 100%; height: auto; border-radius: 6px; margin-bottom: 8px; }
.shopCat { color: #6d6d6d; font-size: 90%; }
.shopName { font-weight: bold; font-size: 120%; margin: 6px 0; }

.blogPost { margin-bottom: 30px; }
.blogPost .meta { font-size: 80%; color: #6d6d6d; margin-bottom: 8px; }
.postTitle { font-size: 130%; font-weight: bold; }
.rule { border: 0; border-top: solid 1px #efefef; }

#headerBar { min-height: 168px; overflow: hidden; }
#headerBar img.gs { float: left; margin-bottom: 5px; }
#headerBar img.surfer { float: right; margin-top: 20px; margin-right: 20px; }

.mapSearch {
	display: flex;
	align-items: flex-end;
	gap: 8px;
	margin: 0 0 10px;
	text-align: left;
}

.mapSearchText {
	flex: 1 1 280px;
	min-width: 0;
}

.mapSearchText input {
	width: 100% !important;
	margin: 0 !important;
}

@media (max-width: 760px) {
	body {
		margin: 0;
		padding: max(8px, env(safe-area-inset-top)) max(10px, env(safe-area-inset-right)) max(20px, env(safe-area-inset-bottom)) max(10px, env(safe-area-inset-left));
		font-size: 16px;
		line-height: 1.5;
	}

	main { width: 100%; }

	.siteHeader {
		flex-wrap: wrap;
		gap: 6px 0;
	}

	#siteNav {
		width: 100%;
		flex-wrap: nowrap;
		overflow-x: auto;
		-webkit-overflow-scrolling: touch;
		gap: 14px;
		padding-bottom: 2px;
	}

	#siteNav a { flex: 0 0 auto; min-height: 36px; }

	#headerBar {
		display: flex;
		justify-content: center;
		min-height: 0;
		padding: 2px 0 5px;
		overflow: visible;
	}

	#headerBar img.gs {
		float: none;
		width: 142px;
		height: auto;
		margin: 0;
	}

	#headerBar img.surfer { display: none; }

	h1, h2 {
		text-align: left;
		padding: 0;
	}

	h1 {
		font-size: clamp(23px, 7vw, 29px);
		line-height: 1.15;
		margin: 8px 2px 12px;
	}

	h2 {
		font-size: 21px;
		line-height: 1.25;
		margin: 12px 2px 7px;
	}

	input, select {
		font-size: 16px;
	}

	input:not([type="button"]):not([type="checkbox"]) {
		width: 100%;
		min-height: 44px;
	}

	input.button { min-width: 100px; }

	.mapSearch {
		align-items: stretch;
		flex-direction: column;
		gap: 7px;
		margin: 8px 0 10px;
	}

	.mapSearchText { flex-basis: auto; }
	.mapSearch .button { width: 100% !important; }

	#map {
		width: 100% !important;
		height: min(58vh, 390px) !important;
		min-height: 300px;
		margin-top: 8px !important;
	}

	.forecastMap { height: 280px; }

	.dayStrip {
		display: flex;
		overflow-x: auto;
		-webkit-overflow-scrolling: touch;
		padding-bottom: 4px;
	}
	.dayCard { flex: 0 0 116px; }

	table.weatherTable,
	table.plainTable {
		display: block;
		max-width: 100%;
		overflow-x: auto;
		-webkit-overflow-scrolling: touch;
	}

	table.weatherTable {
		font-size: 13px;
		white-space: nowrap;
	}

	table.weatherTable tr td { padding: 7px 6px; }

	.chartBox { text-align: left; }

	table.plainTable { font-size: 14px; }
	table.plainTable td { min-width: 70px; }
	table.plainTable td:first-child { min-width: 130px; }

	.shopGrid { display: block; }
	.shopItem {
		width: 100%;
		margin-bottom: 12px;
		padding: 14px;
	}

	#errorDisplay {
		margin: 8px 0;
		padding: 10px;
	}

	#footer {
		width: 100%;
		margin-top: 45px;
		padding: 14px 5px 0;
		line-height: 1.9;
	}
}

@media (max-width: 390px) {
	body { padding-left: 8px; padding-right: 8px; }
}
