/* Tide Tracker — light, self-contained, TagDiv-friendly
   Priority: readable High/Low + times in narrow columns (stack days vertically). */

.tt-wrap {
	--tt-border: #d0d7de;
	--tt-bg: #f8fafc;
	--tt-card: #fff;
	--tt-text: #0f172a;
	--tt-muted: #64748b;
	--tt-high: #0284c7;
	--tt-low: #d97706;
	--tt-accent: #0f172a;
	--tt-radius: 10px;
	margin: 0 0 1.25rem;
	max-width: 100%;
	width: 100%;
	box-sizing: border-box;
	color: var(--tt-text);
	font-size: 1rem;
	line-height: 1.5;
	overflow: hidden;
}

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

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

.tt-tab {
	appearance: none;
	flex: 0 1 auto;
	border: 1px solid var(--tt-border);
	background: var(--tt-card);
	color: var(--tt-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;
}

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

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

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

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

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

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

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

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

.tt-city-head {
	margin: 0 0 0.7rem;
	min-width: 0;
}

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

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

.tt-station {
	margin: 0.25rem 0 0;
	font-size: 0.8rem;
	color: var(--tt-muted);
	overflow-wrap: anywhere;
}

.tt-station-id {
	opacity: 0.85;
}

.tt-note {
	margin: 0.35rem 0 0;
	font-size: 0.78rem;
	color: var(--tt-muted);
	font-style: italic;
	line-height: 1.35;
	overflow-wrap: anywhere;
}

/* Next tide — type, clock time, height only */
.tt-next {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	gap: 0.3rem 0.65rem;
	padding: 0.75rem 0.85rem;
	margin: 0 0 0.9rem;
	border-radius: 8px;
	background: var(--tt-card);
	border-left: 4px solid var(--tt-high);
	max-width: 100%;
	min-width: 0;
}

.tt-next-low {
	border-left-color: var(--tt-low);
}

.tt-next-kicker {
	font-size: 0.72rem;
	text-transform: uppercase;
	letter-spacing: 0.06em;
	font-weight: 700;
	color: var(--tt-muted);
	width: 100%;
}

.tt-next-type {
	font-weight: 800;
	font-size: 1.15rem;
}

.tt-next-high .tt-next-type { color: var(--tt-high); }
.tt-next-low .tt-next-type { color: var(--tt-low); }

.tt-next-time {
	font-variant-numeric: tabular-nums;
	font-weight: 700;
	font-size: 1.15rem;
	color: var(--tt-text);
}

.tt-next-height {
	margin-left: auto;
	font-weight: 800;
	font-variant-numeric: tabular-nums;
	white-space: nowrap;
	font-size: 1.15rem;
}

/* Stack Today / Tomorrow full-width so times never squeeze */
.tt-days {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: 1rem;
	max-width: 100%;
	min-width: 0;
}

.tt-day {
	min-width: 0;
	max-width: 100%;
}

.tt-day-label {
	margin: 0 0 0.45rem;
	font-size: 0.8rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	color: var(--tt-muted);
}

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

/* Room for High/Low · 12:00 PM · 6.2 ft */
.tt-row {
	display: grid;
	grid-template-columns: 3.5rem minmax(5.5rem, 1fr) auto;
	align-items: center;
	column-gap: 0.55rem;
	padding: 0.55rem 0.65rem;
	background: var(--tt-card);
	border-radius: 6px;
	border-left: 3px solid var(--tt-high);
	font-variant-numeric: tabular-nums;
	min-width: 0;
	max-width: 100%;
}

.tt-row.tt-low {
	border-left-color: var(--tt-low);
}

.tt-row.is-past {
	opacity: 0.55;
}

.tt-row.is-next {
	box-shadow: inset 0 0 0 1px rgba(2, 132, 199, 0.28);
	font-weight: 600;
}

.tt-type {
	font-weight: 800;
	font-size: 0.95rem;
	white-space: nowrap;
}

.tt-row.tt-high .tt-type { color: var(--tt-high); }
.tt-row.tt-low .tt-type { color: var(--tt-low); }

.tt-time {
	color: var(--tt-text);
	font-weight: 700;
	font-size: 1rem;
	white-space: nowrap;
	overflow: visible;
}

.tt-height {
	font-weight: 800;
	color: var(--tt-text);
	white-space: nowrap;
	font-size: 1rem;
	justify-self: end;
}

.tt-foot {
	margin: 0.85rem 0 0;
	font-size: 0.75rem;
	color: var(--tt-muted);
	line-height: 1.4;
	overflow-wrap: anywhere;
}

.tt-foot a {
	color: var(--tt-high);
	text-decoration: none;
}

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

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

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

/* Compact sidebar */
.tt-compact .tt-city {
	padding: 0.75rem 0.8rem;
}

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

.tt-compact .tt-next {
	padding: 0.6rem 0.7rem;
}

.tt-compact .tt-next-type,
.tt-compact .tt-next-time,
.tt-compact .tt-next-height {
	font-size: 1.05rem;
}

.tt-compact .tt-row {
	padding: 0.5rem 0.55rem;
	grid-template-columns: 3.25rem minmax(5rem, 1fr) auto;
}

.tt-compact .tt-type {
	font-size: 0.9rem;
}

.tt-compact .tt-time,
.tt-compact .tt-height {
	font-size: 0.95rem;
}

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