/* ============================================================
   Stop Hubs – Public Card Styles  v1.3.31
   Design: Matches trolleyco.ca card screenshot
   Author: Vista Radio - Ashley Roberts
   ============================================================ */

.sh-container {
	--sh-teal:       #1a9b9b;
	--sh-teal-dark:  #147a7a;
	--sh-teal-light: #e8f7f7;
	--sh-text:       #1a1a1a;
	--sh-muted:      #6b7280;
	--sh-label:      #6b7280;
	--sh-border:     #e5e7eb;
	--sh-card-bg:    #ffffff;
	--sh-bg:         #f9fafb;
	--sh-pill-bg:    #ffffff;
	--sh-pill-border:#d1d5db;
	--sh-radius:     0px;       /* Square corners to match screenshot */
	--sh-shadow:     0 1px 4px rgba(0,0,0,.08);

	font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
	color: var(--sh-text);
	max-width: 1300px;
	margin: 0 auto;
	padding: 0 16px 48px;
	box-sizing: border-box;
}

.sh-container *, .sh-container *::before, .sh-container *::after {
	box-sizing: inherit;
}

/* ============================================================
   TABS
   ============================================================ */
.sh-tabs-wrap { margin-top: 8px; }

.sh-tabs-nav {
	display: flex;
	gap: 0;
	border-bottom: 2px solid var(--sh-border);
	margin-bottom: 32px;
}

.sh-tab-btn {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	background: transparent;
	color: var(--sh-muted);
	border: none;
	border-bottom: 3px solid transparent;
	margin-bottom: -2px;
	padding: 12px 28px;
	font-size: .95em;
	font-family: inherit;
	font-weight: 600;
	letter-spacing: .02em;
	cursor: pointer;
	transition: color .2s, border-color .2s;
}

.sh-tab-btn:hover { color: var(--sh-teal); }
.sh-tab-btn.active { color: var(--sh-teal); border-bottom-color: var(--sh-teal); }

.sh-arrow-icon { width: 20px; height: 20px; fill: currentColor; flex-shrink: 0; }

.sh-tab-panel { display: block; }
.sh-tab-panel[hidden] { display: none; }
.sh-mobile-route-sections { display: none; }

/* ============================================================
   STOPS GRID — 3 columns desktop, 2 tablet, 1 mobile
   ============================================================ */
.sh-stops-grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 20px;
}

.sh-route-section {
	margin-bottom: 38px;
}

.sh-route-section + .sh-route-section {
	border-top: 1px solid var(--sh-border);
	padding-top: 30px;
}

.sh-route-section-heading {
	align-items: baseline;
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
	justify-content: space-between;
	margin-bottom: 16px;
}

.sh-route-heading {
	color: var(--sh-text);
	font-size: 1.35em;
	font-weight: 800;
	line-height: 1.2;
	margin: 0;
}

.sh-route-count {
	background: var(--sh-teal-light);
	color: var(--sh-teal-dark);
	font-size: .76em;
	font-weight: 800;
	letter-spacing: .08em;
	padding: 4px 10px;
	text-transform: uppercase;
}

@media (max-width: 1000px) { .sh-stops-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width:  580px) {
	.sh-stops-grid { grid-template-columns: 1fr; }
	.sh-tabs-nav,
	.sh-tabs-wrap > .sh-tab-panel {
		display: none !important;
	}
	.sh-mobile-route-sections {
		display: block;
	}
}

/* ============================================================
   STOP CARD — matches screenshot exactly
   ============================================================ */
.sh-stop-card {
	background: var(--sh-card-bg);
	border: 1px solid var(--sh-border);
	border-radius: var(--sh-radius);   /* 0 = square corners */
	padding: 20px;
	box-shadow: var(--sh-shadow);
	display: flex;
	flex-direction: column;
	transition: box-shadow .2s;
}

.sh-stop-card:hover { box-shadow: 0 4px 16px rgba(0,0,0,.11); }

/* ── Card top row: label + pin icon ── */
.sh-card-top {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	margin-bottom: 6px;
}

.sh-card-labels {
	align-items: center;
	display: flex;
	flex-wrap: wrap;
	gap: 7px;
}

.sh-hub-label {
	font-size: .72em;
	font-weight: 700;
	letter-spacing: .12em;
	text-transform: uppercase;
	color: var(--sh-teal);
}

.sh-hub-label--pickup {
	color: #5c2d6e;
}

.sh-card-route-badge {
	background: var(--sh-teal-light);
	color: var(--sh-teal-dark);
	display: inline-flex;
	font-size: .68em;
	font-weight: 800;
	letter-spacing: .08em;
	line-height: 1;
	padding: 5px 8px;
	text-transform: uppercase;
}

.sh-pin-btn {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 36px;
	height: 36px;
	background: var(--sh-teal);
	color: #fff;
	border-radius: 50%;
	text-decoration: none;
	transition: background .2s;
	flex-shrink: 0;
}

.sh-pin-btn:hover { background: var(--sh-teal-dark); }
.sh-pin-btn svg { width: 18px; height: 18px; fill: currentColor; }

/* ── Stop name ── */
.sh-stop-name {
	font-size: 1.55em;
	font-weight: 700;
	margin: 0 0 16px;
	line-height: 1.2;
	color: var(--sh-text);
}

/* ── Section labels (DEPARTURES / NEARBY) ── */
.sh-section-label {
	display: flex;
	align-items: center;
	gap: 5px;
	font-size: .72em;
	font-weight: 700;
	letter-spacing: .1em;
	text-transform: uppercase;
	color: var(--sh-label);
	margin-bottom: 8px;
}

.sh-section-label svg { width: 14px; height: 14px; fill: var(--sh-label); flex-shrink: 0; }

/* ── Departure times ── */
.sh-departures { margin-bottom: 16px; }

.sh-times-row {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
}

.sh-time-pill {
	display: inline-block;
	padding: 6px 14px;
	border: 1px solid var(--sh-pill-border);
	border-radius: 4px;       /* slight rounding on pills only, matching screenshot */
	background: var(--sh-pill-bg);
	font-size: .88em;
	font-weight: 500;
	white-space: nowrap;
	color: var(--sh-text);
}

/* ── Nearby text ── */
.sh-nearby { margin-bottom: 12px; }

.sh-nearby-text {
	font-size: .9em;
	color: var(--sh-text);
	margin: 0;
	line-height: 1.5;
}

/* ── Divider ── */
.sh-divider {
	border: none;
	border-top: 1px solid var(--sh-border);
	margin: 14px 0;
}

/* ── Winery logos ── */
.sh-logos-row {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 18px;
	min-height: 60px;
	margin-bottom: 20px;
}

.sh-logo-wrap {
	display: inline-flex;
	align-items: center;
	text-decoration: none;
	transition: opacity .2s;
}

.sh-logo-wrap:hover { opacity: .75; }

.sh-winery-logo {
	max-height: 60px;
	max-width: 120px;
	width: auto;
	height: auto;
	object-fit: contain;
	display: block;
}

/* ── Open Location button — full-width, square, outlined ── */
.sh-open-location-btn {
	display: block;
	width: 100%;
	padding: 13px 16px;
	text-align: center;
	border: 1.5px solid var(--sh-border);
	border-radius: 0;           /* square, matching screenshot */
	background: #fff;
	color: var(--sh-text);
	font-size: .92em;
	font-weight: 500;
	font-family: inherit;
	text-decoration: none;
	transition: border-color .2s, background .2s, color .2s;
	margin-top: auto;
	letter-spacing: .01em;
}

.sh-open-location-btn:hover {
	border-color: var(--sh-teal);
	background: var(--sh-teal-light);
	color: var(--sh-teal-dark);
}

/* ── Route heading (standalone) ── */
.sh-route-heading--standalone {
	font-size: 1.5em;
	font-weight: 700;
	margin: 0 0 24px;
	color: var(--sh-text);
}

/* ── Empty state ── */
.sh-no-stops {
	color: var(--sh-muted);
	font-style: italic;
	padding: 20px 0;
}

/* ── Route description ─────────────────────────────────── */
.sh-route-description {
	font-size: .97em;
	color: #4b5563;
	line-height: 1.65;
	margin: 0 0 24px;
	max-width: 720px;
}

.sh-route-description--standalone {
	margin-bottom: 28px;
}

/* ============================================================
   TIMELINE SHORTCODE
   ============================================================ */
.sh-timeline-container {
	max-width: 980px;
}

.sh-day-timeline-intro {
	margin-bottom: 26px;
	text-align: center;
}

.sh-day-timeline-title {
	color: var(--sh-text);
	font-size: 1.5em;
	font-weight: 800;
	line-height: 1.2;
	margin: 0 0 8px;
}

.sh-day-timeline-subtitle {
	color: var(--sh-muted);
	font-size: .96em;
	line-height: 1.6;
	margin: 0 auto;
	max-width: 720px;
}

.sh-day-timeline-list {
	list-style: none;
	margin: 0;
	padding: 0;
	position: relative;
}

.sh-day-timeline-list::before {
	background: linear-gradient(180deg, var(--sh-teal), var(--sh-border));
	bottom: 0;
	content: "";
	left: 80px;
	position: absolute;
	top: 0;
	width: 1px;
}

.sh-day-timeline-item {
	display: grid;
	gap: 18px;
	grid-template-columns: 160px 1fr;
	margin: 0 0 12px;
	opacity: 0;
	outline: none;
	position: relative;
	transform: translateY(18px);
	transition: opacity .5s ease, transform .5s ease;
}

.sh-day-timeline-item.sh-is-visible,
.sh-day-timeline-item:focus-within,
.sh-day-timeline-item:hover {
	opacity: 1;
	transform: translateY(0);
}

.sh-day-timeline-line {
	align-items: center;
	display: flex;
	justify-content: flex-end;
	position: relative;
}

.sh-day-timeline-dot {
	background: var(--sh-teal);
	border: 4px solid #fff;
	box-shadow: 0 0 0 1px var(--sh-border);
	display: block;
	height: 18px;
	margin-right: 71px;
	width: 18px;
	z-index: 1;
}

.sh-day-timeline-item--pickup .sh-day-timeline-dot {
	background: #5c2d6e;
}

.sh-day-card {
	background: var(--sh-card-bg);
	border: 1px solid var(--sh-border);
	box-shadow: var(--sh-shadow);
	overflow: hidden;
	transition: box-shadow .25s ease, border-color .25s ease;
}

.sh-day-timeline-item:hover .sh-day-card,
.sh-day-timeline-item:focus-within .sh-day-card {
	border-color: var(--sh-teal);
	box-shadow: 0 8px 24px rgba(0,0,0,.12);
}

.sh-day-card-summary {
	align-items: center;
	display: grid;
	gap: 14px;
	grid-template-columns: 96px minmax(0, 1fr) auto;
	min-height: 58px;
	padding: 10px 14px;
}

.sh-day-card-time {
	color: var(--sh-teal-dark);
	font-size: 1.03em;
	font-weight: 900;
	white-space: nowrap;
}

.sh-day-card-stop {
	color: var(--sh-text);
	font-size: .98em;
	font-weight: 800;
	line-height: 1.2;
	margin: 5px 0 0;
}

.sh-day-card-index {
	color: var(--sh-muted);
	font-size: .72em;
	font-weight: 800;
	letter-spacing: .08em;
	text-transform: uppercase;
	white-space: nowrap;
}

.sh-day-card-details {
	display: grid;
	grid-template-rows: 0fr;
	opacity: 0;
	padding: 0 14px;
	transition: grid-template-rows .28s ease, opacity .2s ease, padding .28s ease;
}

.sh-day-card-details-inner {
	min-height: 0;
	overflow: hidden;
}

.sh-day-timeline-item:hover .sh-day-card-details,
.sh-day-timeline-item:focus-within .sh-day-card-details {
	grid-template-rows: 1fr;
	opacity: 1;
	padding: 0 14px 14px;
}

.sh-day-card-detail-grid {
	display: grid;
	gap: 16px;
	grid-template-columns: minmax(160px, .8fr) minmax(0, 1.2fr);
	padding-top: 4px;
}

.sh-day-detail-text {
	color: var(--sh-text);
	font-size: .9em;
	line-height: 1.5;
	margin: 0;
}

.sh-day-logos {
	align-items: center;
	border-top: 1px solid var(--sh-border);
	display: flex;
	flex-wrap: wrap;
	gap: 14px;
	margin: 14px 0;
	padding-top: 14px;
}

.sh-day-logo-wrap {
	align-items: center;
	display: inline-flex;
	min-height: 36px;
	text-decoration: none;
	transition: opacity .2s;
}

.sh-day-logo-wrap:hover {
	opacity: .75;
}

.sh-day-winery-logo {
	display: block;
	height: auto;
	max-height: 40px;
	max-width: 100px;
	object-fit: contain;
	width: auto;
}

.sh-timeline-route {
	margin-bottom: 42px;
}

.sh-timeline-route + .sh-timeline-route {
	border-top: 1px solid var(--sh-border);
	padding-top: 32px;
}

.sh-timeline-route-title {
	color: var(--sh-text);
	font-size: 1.45em;
	font-weight: 800;
	margin: 0 0 16px;
}

.sh-timeline-list {
	counter-reset: sh-timeline;
	list-style: none;
	margin: 0;
	padding: 0;
	position: relative;
}

.sh-timeline-list::before {
	background: var(--sh-border);
	bottom: 0;
	content: "";
	left: 19px;
	position: absolute;
	top: 0;
	width: 2px;
}

.sh-timeline-item {
	display: grid;
	gap: 18px;
	grid-template-columns: 40px 1fr;
	margin: 0 0 22px;
	position: relative;
}

.sh-timeline-item:last-child {
	margin-bottom: 0;
}

.sh-timeline-marker {
	align-items: center;
	background: var(--sh-teal);
	color: #fff;
	display: flex;
	font-size: .86em;
	font-weight: 800;
	height: 40px;
	justify-content: center;
	position: relative;
	width: 40px;
	z-index: 1;
}

.sh-timeline-item--pickup .sh-timeline-marker {
	background: #5c2d6e;
}

.sh-timeline-card {
	background: var(--sh-card-bg);
	border: 1px solid var(--sh-border);
	box-shadow: var(--sh-shadow);
	padding: 18px 20px;
}

.sh-timeline-card-head {
	align-items: flex-start;
	display: flex;
	gap: 14px;
	justify-content: space-between;
	margin-bottom: 12px;
}

.sh-timeline-stop-name {
	color: var(--sh-text);
	font-size: 1.18em;
	font-weight: 800;
	line-height: 1.25;
	margin: 8px 0 0;
}

.sh-timeline-step {
	color: var(--sh-muted);
	font-size: .75em;
	font-weight: 800;
	letter-spacing: .08em;
	text-transform: uppercase;
	white-space: nowrap;
}

.sh-timeline-times {
	margin-bottom: 12px;
}

.sh-timeline-nearby {
	color: var(--sh-text);
	font-size: .92em;
	line-height: 1.55;
	margin: 0 0 14px;
}

.sh-timeline-logos {
	align-items: center;
	border-top: 1px solid var(--sh-border);
	display: flex;
	flex-wrap: wrap;
	gap: 14px;
	margin: 14px 0;
	padding-top: 14px;
}

.sh-timeline-logo-wrap {
	align-items: center;
	display: inline-flex;
	min-height: 38px;
	text-decoration: none;
	transition: opacity .2s;
}

.sh-timeline-logo-wrap:hover {
	opacity: .75;
}

.sh-timeline-winery-logo {
	display: block;
	height: auto;
	max-height: 44px;
	max-width: 105px;
	object-fit: contain;
	width: auto;
}

.sh-timeline-map-link {
	color: var(--sh-teal-dark);
	font-size: .86em;
	font-weight: 800;
	text-decoration: none;
}

.sh-timeline-map-link:hover {
	text-decoration: underline;
}

@media (max-width: 580px) {
	.sh-route-section-heading,
	.sh-timeline-card-head {
		display: block;
	}

	.sh-day-timeline-list::before {
		left: 16px;
	}

	.sh-day-timeline-item {
		gap: 12px;
		grid-template-columns: 34px 1fr;
	}

	.sh-day-timeline-line {
		justify-content: center;
	}

	.sh-day-timeline-dot {
		height: 16px;
		margin-right: 0;
		width: 16px;
	}

	.sh-day-card-summary {
		grid-template-columns: 1fr;
		gap: 7px;
	}

	.sh-day-card-index {
		white-space: normal;
	}

	.sh-day-card-detail-grid {
		grid-template-columns: 1fr;
	}

	.sh-route-count,
	.sh-timeline-step {
		display: inline-flex;
		margin-top: 8px;
	}

	.sh-timeline-item {
		gap: 12px;
		grid-template-columns: 34px 1fr;
	}

	.sh-timeline-list::before {
		left: 16px;
	}

	.sh-timeline-marker {
		height: 34px;
		width: 34px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.sh-day-timeline-item,
	.sh-day-card,
	.sh-day-card-details {
		transition: none;
	}

	.sh-day-timeline-item {
		opacity: 1;
		transform: none;
	}
}
