/* wwh/attraction-archive — the /attractions/ list, map first (option 4 of
   ATTRACTIONS_MOCK.pdf, with option 5's picker under the map). Loaded after
   accommodation-archive/style.css; this file only stacks that layout (map,
   picker, cards in a grid, Plans) and adds the tiles and coloured pins. */

/* ---------- Map across the top ---------- */
.wwh-accom-archive--stacked .wwh-accom-archive__mapcol {
	position: relative; /* not sticky as on Accommodation; holds the skip link */
	display: block;
	margin-bottom: clamp(1.75rem, 3.5vw, 2.75rem);
}

/* Skip the map: every pin is a Tab stop. Hidden until focused, then over the
   map's top-left corner (WCAG 2.4.1). */
.wwh-attr-skipmap {
	position: absolute;
	top: 0.75rem;
	left: 0.75rem;
	z-index: 5;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip-path: inset(50%);
	white-space: nowrap;
}

.wwh-attr-skipmap:focus,
.wwh-attr-skipmap:focus-visible {
	width: auto;
	height: auto;
	overflow: visible;
	clip-path: none;
	padding: 0.6rem 1rem;
	background: #fff;
	color: var(--wwh-accom-dark, #18140F);
	font-weight: 600;
	text-decoration: underline;
	border-radius: 6px;
	box-shadow: 0 2px 6px rgba(0, 0, 0, 0.28);
	outline: 3px solid var(--wwh-accom-dark, #18140F);
	outline-offset: 2px;
}

.wwh-attr-picker:focus {
	outline: none;
}

.wwh-accom-archive--stacked .wwh-accommodation-map__canvas {
	height: 62vh;
	min-height: 420px;
	max-height: 640px;
}

/* Pins: a dot in the attraction's type colour. */
.wwh-accom-pin.wwh-accom-pin--colour {
	--wwh-pin: var(--wwh-accom-dark, #18140F);
	width: 22px;
	min-width: 22px;
	height: 22px;
	min-height: 22px;
	padding: 0;
	background: var(--wwh-pin);
	border: 3px solid #fff;
}

.wwh-accom-pin.wwh-accom-pin--colour::after {
	bottom: -9px;
	border-top-color: #fff;
}

.wwh-accom-pin.wwh-accom-pin--colour:hover,
.maplibregl-marker.is-active .wwh-accom-pin.wwh-accom-pin--colour,
.wwh-accom-pin.wwh-accom-pin--colour.is-active {
	background: var(--wwh-pin);
	box-shadow: 0 0 0 3px var(--wwh-accom-dark, #18140F), 0 2px 6px rgba(0, 0, 0, 0.28);
	transform: scale(1.2);
}

/* ---------- What do you feel like today? ---------- */
.wwh-attr-picker {
	margin-bottom: 1.5rem;
}

.wwh-attr-picker__title {
	margin: 0 0 1rem;
	font-family: var(--wwh-accom-display);
	font-size: clamp(1.75rem, 3vw, 2.375rem);
	font-style: italic;
	font-weight: 400;
	line-height: 1.1;
}

.wwh-attr-picker__tiles {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
	gap: 0.75rem;
}

.wwh-attr-tile {
	--wwh-attr-tile: var(--wwh-accom-dark);
	appearance: none;
	position: relative;
	display: flex;
	flex-direction: column;
	justify-content: flex-end;
	align-items: flex-start;
	min-height: 150px;
	padding: 0.75rem 0.85rem;
	border: 0;
	border-radius: 12px;
	overflow: hidden;
	background: var(--wwh-accom-dark);
	color: #fff;
	text-align: left;
	cursor: pointer;
	isolation: isolate;
}

.wwh-attr-tile__img {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	z-index: -2;
	transition: transform 0.3s ease;
}

/* Darken the bottom of the photo so the white label always reads (WCAG 1.4.3). */
.wwh-attr-tile::before {
	content: "";
	position: absolute;
	inset: 0;
	z-index: -1;
	background: linear-gradient(to bottom, rgba(24, 20, 15, 0.05) 20%, rgba(24, 20, 15, 0.88) 100%);
}

.wwh-attr-tile--plain::before,
.wwh-attr-tile--all::before {
	background: none;
}

.wwh-attr-tile--plain {
	background: var(--wwh-attr-tile);
}

.wwh-attr-tile--all {
	background: var(--wp--preset--color--warm-cream-2, #E9E4DB);
	color: var(--wwh-accom-ink);
}

.wwh-attr-tile:hover .wwh-attr-tile__img {
	transform: scale(1.05);
}

.wwh-attr-tile.is-active {
	outline: 3px solid var(--wwh-accom-gold);
	outline-offset: 3px;
}

.wwh-attr-tile:focus-visible {
	outline: 3px solid var(--wwh-accom-ink);
	outline-offset: 3px;
}

.wwh-attr-tile__name {
	display: flex;
	align-items: center;
	gap: 0.4rem;
	font-family: var(--wwh-accom-display);
	font-size: 1.25rem;
	line-height: 1.15;
}

.wwh-attr-tile__dot {
	flex: none;
	width: 10px;
	height: 10px;
	border-radius: 50%;
	background: var(--wwh-attr-tile);
	box-shadow: 0 0 0 2px #fff;
}

.wwh-attr-tile__n {
	margin-top: 0.15rem;
	font-family: var(--wwh-accom-ui);
	font-size: 0.75rem;
	letter-spacing: 0.04em;
}

.wwh-attr-picker__time {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.6rem 1rem;
	margin-top: 1.25rem;
}

.wwh-attr-picker__label {
	margin: 0;
	font-family: var(--wwh-accom-ui);
	font-size: 0.875rem;
	font-weight: 600;
}

/* ---------- Count + sort, then the cards as a grid ---------- */
.wwh-accom-archive--stacked .wwh-accom-archive__bar {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 0.6rem;
}

.wwh-accom-archive--stacked .wwh-accom-archive__count {
	margin: 0;
}

.wwh-accom-archive--stacked .wwh-accom-archive__cards {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
	gap: 1.25rem;
}

.wwh-accom-archive--stacked .wwh-accom-card {
	grid-template-columns: minmax(0, 1fr);
	grid-template-rows: auto 1fr;
	gap: 0.75rem;
	align-content: start;
}

.wwh-accom-archive--stacked .wwh-accom-card__body {
	padding: 0 0.4rem 0.4rem;
}

.wwh-accom-archive--stacked .wwh-accom-card__name {
	font-size: 1.3125rem;
}

/* The map button sits on the photo's top-right corner, as on a phone. */
.wwh-accom-archive--stacked .wwh-accom-card__locate {
	top: 20px;
	right: 20px;
	transform: none;
	box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
}

.wwh-accom-archive--stacked .wwh-accom-card:has(.wwh-accom-card__locate) .wwh-accom-card__body {
	padding-right: 0.4rem;
}

.wwh-attr-card__hours::before {
	content: "◷ ";
}

/* ---------- Plans ---------- */
.wwh-attr-plans {
	margin-top: clamp(2.5rem, 5vw, 4rem);
	padding-top: clamp(1.5rem, 3vw, 2rem);
	border-top: 1px solid var(--wwh-accom-line);
}

.wwh-attr-plans__head {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	justify-content: space-between;
	gap: 0.5rem 1rem;
	margin-bottom: 1rem;
}

.wwh-attr-plans__title {
	margin: 0;
	font-family: var(--wwh-accom-display);
	font-size: clamp(1.5rem, 2.6vw, 2rem);
	font-weight: 400;
}

.wwh-attr-plans__all {
	font-family: var(--wwh-accom-ui);
	font-size: 0.875rem;
	font-weight: 600;
	color: var(--wwh-accom-ink);
}

/* ---------- Phones ---------- */
@media (max-width: 899px) {
	/* The accommodation stylesheet hides the map behind a Map button; here
	   it stays on top, a little shorter so the tiles start on screen. */
	.wwh-accom-archive--stacked .wwh-accom-archive__mapcol {
		display: block;
	}

	.wwh-accom-archive--stacked .wwh-accommodation-map__canvas {
		height: 48svh;
		min-height: 300px;
	}

	.wwh-accom-archive--stacked.is-map-view .wwh-accom-archive__list {
		display: block;
	}

	.wwh-attr-picker__tiles {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 0.6rem;
	}

	.wwh-attr-tile {
		min-height: 110px;
	}

	.wwh-attr-tile__name {
		font-size: 1.0625rem;
	}

	.wwh-attr-picker__time .wwh-accom-archive__chips {
		flex-wrap: wrap;
	}
}

@media (max-width: 599px) {
	/* Three chips side by side, the distance under each label. */
	.wwh-attr-picker__time .wwh-accom-archive__chips {
		display: grid;
		grid-template-columns: repeat(3, minmax(0, 1fr));
		width: 100%;
	}

	.wwh-attr-picker__time .wwh-accom-archive__chip {
		flex-direction: column;
		justify-content: center;
		padding: 0.4rem 0.5rem;
		border-radius: 12px;
		text-align: center;
	}
}
