/*
 * St. Petersburg Tide Day
 * Palette taken from Tampa Bay: deep channel water, shallow grass-flat green,
 * and late-afternoon sun. Fonts inherit from the theme. Override any
 * --sptd-* variable in your theme CSS to re-skin.
 */
.sptd {
	--sptd-channel: #12475a;
	--sptd-water: #2a8c98;
	--sptd-flats: #bfe0d8;
	--sptd-surface: #f2f8f6;
	--sptd-sun: #e5a23a;
	--sptd-ink: #1b3440;
	--sptd-muted: #5d7680;

	color: var(--sptd-ink);
	background: var(--sptd-surface);
	border-top: 3px solid var(--sptd-water);
	padding: 1rem 1rem 0.75rem;
	font-variant-numeric: tabular-nums;
	line-height: 1.45;
}

.sptd p { margin: 0; }

.sptd__title {
	margin: 0 0 0.5rem;
}

.sptd__head {
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
	align-items: baseline;
	gap: 0.25rem 1rem;
}

.sptd__place {
	font-size: 1.125em;
	font-weight: 700;
	color: var(--sptd-channel);
}

.sptd__date {
	font-size: 0.875em;
	color: var(--sptd-muted);
}

.sptd__status {
	margin-top: 0.625rem !important;
	font-size: 0.9375em;
}

.sptd__state {
	display: inline-block;
	padding: 0 0.4em;
	margin-right: 0.25em;
	border-radius: 2px;
	font-weight: 700;
	color: #fff;
	background: var(--sptd-water);
}

.sptd__state--falling { background: var(--sptd-channel); }

/* Tide curve: the one visual flourish. */
.sptd__chart {
	margin: 0.75rem -0.25rem 0.25rem;
}

.sptd__chart svg {
	display: block;
	width: 100%;
	height: auto;
	aspect-ratio: 320 / 150;
	overflow: visible;
}

.sptd__night { fill: var(--sptd-channel); opacity: 0.08; }
.sptd__stop-top { stop-color: var(--sptd-water); stop-opacity: 0.55; }
.sptd__stop-bottom { stop-color: var(--sptd-flats); stop-opacity: 0.25; }
.sptd__line { fill: none; stroke: var(--sptd-water); stroke-width: 2; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.sptd__axis, .sptd__tick { stroke: var(--sptd-muted); stroke-width: 1; opacity: 0.5; vector-effect: non-scaling-stroke; }
.sptd__datum { stroke: var(--sptd-muted); stroke-dasharray: 3 3; opacity: 0.5; vector-effect: non-scaling-stroke; }
.sptd__tick-label { font-size: 10px; fill: var(--sptd-muted); }
.sptd__mark { stroke: var(--sptd-surface); stroke-width: 1.5; }
.sptd__mark--high { fill: var(--sptd-channel); }
.sptd__mark--low { fill: var(--sptd-water); }
.sptd__mark-label { font-size: 10.5px; font-weight: 700; fill: var(--sptd-ink); }
.sptd__now { stroke: var(--sptd-sun); stroke-width: 1.5; vector-effect: non-scaling-stroke; }
.sptd__now-dot { fill: var(--sptd-sun); stroke: var(--sptd-surface); stroke-width: 2; }

/* Tide table */
.sptd__table {
	width: 100%;
	margin: 0.5rem 0 0;
	border-collapse: collapse;
	border: 0;
	font-size: 0.9375em;
}

.sptd__table th,
.sptd__table td {
	padding: 0.35rem 0.25rem;
	border: 0;
	border-bottom: 1px solid rgba(18, 71, 90, 0.12);
	text-align: left;
	background: none;
}

.sptd__table thead th {
	font-size: 0.8125em;
	font-weight: 400;
	color: var(--sptd-muted);
}

.sptd__table td:last-child,
.sptd__table thead th:last-child { text-align: right; }

.sptd__table tbody th { font-weight: 600; }
.sptd__row--high .sptd__glyph { color: var(--sptd-channel); }
.sptd__row--low .sptd__glyph { color: var(--sptd-water); }
.sptd__glyph { font-size: 0.75em; margin-right: 0.3em; }
.sptd__row--past { color: var(--sptd-muted); }
.sptd__row--next { box-shadow: inset 3px 0 0 var(--sptd-sun); }
.sptd__row--next th { padding-left: 0.6rem; }

/* Sun, moon, range */
.sptd__almanac {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 0.5rem 1rem;
	margin: 0.75rem 0 0;
	font-size: 0.875em;
}

.sptd__almanac div { margin: 0; }
.sptd__almanac dt { margin: 0; color: var(--sptd-muted); font-weight: 400; }
.sptd__almanac dd { margin: 0; font-weight: 600; }

/* Day navigation */
.sptd__nav {
	display: flex;
	justify-content: space-between;
	gap: 0.5rem;
	margin-top: 0.75rem;
	font-size: 0.875em;
}

.sptd__nav a { color: var(--sptd-channel); }
.sptd__nav-today { margin: 0 auto; }
.sptd__nav-next { margin-left: auto; }
.sptd__nav a:focus-visible { outline: 2px solid var(--sptd-sun); outline-offset: 2px; }

.sptd__source,
.sptd__admin-note {
	margin-top: 0.75rem !important;
	font-size: 0.75em;
	color: var(--sptd-muted);
}

.sptd__source a { color: inherit; }
.sptd__empty { margin-top: 0.5rem !important; }
.sptd__admin-note { color: #8a3b12; }

/* Fallback in case the theme doesn't define WordPress's screen-reader-text. */
.sptd .screen-reader-text {
	position: absolute !important;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(1px, 1px, 1px, 1px);
	white-space: nowrap;
}
