/*--------------------------------------------------------------
# Membership — Seat Map
# The three plans as cabins on one plane, nose to the left: VIP up
# front, Inner Circle in the middle, Points Partner at the back.
# Each cabin is a tab; the selected one fills its seats and the
# black panel beside it shows that plan's price, perks and join
# button. The panel drops under the plane below 1200px, and the
# plane turns nose-up on phones.
--------------------------------------------------------------*/

/* ── Section wrapper ──
   The same padding as .m-archive above and .m-faq below. */
.m-seats {
	--seat-line: #C9C3B8;
	--mono: ui-monospace, SFMono-Regular, Menlo, Consolas, 'Liberation Mono', monospace;

	padding: 60px 0 100px;
	overflow: hidden;
}

/* ── Container ── */
.m-seats__container {
	width: 100%;
	max-width: 1400px;
	margin: 0 auto;
	padding: 0 var(--tpp-container-padding);
}

/* ── Header ── */
.m-seats__header {
	text-align: center;
	margin-bottom: 48px;
}

.m-seats__heading {
	font-family: var(--tpp-font-heading);
	font-size: clamp(2rem, 4.5vw + 0.5rem, 3.5rem);
	font-weight: 600;
	line-height: 1.15;
	letter-spacing: -0.03em;
	color: var(--tpp-black);
	margin: 0;
}

/* "Pick a cabin to see its plan" (1 Dec 2026, Anish: show that the cabins
   can be clicked). A small chip under the heading with a pointing hand. */
.m-seats__hint {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	margin: 20px 0 0;
	padding: 8px 16px 8px 13px;
	border: 1px solid var(--tpp-border);
	border-radius: var(--tpp-radius-pill);
	background: var(--tpp-white);
	font-family: var(--tpp-font-body);
	font-size: 0.875rem;
	font-weight: 500;
	line-height: 1.3;
	color: var(--tpp-text);
}

.m-seats__hint svg {
	flex: none;
	width: 17px;
	height: 17px;
	color: var(--tpp-accent-ink);
}


/* ──────────────────────────────────────────────
   Scroll-reveal
   ────────────────────────────────────────────── */

.m-seats__header,
.m-seats__map {
	opacity: 0;
	transform: translateY(24px);
	transition:
		opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1),
		transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}

.m-seats.is-visible .m-seats__header,
.m-seats.is-visible .m-seats__map {
	opacity: 1;
	transform: translateY(0);
}

/* The plane follows the heading in */
.m-seats.is-visible .m-seats__map {
	transition-delay: 0.12s;
}


/* ──────────────────────────────────────────────
   Layout
   Plane and panel side by side; stacked below 1200px (see Responsive).
   ────────────────────────────────────────────── */

.m-seats__map {
	display: grid;
	grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr);
	gap: 40px;
	align-items: center;
	max-width: 1160px;
	margin: 0 auto;
}


/* ──────────────────────────────────────────────
   Plane
   ────────────────────────────────────────────── */

/* The fuselage. The left corners' radii make a nose 220px deep, and
   the first cabin starts inside its curve. */
.m-seats__fuselage {
	position: relative;
	display: flex;
	align-items: stretch;
	padding: 36px 40px 36px 120px;
	background: var(--tpp-off-white);
	border: 1px solid var(--tpp-border);
	border-radius: 220px 40px 40px 220px / 50% 40px 40px 50%;
}

/* Cockpit window */
.m-seats__fuselage::before {
	content: '';
	position: absolute;
	top: 50%;
	left: 44px;
	width: 30px;
	height: 44px;
	margin-top: -22px;
	border-radius: 30px 6px 6px 30px;
	background: linear-gradient(90deg, #CFD6DD, #E9EDF0);
	box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.08);
}

/* ── Cabins ──
   Each is a <button role="tab">. These rules carry two classes because
   style.css gives every button a grey border and fill, and recolours
   that border on :hover and :focus at a weight one class can't beat. */
.m-seats__fuselage .m-seats__cabin {
	position: relative;
	display: flex;
	flex: var(--grow) 1 0;
	flex-direction: column;
	align-items: center;
	gap: 14px;
	margin: 0;
	padding: 18px 14px;
	border: 0;
	border-radius: 18px;
	background: transparent;
	color: inherit;
	font: inherit;
	line-height: 1;
	cursor: pointer;
	-webkit-appearance: none;
	appearance: none;
	-webkit-tap-highlight-color: transparent;
	transition:
		background-color 0.3s ease,
		box-shadow 0.3s ease;
}

/* A dashed bulkhead between cabins. It's drawn on a pseudo-element
   rather than as the cabin's own border, so every cabin keeps its
   rounded corners on all four sides. The bulkheads either side of the
   selected cabin hide, so that one stands clear. */
.m-seats__fuselage .m-seats__cabin + .m-seats__cabin::before {
	content: '';
	position: absolute;
	top: 0;
	bottom: 0;
	left: 0;
	border-left: 1px dashed var(--tpp-border);
	transition: opacity 0.3s ease;
}

.m-seats__fuselage .m-seats__cabin[aria-selected="true"]::before,
.m-seats__fuselage .m-seats__cabin[aria-selected="true"] + .m-seats__cabin::before {
	opacity: 0;
}

@media (hover: hover) {
	.m-seats__fuselage .m-seats__cabin:hover {
		background: rgba(26, 26, 26, 0.03);
	}
}

.m-seats__fuselage .m-seats__cabin:focus-visible {
	outline: 2px solid var(--tpp-black);
	outline-offset: 2px;
}

.m-seats__fuselage .m-seats__cabin[aria-selected="true"] {
	background: var(--tpp-white);
	box-shadow: 0 10px 30px -14px rgba(0, 0, 0, 0.25);
}

/* Seat size and spacing per cabin, roomier towards the nose. --grow
   shares the length of the plane out between the cabins. */
.m-seats__cabin--vip {
	--grow: 1.1;
	--s: 30px;
	--gap: 8px;
}

.m-seats__cabin--inner-circle {
	--grow: 1.4;
	--s: 24px;
	--gap: 7px;
}

.m-seats__cabin--points-partner {
	--grow: 2;
	--s: 17px;
	--gap: 5px;
}

/* ── Seats ──
   One grid column per row of seats, nose to tail. --across (set inline
   from PHP) is how many places a row has, aisle included. The auto
   margins centre each block in its cabin, so the aisles line up down
   the plane and the three cabin names sit level. */
.m-seats__seats {
	display: grid;
	grid-auto-flow: column;
	grid-template-rows: repeat(var(--across), auto);
	gap: var(--gap);
	margin: auto 0;
}

.m-seats__seat {
	display: block;
	width: var(--s);
	height: var(--s);
	border: 1.5px solid var(--seat-line);
	border-radius: 30% 30% 22% 22%;
	background: var(--tpp-white);
	transition:
		background-color 0.3s ease,
		border-color 0.3s ease;
}

.m-seats__aisle {
	display: block;
	width: var(--s);
	height: calc(var(--s) * 0.6);
}

.m-seats__cabin[aria-selected="true"] .m-seats__seat {
	background: var(--tpp-accent);
	border-color: var(--tpp-accent-dark);
}

/* The front cabin fills black rather than orange */
.m-seats__cabin--vip[aria-selected="true"] .m-seats__seat {
	background: var(--tpp-black);
	border-color: var(--tpp-black);
}

/* Each cabin's name is drawn as a button (1 Dec 2026, Anish: show that the
   cabins can be clicked): a white pill with a hollow selection dot, like a
   radio button. The chosen cabin's pill turns black with an orange dot.
   Inter rather than the monospace stack it had, as for the theme's other
   small uppercase labels. */
.m-seats__cabin-name {
	display: inline-flex;
	align-items: center;
	gap: 7px;
	padding: 7px 13px 7px 10px;
	border: 1px solid var(--tpp-border);
	border-radius: var(--tpp-radius-pill);
	background: var(--tpp-white);
	font-family: var(--tpp-font-body);
	font-size: 0.6875rem;
	font-weight: 700;
	line-height: 1.3;
	letter-spacing: 0.08em;
	text-align: center;
	text-transform: uppercase;
	white-space: nowrap;
	color: var(--tpp-text);
	transition:
		background-color 0.3s ease,
		border-color 0.3s ease,
		color 0.3s ease;
}

.m-seats__cabin-name::before {
	content: '';
	flex: none;
	width: 8px;
	height: 8px;
	border: 1.5px solid var(--tpp-text-light);
	border-radius: 50%;
	transition:
		background-color 0.3s ease,
		border-color 0.3s ease;
}

@media (hover: hover) {
	.m-seats__fuselage .m-seats__cabin:hover .m-seats__cabin-name {
		border-color: var(--tpp-black);
		color: var(--tpp-black);
	}
}

.m-seats__cabin[aria-selected="true"] .m-seats__cabin-name {
	border-color: var(--tpp-black);
	background: var(--tpp-black);
	color: var(--tpp-white);
}

.m-seats__cabin[aria-selected="true"] .m-seats__cabin-name::before {
	border-color: var(--tpp-accent);
	background: var(--tpp-accent);
}


/* ──────────────────────────────────────────────
   Panel
   ────────────────────────────────────────────── */

/* The black card stays put and only its contents change. All three
   plans share one grid cell, so the card is sized by the longest and
   nothing below it moves when you switch. */
.m-seats__panel {
	display: grid;
	padding: 32px;
	border-radius: 22px;
	background: var(--tpp-black);
	color: var(--tpp-white);
}

/* The chosen plan fades in once the previous one has faded out. */
.m-seats__tier {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	grid-area: 1 / 1;
	min-width: 0;
	transition:
		opacity 0.25s ease 0.2s,
		visibility 0s linear 0.2s;
}

/* The other two keep their place in the grid (this overrides [hidden]'s
   display: none) but are invisible, which also takes them out of the
   tab order and the accessibility tree. */
.m-seats__tier[hidden] {
	display: flex;
	visibility: hidden;
	opacity: 0;
	transition:
		opacity 0.2s ease,
		visibility 0s linear 0.2s;
}

.m-seats__tier:focus-visible {
	outline: 2px solid var(--tpp-accent);
	outline-offset: 8px;
	border-radius: 6px;
}

.m-seats__class {
	font-family: var(--mono);
	font-size: 0.6875rem;
	font-weight: 700;
	line-height: 1.4;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: var(--tpp-accent);
}

.m-seats__tier-name {
	margin: 8px 0 4px;
	font-family: var(--tpp-font-heading);
	font-size: 1.75rem;
	font-weight: 600;
	line-height: 1.15;
	letter-spacing: -0.03em;
	color: var(--tpp-white);
}

.m-seats__price {
	display: flex;
	align-items: baseline;
	gap: 4px;
	margin: 0;
}

.m-seats__price-amount {
	font-family: var(--tpp-font-heading);
	font-size: 2.25rem;
	font-weight: 700;
	line-height: 1.2;
	letter-spacing: -0.03em;
	color: var(--tpp-white);
}

.m-seats__price-period {
	font-family: var(--tpp-font-body);
	font-size: 0.9375rem;
	font-weight: 500;
	color: rgba(255, 255, 255, 0.55);
}

.m-seats__perks {
	display: grid;
	gap: 10px;
	margin: 18px 0 26px;
	padding: 0;
	list-style: none;
}

.m-seats__perk {
	display: flex;
	gap: 10px;
	font-family: var(--tpp-font-body);
	font-size: 0.9375rem;
	line-height: 1.5;
	color: rgba(255, 255, 255, 0.85);
}

/* An orange tick in a circle, nudged down to sit on the first line */
.m-seats__check {
	display: inline-flex;
	flex: none;
	align-items: center;
	justify-content: center;
	width: 16px;
	height: 16px;
	margin-top: 3px;
	border-radius: 50%;
	background: var(--tpp-accent);
	color: var(--tpp-black);
}

/* ── Join button ──
   Orange on the black card. The colour is restated for :visited, :hover,
   :focus and :active because style.css sets those link states to
   color: inherit, which would turn the label white over the orange. */
.m-seats__cta,
.m-seats__cta:visited,
.m-seats__cta:hover,
.m-seats__cta:focus,
.m-seats__cta:active {
	color: var(--tpp-black);
}

/* The auto top margin pins it to the foot of the card, so it stays in
   one place as you switch plans. */
.m-seats__cta {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	margin-top: auto;
	padding: 14px 26px;
	border: 1px solid var(--tpp-accent);
	border-radius: var(--tpp-radius-pill);
	background: var(--tpp-accent);
	font-family: var(--tpp-font-body);
	font-size: 0.9375rem;
	font-weight: 600;
	line-height: 1;
	text-decoration: none;
	white-space: nowrap;
	transition:
		background-color var(--tpp-transition),
		border-color var(--tpp-transition);
}

.m-seats__cta:hover {
	background: var(--tpp-accent-dark);
	border-color: var(--tpp-accent-dark);
}

.m-seats__cta:focus-visible {
	outline: 2px solid var(--tpp-accent);
	outline-offset: 3px;
}

/* No checkout link for this plan yet (inc/membership-checkout.php): a
   <span> rather than a link, dashed so it reads as unfinished rather
   than broken, as on the hero's pricing cards. */
.m-seats__cta.m-seats__cta--pending,
.m-seats__cta.m-seats__cta--pending:hover {
	background: transparent;
	border: 1px dashed rgba(255, 255, 255, 0.3);
	color: rgba(255, 255, 255, 0.6);
	cursor: default;
}


/* ──────────────────────────────────────────────
   Responsive
   ────────────────────────────────────────────── */

/* Below 1200px — the panel moves under the plane.
   Side by side, the plane runs out of room for its seats at about
   1070px, so the two stack at a width that fits the plane. */
@media screen and (max-width: 1199px) {
	.m-seats__map {
		grid-template-columns: minmax(0, 1fr);
		gap: 24px;
		max-width: 720px;
	}
}

/* Tablet (768–1199px) — the stacked card is wide, so the perks sit
   beside the name and price instead of under them. */
@media screen and (min-width: 768px) and (max-width: 1199px) {
	.m-seats__tier,
	.m-seats__tier[hidden] {
		display: grid;
		grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
		grid-template-rows: auto auto auto 1fr;
		grid-template-areas:
			"class perks"
			"name  perks"
			"price perks"
			"cta   perks";
		column-gap: 32px;
		align-items: start;
	}

	.m-seats__class {
		grid-area: class;
	}

	.m-seats__tier-name {
		grid-area: name;
	}

	.m-seats__price {
		grid-area: price;
	}

	.m-seats__perks {
		grid-area: perks;
		align-self: center;
		margin: 0;
	}

	.m-seats__cta {
		grid-area: cta;
		align-self: end;
		justify-self: start;
		margin-top: 24px;
	}
}

/* Tablet and below (≤991px) */
@media screen and (max-width: 991px) {
	.m-seats {
		padding: 40px 0 64px;
	}
}

/* Mobile (≤767px) — nose up, the cabins stacked front to back */
@media screen and (max-width: 767px) {
	.m-seats {
		padding: 0 0 64px;
	}

	.m-seats__header {
		margin-bottom: 28px;
	}

	.m-seats__fuselage {
		flex-direction: column;
		padding: 84px 20px 24px;
		border-radius: 50% 50% 32px 32px / 90px 90px 32px 32px;
	}

	.m-seats__fuselage::before {
		top: 30px;
		left: 50%;
		width: 44px;
		height: 26px;
		margin: 0 0 0 -22px;
		border-radius: 30px 30px 6px 6px;
		background: linear-gradient(180deg, #CFD6DD, #E9EDF0);
	}

	.m-seats__fuselage .m-seats__cabin {
		flex: none;
		gap: 12px;
		padding: 16px 14px;
	}

	/* The bulkheads now run across the plane */
	.m-seats__fuselage .m-seats__cabin + .m-seats__cabin::before {
		top: 0;
		right: 0;
		bottom: auto;
		left: 0;
		border-top: 1px dashed var(--tpp-border);
		border-left: 0;
	}

	.m-seats__cabin--vip {
		--s: 26px;
		--gap: 7px;
	}

	.m-seats__cabin--inner-circle {
		--s: 20px;
		--gap: 6px;
	}

	.m-seats__cabin--points-partner {
		--s: 15px;
		--gap: 4px;
	}

	/* Rows of seats now run across the screen */
	.m-seats__seats {
		grid-auto-flow: row;
		grid-template-rows: none;
		grid-template-columns: repeat(var(--across), auto);
	}

	.m-seats__aisle {
		width: calc(var(--s) * 0.6);
		height: var(--s);
	}

	.m-seats__panel {
		padding: 28px 24px;
		border-radius: 18px;
	}

	.m-seats__tier-name {
		font-size: 1.5rem;
	}

	.m-seats__price-amount {
		font-size: 2rem;
	}

	/* Full width, for an easy tap */
	.m-seats__cta {
		width: 100%;
	}
}


/* ──────────────────────────────────────────────
   Reduced motion — no fades; plans swap at once
   ────────────────────────────────────────────── */

@media (prefers-reduced-motion: reduce) {

	.m-seats__header,
	.m-seats__map {
		opacity: 1;
		transform: none;
	}

	.m-seats__header,
	.m-seats__map,
	.m-seats__tier,
	.m-seats__tier[hidden],
	.m-seats__seat,
	.m-seats__cabin-name,
	.m-seats__cabin-name::before,
	.m-seats__fuselage .m-seats__cabin,
	.m-seats__fuselage .m-seats__cabin + .m-seats__cabin::before {
		transition: none;
	}
}
