/**
 * Shortlist page (template-wishlist.php, inc/trip-shortlist.php): saved
 * trips as cards, a side-by-side comparison and the enquiry form.
 */
:root {
	--wh-sl-primary: #791e30;
	--wh-sl-primary-dark: #712822;
	--wh-sl-accent: #eebc1d;
	--wh-sl-ink: #1c1917;
	--wh-sl-muted: #6b625d;
	--wh-sl-line: #e3ddd8;
	--wh-sl-surface: #ffffff;
	--wh-sl-surface-alt: #faf7f4;
	--wh-sl-radius: 4px;
	--wh-sl-font-head: "Miller Display", Georgia, "Times New Roman", serif;
	--wh-sl-font-body: "Merriweather Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

/* ---------------------------------------------------------------------
 * Save button
 * ------------------------------------------------------------------ */

.wh-sl-btn {
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
	margin: 0;
	padding: 0.6rem 1rem;
	border: 1px solid var(--wh-sl-line);
	border-radius: var(--wh-sl-radius);
	background: var(--wh-sl-surface);
	color: var(--wh-sl-ink);
	font-family: var(--wh-sl-font-body);
	font-size: 0.875rem;
	line-height: 1.2;
	cursor: pointer;
	transition: border-color 0.15s ease, color 0.15s ease, background-color 0.15s ease;
}

.wh-sl-btn:hover,
.wh-sl-btn:focus-visible {
	border-color: var(--wh-sl-primary);
	color: var(--wh-sl-primary);
}

.wh-sl-btn__icon {
	width: 18px;
	height: 18px;
	flex: 0 0 18px;
	fill: none;
	stroke: currentColor;
	stroke-width: 1.6;
	stroke-linejoin: round;
	transition: fill 0.15s ease;
}

.wh-sl-btn.active {
	border-color: var(--wh-sl-primary);
	color: var(--wh-sl-primary);
}

.wh-sl-btn.active .wh-sl-btn__icon {
	fill: var(--wh-sl-primary);
	stroke: var(--wh-sl-primary);
}

/* Icon-only variant, for the corner of a trip card. */

.wh-sl-btn--icon {
	padding: 0.5rem;
	border-radius: 50%;
	border-color: rgba(255, 255, 255, 0.7);
	background: rgba(255, 255, 255, 0.92);
	box-shadow: 0 1px 4px rgba(0, 0, 0, 0.18);
}

.wh-sl-btn--icon .wh-sl-btn__label {
	position: absolute;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
	border: 0;
}

/* Drop this class on the card wrapper to park the icon in the corner. */

.wh-sl-card-host {
	position: relative;
}

.wh-sl-card-host .wh-sl-btn--icon {
	position: absolute;
	top: 0.75rem;
	right: 0.75rem;
	z-index: 2;
}

/* ---------------------------------------------------------------------
 * Shortlist page
 * ------------------------------------------------------------------ */

.wh-sl-page {
	font-family: var(--wh-sl-font-body);
	color: var(--wh-sl-ink);
}

.wh-sl-loading {
	padding: 3rem 0;
	color: var(--wh-sl-muted);
	text-align: center;
}

.wh-sl-bar {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	padding: 0 0 1rem;
	margin-bottom: 1.5rem;
	border-bottom: 1px solid var(--wh-sl-line);
}

.wh-sl-bar__count {
	margin: 0;
	color: var(--wh-sl-muted);
	font-size: 0.9rem;
}

.wh-sl-bar__actions {
	display: flex;
	align-items: center;
	gap: 1rem;
}

.wh-sl-cta {
	display: inline-block;
	padding: 0.75rem 1.5rem;
	border-radius: var(--wh-sl-radius);
	background: var(--wh-sl-primary);
	color: #fff;
	font-weight: 700;
	font-size: 0.9rem;
	text-decoration: none;
	transition: background-color 0.15s ease;
}

.wh-sl-cta:hover,
.wh-sl-cta:focus-visible {
	background: var(--wh-sl-primary-dark);
	color: #fff;
}

.wh-sl-link {
	padding: 0;
	border: 0;
	background: none;
	color: var(--wh-sl-muted);
	font-family: inherit;
	font-size: 0.875rem;
	text-decoration: underline;
	cursor: pointer;
}

.wh-sl-link:hover {
	color: var(--wh-sl-primary);
}

/* Cards */

.wh-sl-cards {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
	gap: 1.5rem;
	margin-bottom: 3rem;
}

.wh-sl-card {
	display: flex;
	flex-direction: column;
	overflow: hidden;
	border: 1px solid var(--wh-sl-line);
	border-radius: var(--wh-sl-radius);
	background: var(--wh-sl-surface);
}

.wh-sl-card__media {
	display: block;
	aspect-ratio: 3 / 2;
	overflow: hidden;
	background: var(--wh-sl-surface-alt);
}

.wh-sl-card__media img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.wh-sl-card__body {
	display: flex;
	flex: 1;
	flex-direction: column;
	gap: 0.6rem;
	padding: 1.25rem;
}

.wh-sl-card__meta {
	margin: 0;
	color: var(--wh-sl-muted);
	font-size: 0.75rem;
	letter-spacing: 0.06em;
	text-transform: uppercase;
}

.wh-sl-card__title {
	margin: 0;
	font-family: var(--wh-sl-font-head);
	font-size: 1.2rem;
	line-height: 1.25;
}

.wh-sl-card__title a {
	color: inherit;
	text-decoration: none;
}

.wh-sl-card__title a:hover {
	color: var(--wh-sl-primary);
}

.wh-sl-card__excerpt {
	margin: 0;
	color: var(--wh-sl-muted);
	font-size: 0.875rem;
	line-height: 1.5;
}

.wh-sl-card__footer {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	margin-top: auto;
	padding-top: 0.75rem;
	border-top: 1px solid var(--wh-sl-line);
}

.wh-sl-card__price {
	font-weight: 700;
	font-size: 0.95rem;
}

.wh-sl-card__remove {
	padding: 0;
	border: 0;
	background: none;
	color: var(--wh-sl-muted);
	font-family: inherit;
	font-size: 0.8rem;
	text-decoration: underline;
	cursor: pointer;
}

.wh-sl-card__remove:hover {
	color: var(--wh-sl-primary);
}

/* Comparison table */

.wh-sl-compare {
	margin-bottom: 3rem;
}

.wh-sl-compare__title {
	margin: 0 0 1rem;
	font-family: var(--wh-sl-font-head);
	font-size: 1.5rem;
}

.wh-sl-compare__scroll {
	overflow-x: auto;
	-webkit-overflow-scrolling: touch;
}

.wh-sl-table {
	width: 100%;
	border-collapse: collapse;
	font-size: 0.9rem;
}

.wh-sl-table th,
.wh-sl-table td {
	padding: 0.85rem 1rem;
	border-bottom: 1px solid var(--wh-sl-line);
	text-align: left;
	vertical-align: top;
}

.wh-sl-table thead th {
	border-bottom: 2px solid var(--wh-sl-primary);
	font-family: var(--wh-sl-font-head);
	font-size: 1rem;
	font-weight: 700;
}

.wh-sl-table thead a {
	color: var(--wh-sl-ink);
	text-decoration: none;
}

.wh-sl-table thead a:hover {
	color: var(--wh-sl-primary);
}

.wh-sl-table__label {
	width: 10rem;
	color: var(--wh-sl-muted);
	font-weight: 400;
	font-size: 0.75rem;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	white-space: nowrap;
}

.wh-sl-table tbody tr:nth-child(odd) {
	background: var(--wh-sl-surface-alt);
}

/* The first column stays put while the trips scroll sideways on mobile. */

@media (max-width: 782px) {
	.wh-sl-table__corner,
	.wh-sl-table__label {
		position: sticky;
		left: 0;
		z-index: 1;
		width: 7.5rem;
		background: var(--wh-sl-surface);
	}

	.wh-sl-table tbody tr:nth-child(odd) .wh-sl-table__label {
		background: var(--wh-sl-surface-alt);
	}

	.wh-sl-table__trip {
		min-width: 12rem;
	}
}

/* Footer block + empty state */

.wh-sl-foot {
	padding: 2rem;
	border-radius: var(--wh-sl-radius);
	background: var(--wh-sl-surface-alt);
	text-align: center;
}

.wh-sl-foot p {
	max-width: 36rem;
	margin: 0 auto 1.25rem;
	color: var(--wh-sl-muted);
	font-size: 0.95rem;
	line-height: 1.6;
}

.wh-sl-empty {
	padding: 2rem 0 3rem;
	text-align: center;
}

.wh-sl-empty__title {
	margin: 0 0 0.75rem;
	font-family: var(--wh-sl-font-head);
	font-size: 1.75rem;
}

.wh-sl-empty__text {
	max-width: 34rem;
	margin: 0 auto 2.5rem;
	color: var(--wh-sl-muted);
	line-height: 1.6;
}

.wh-sl-empty__sub {
	margin: 0 0 1.5rem;
	font-size: 0.8rem;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--wh-sl-muted);
}

.wh-sl-cards--suggest {
	text-align: left;
}

/* ---------------------------------------------------------------------
 * Print — the shortlist doubles as a leave-behind
 * ------------------------------------------------------------------ */

@media print {
	.wh-sl-bar__actions,
	.wh-sl-foot,
	.wh-sl-card__remove,
	.wh-sl-btn {
		display: none !important;
	}

	.wh-sl-cards {
		grid-template-columns: repeat(2, 1fr);
	}

	.wh-sl-card,
	.wh-sl-compare {
		break-inside: avoid;
	}

	.wh-sl-compare__scroll {
		overflow: visible;
	}
}

/* ---------------------------------------------------------------------
 * Motion preference
 * ------------------------------------------------------------------ */

@media (prefers-reduced-motion: reduce) {
	.wh-sl-btn,
	.wh-sl-btn__icon,
	.wh-sl-cta {
		transition: none;
	}
}

/* The enquiry form below the shortlist */
.wh-sl-enquiry {
	margin-top: 48px;
}

@media print {
	.wh-sl-enquiry {
		display: none;
	}
}
