/*
 * Deal Discovery — only loaded on the fr_deal archive (functions.php).
 *
 * Gate 6 V2 (DECISIONS.md D309; DESIGN_SYSTEM.md §18): the approved Phase 1
 * "Deal Discovery" screen of the Phase 1–4 reference — a midnight-navy page
 * with neon pink and cyan accents, the four-stage journey indicator, a white
 * one-row search bar and white horizontal Deal cards with the pink → purple
 * → cyan top border (the shared card, assets/css/deal-row.css). The homepage
 * keeps its own look (home.css); everything here is scoped to this page.
 *
 * Tokens only (assets/css/tokens.css): the glows are color-mix() of tokens.
 * Mobile-first; the search bar becomes one row from 1200px.
 */

.fr-is-hidden {
	display: none !important;
}

/* --- Page shell: midnight navy with neon pink, purple and cyan light ---
   D311: stronger than before, as in the approved board. From 1024px the page
   content sits in one softly illuminated frame (a thin cyan rim and an inner
   glow); no imitation browser or phone chrome. */
body.post-type-archive-fr_deal {
	background:
		radial-gradient(55% 520px at 100% 0, color-mix(in srgb, var(--fr-g5-neon-pink) 22%, transparent) 0%, transparent 70%),
		radial-gradient(45% 480px at 0 240px, color-mix(in srgb, var(--fr-g5-neon-cyan) 14%, transparent) 0%, transparent 70%),
		radial-gradient(60% 600px at 50% 100%, color-mix(in srgb, var(--fr-g5-neon-purple) 14%, transparent) 0%, transparent 70%),
		var(--fr-g5-night);
	background-repeat: no-repeat;
	color: var(--fr-g5-text);
}

@media (min-width: 1024px) {
	body.post-type-archive-fr_deal #fr-main {
		width: calc(100% - 2 * var(--fr-space-4));
		max-width: 1320px;
		margin: var(--fr-space-5) auto 0;
		padding-bottom: var(--fr-space-6);
		border: 1px solid color-mix(in srgb, var(--fr-g5-neon-cyan) 30%, transparent);
		border-radius: 28px;
		background: linear-gradient(180deg, color-mix(in srgb, var(--fr-g5-panel-raised) 55%, transparent) 0%, color-mix(in srgb, var(--fr-g5-night) 40%, transparent) 100%);
		box-shadow:
			0 0 0 1px color-mix(in srgb, var(--fr-g5-neon-purple) 18%, transparent),
			0 0 42px -6px color-mix(in srgb, var(--fr-g5-neon-cyan) 35%, transparent),
			inset 0 1px 24px color-mix(in srgb, var(--fr-g5-neon-cyan) 10%, transparent);
	}
}

/* Light focus ring on navy; navy again inside the white surfaces below. */
.fr-discovery-hero :focus-visible,
.fr-discovery :focus-visible {
	outline-color: var(--fr-focus-ring-inverse);
}

.fr-discovery-filters__primary :focus-visible,
.fr-discovery-filters__more[open] .fr-discovery-filters__more-grid :focus-visible,
.fr-discovery-filters__more[open] .fr-discovery-filters__themes :focus-visible,
.fr-discovery-filters__more[open] .fr-discovery-filters__apply:focus-visible,
.fr-discovery-filters__exact[open] .fr-discovery-filters__date-range :focus-visible,
.fr-active-filter :focus-visible,
.fr-nearby :focus-visible {
	outline-color: var(--fr-focus-ring);
}

.fr-discovery .fr-deal-row:focus-visible {
	outline: 3px solid var(--fr-focus-ring-inverse);
	outline-offset: 3px;
}

/* --- Hero: journey indicator, headline, origin line ---
   Gate 6 V2 correction (D310): tighter, as in the approved Phase 1 frames,
   so the search bar and the first cards sit high on a phone. */
.fr-discovery-hero {
	padding: var(--fr-space-4) 0 var(--fr-space-3);
	color: var(--fr-g5-text);
}

.fr-discovery-hero__headline {
	margin: var(--fr-space-4) 0 0;
	font-family: var(--fr-font-g5-display);
	font-size: 1.95rem;
	font-weight: 800;
	line-height: 1.12;
	letter-spacing: -0.01em;
	color: var(--fr-g5-text);
}

.fr-discovery-hero__subhead {
	margin: var(--fr-space-1) 0 0;
	font-size: 1.05rem;
	color: var(--fr-g5-text-muted);
	overflow-wrap: anywhere;
}

@media (min-width: 768px) {
	.fr-discovery-hero {
		padding: var(--fr-space-5) 0 var(--fr-space-4);
	}

	.fr-discovery-hero__headline {
		margin-top: var(--fr-space-5);
		font-size: 2.4rem;
		line-height: 1.15;
	}

	.fr-discovery-hero__subhead {
		font-size: 1.2rem;
	}
}

/* The four-stage journey indicator moved to assets/css/journey.css (D324),
   shared with the Deal journey pages and loaded before this file. */

/* --- Search form ---
   Gate 6 V2 correction (D310): the approved Phase 1 bar. One white rounded
   bar with hairline-separated fields and the pink "Search Deals" button. On
   phones, as in the reference: From | To on the first row, When | Cabin |
   Search Deals on the second (the button gets its own row below 375px).
   From 1024px: one row, each field's small label beside its value. Every
   real control and visible label stays; the hints, the launch-area shortcut
   and "More filters" follow the bar. */
.fr-discovery-filters {
	position: relative;
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	column-gap: var(--fr-space-5);
}

.fr-discovery-filters__primary,
.fr-discovery-filters__hints,
.fr-discovery-filters__more[open] {
	flex: 1 1 100%;
}

.fr-discovery-filters__primary {
	display: grid;
	grid-template-columns: repeat(20, minmax(0, 1fr));
	align-items: stretch;
	gap: 6px;
	padding: 6px;
	border-radius: var(--fr-radius-g5-card);
	background: var(--fr-surface);
	color: var(--fr-g5-ink);
	box-shadow:
		var(--fr-shadow-g5-glow),
		0 0 28px -6px color-mix(in srgb, var(--fr-g5-neon-cyan) 45%, transparent);
}

.fr-field {
	display: flex;
	flex-direction: column;
	gap: var(--fr-space-1);
	min-width: 0;
}

/* A field in the bar: decorative icon and small label, then the borderless
   select (its own 44px touch target). Revealed inputs span the field. */
.fr-discovery-filters__field {
	display: grid;
	grid-template-columns: 16px minmax(0, 1fr);
	grid-template-areas:
		"icon label"
		"control control";
	align-items: center;
	gap: 0 6px;
	padding: 5px 8px 0;
	min-width: 0;
	border: 1px solid var(--fr-g5-field-border);
	border-radius: var(--fr-radius-md);
}

.fr-discovery-filters__field > * {
	grid-column: 1 / -1;
}

.fr-discovery-filters__field:nth-child(1),
.fr-discovery-filters__field:nth-child(2) {
	grid-column: span 10;
}

.fr-discovery-filters__field:nth-child(3) {
	grid-column: span 7;
}

.fr-discovery-filters__field:nth-child(4) {
	grid-column: span 7;
}

.fr-discovery-filters__icon {
	grid-area: icon;
	display: inline-flex;
	color: var(--fr-g5-ink);
}

.fr-discovery-filters__icon .fr-icon {
	width: 16px;
	height: 16px;
}

.fr-discovery-filters__field > .fr-label {
	grid-area: label;
	overflow: hidden;
	font-size: 0.7rem;
	font-weight: 600;
	letter-spacing: 0;
	color: var(--fr-g5-ink-muted);
	white-space: nowrap;
	text-overflow: ellipsis;
}

.fr-select,
.fr-input {
	min-height: 44px;
	padding: 0 var(--fr-space-3);
	border-radius: var(--fr-radius-sm);
	border: 1.5px solid var(--fr-g5-field-border);
	background: var(--fr-surface);
	color: var(--fr-g5-ink);
	font-family: var(--fr-font-body);
	font-size: 0.95rem;
	width: 100%;
}

.fr-discovery-filters__field > .fr-select {
	grid-area: control;
	padding: 0;
	border-color: transparent;
	font-size: 0.88rem;
	font-weight: 600;
	text-overflow: ellipsis;
}

.fr-discovery-filters__date-range {
	display: flex;
	flex-wrap: wrap;
	gap: var(--fr-space-2);
	margin-top: var(--fr-space-2);
}

/* Each date input carries its own visible label and wraps onto its own line
   on a narrow phone instead of overflowing the bar (Phase 4B). */
.fr-discovery-filters__date {
	display: flex;
	flex-direction: column;
	gap: var(--fr-space-1);
	flex: 1 1 140px;
	min-width: 0;
}

.fr-discovery-filters__custom {
	display: flex;
	flex-direction: column;
	gap: var(--fr-space-1);
	margin-top: var(--fr-space-2);
}

/* Visible sub-labels and hints (Phase 4B): labels never disappear to save
   space; hints explain airport areas and "Anywhere" in plain words. */
.fr-field__sublabel {
	font-size: 0.8rem;
	font-weight: 600;
	color: var(--fr-g5-ink-muted);
}

.fr-field__hint {
	margin: var(--fr-space-1) 0 0;
	font-size: 0.75rem;
	line-height: 1.3;
	color: var(--fr-g5-ink-muted);
}

.fr-discovery-filters__submit {
	grid-column: span 6;
	align-self: stretch;
	min-width: 0;
	margin: 0;
	box-shadow: 0 4px 18px color-mix(in srgb, var(--fr-g5-neon-pink) 55%, transparent);
	padding: 0 var(--fr-space-1);
	font-size: 0.88rem;
	white-space: nowrap;
}

/* The arrow is decorative; on a phone it gives way to the button's words. */
@media (max-width: 479px) {
	.fr-discovery-filters__submit .fr-icon {
		display: none;
	}
}

/* Hints under the bar, on navy. */
.fr-discovery-filters__hints {
	display: flex;
	flex-wrap: wrap;
	gap: 0 var(--fr-space-5);
	margin-top: var(--fr-space-2);
}

.fr-discovery-filters__hints .fr-field__hint {
	margin: 0;
	font-size: 0.72rem;
}

.fr-discovery-filters__hints .fr-field__hint {
	color: var(--fr-g5-text-muted);
}

/* One-tap launch-market shortcut ("Flying from the Bratislava area?"). A
   normal link — never a pre-selected default. */
.fr-discovery-filters__shortcut {
	margin: 0;
	font-size: 0.8rem;
	font-weight: 600;
}

.fr-discovery-filters__shortcut a {
	display: inline-flex;
	align-items: center;
	min-height: 44px;
	color: var(--fr-g5-text);
	text-decoration: underline;
	text-decoration-color: var(--fr-g5-cyan);
	text-decoration-thickness: 2px;
	text-underline-offset: 3px;
}

.fr-discovery-filters__shortcut a:hover {
	color: var(--fr-g5-cyan);
}

.fr-discovery-filters__options {
	border: none;
	padding: 0;
	margin: 0;
	min-width: 0;
}

/* "More filters": a quiet disclosure on navy; its panel is a white card. */
.fr-discovery-filters__more summary {
	cursor: pointer;
	color: var(--fr-g5-text);
	list-style: none;
	display: inline-flex;
	align-items: center;
	gap: var(--fr-space-1);
	min-height: 44px;
}

.fr-discovery-filters__more summary::-webkit-details-marker {
	display: none;
}

.fr-discovery-filters__more summary::before {
	content: "+";
	font-size: 1.1rem;
	font-weight: 700;
	color: var(--fr-g5-cyan);
}

.fr-discovery-filters__more[open] summary::before {
	content: "\2212"; /* minus sign */
}

.fr-discovery-filters__more-grid,
.fr-discovery-filters__themes {
	color: var(--fr-g5-ink);
}

.fr-discovery-filters__more[open] {
	margin-top: var(--fr-space-3);
	padding: 0 var(--fr-space-4) var(--fr-space-4);
	border-radius: var(--fr-radius-g5-card);
	background: var(--fr-surface);
	color: var(--fr-g5-ink);
}

.fr-discovery-filters__more[open] summary {
	color: var(--fr-g5-ink);
}

.fr-discovery-filters__more[open] summary::before {
	color: var(--fr-g5-pink-action);
}

.fr-discovery-filters__more-grid {
	display: grid;
	grid-template-columns: 1fr;
	gap: var(--fr-space-4);
	margin-top: var(--fr-space-3);
}

.fr-discovery-filters__more-grid .fr-label,
.fr-discovery-filters__themes .fr-label {
	color: var(--fr-g5-ink-muted);
	text-transform: uppercase;
}

/* "Apply filters" — a second submit button at the bottom of the panel
   (ChatGPT review, item 7) so a mobile visitor who scrolled down to tick
   advanced checkboxes/chips never has to scroll back up to apply them. */
.fr-discovery-filters__apply {
	width: 100%;
	margin-top: var(--fr-space-4);
}

.fr-checkbox-field {
	display: flex;
	align-items: center;
	gap: var(--fr-space-2);
	min-height: 44px;
	font-size: 0.9rem;
}

.fr-checkbox-field input {
	width: 20px;
	height: 20px;
	flex-shrink: 0;
	accent-color: var(--fr-g5-pink-action);
}

.fr-discovery-filters__themes {
	border: none;
	padding: 0;
	margin: var(--fr-space-4) 0 0;
}

/* Filter/theme chips — DESIGN_SYSTEM.md §6: pill shape, selection shown
   with an explicit checkmark, never colour alone. */
.fr-chip-group {
	display: flex;
	flex-wrap: wrap;
	gap: var(--fr-space-2);
	margin-top: var(--fr-space-2);
}

.fr-chip {
	display: inline-flex;
	align-items: center;
	min-height: 40px;
	padding: 0 var(--fr-space-4);
	border-radius: var(--fr-radius-pill);
	border: 1.5px solid var(--fr-g5-field-border);
	background: var(--fr-surface);
	color: var(--fr-g5-ink);
	font-size: 0.85rem;
	font-weight: 600;
	cursor: pointer;
}

.fr-chip input {
	position: absolute;
	opacity: 0;
	width: 1px;
	height: 1px;
}

.fr-chip input:checked + span::before {
	content: "\2713 ";
}

.fr-chip:has(input:checked) {
	background: var(--fr-g5-ink);
	border-color: var(--fr-g5-ink);
	color: var(--fr-g5-text);
}

.fr-chip:hover {
	border-color: var(--fr-g5-pink);
}

.fr-chip input:focus-visible + span {
	outline: 2px solid var(--fr-focus-ring);
	outline-offset: 2px;
}

/* Small phones: When and Cabin share the second row; the button takes a
   row of its own. */
@media (max-width: 374px) {
	.fr-discovery-filters__field:nth-child(3),
	.fr-discovery-filters__field:nth-child(4) {
		grid-column: span 10;
	}

	.fr-discovery-filters__submit {
		grid-column: 1 / -1;
	}
}

@media (min-width: 768px) {
	.fr-discovery-filters__more-grid {
		grid-template-columns: repeat(2, 1fr);
	}
}

/* From 1200px: the approved single-row bar, each label beside its value.
   (D312: from 1024px the values were cut short; 768-1199px keeps the
   two-row bar.) */
@media (min-width: 1200px) {
	.fr-discovery-filters__primary {
		/* D319: Travel month carries the homepage's longer label, so it takes
		   a little of From / To's spare width (same total) to show its value. */
		grid-template-columns: minmax(0, 1.15fr) minmax(0, 1.15fr) minmax(0, 1.2fr) minmax(0, 1fr) auto;
		/* start: a field that grows (a revealed code or date input) keeps the
		   others' labels in line. */
		align-items: start;
		padding: 6px;
	}

	.fr-discovery-filters__field,
	.fr-discovery-filters__field:nth-child(n) {
		grid-column: auto;
		grid-template-columns: 20px auto minmax(0, 1fr);
		grid-template-areas: "icon label control";
		gap: 0 var(--fr-space-2);
		min-height: 52px;
		padding: 2px var(--fr-space-4);
	}

	.fr-discovery-filters__icon .fr-icon {
		width: 20px;
		height: 20px;
	}

	.fr-discovery-filters__field > .fr-label {
		font-size: 0.78rem;
	}

	.fr-discovery-filters__field > .fr-select {
		min-height: 44px;
		font-size: 1rem;
	}

	.fr-discovery-filters__submit {
		grid-column: auto;
		align-self: stretch;
		margin: 0;
		padding: 0 var(--fr-space-5);
		font-size: 1.05rem;
	}

	.fr-discovery-filters__submit .fr-icon {
		display: inline-block;
	}
}

/* --- Results ---
   Phase 4B: a factual results heading ("24 Deals from the Bratislava area
   to Anywhere"), the honest sort note, then the active-filter summary. */
.fr-discovery__heading {
	margin: var(--fr-space-5) 0 0;
	font-family: var(--fr-font-g5-display);
	font-size: 1.1rem;
	font-weight: 800;
	color: var(--fr-g5-text);
	overflow-wrap: anywhere;
}

.fr-discovery__sort-note {
	margin: 0;
	color: var(--fr-g5-text-muted);
}

/* "Newest first" and the "Show dates and flight details" switch (D310). */
.fr-discovery__toolbar {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 0 var(--fr-space-4);
	margin: 0 0 var(--fr-space-2);
}

.fr-details-toggle {
	display: flex;
	align-items: center;
	gap: var(--fr-space-2);
	min-height: 44px;
	margin: 0;
	font-size: 0.85rem;
	font-weight: 600;
	color: var(--fr-g5-text);
}

.fr-details-toggle input {
	width: 20px;
	height: 20px;
	margin: 0;
	accent-color: var(--fr-g5-pink-action);
}

.fr-details-toggle label {
	display: flex;
	align-items: center;
	min-height: 44px;
	cursor: pointer;
}

/* D312: the one page-level price meaning, shown only when every fare on the
   page shares it (otherwise each card keeps its own line). */
.fr-discovery__fares {
	margin: 0;
	color: var(--fr-g5-text-muted);
}

/* The cards' Phase 4B facts are hidden until the switch is on. A browser
   without :has() keeps them visible and hides the switch, so nothing is ever
   lost. */
@supports selector(:has(*)) {
	.fr-discovery-list .fr-deal-row__details {
		display: none;
	}

	.fr-discovery:has(#fr-show-details:checked) .fr-discovery-list .fr-deal-row__details {
		display: grid;
	}
}

@supports not selector(:has(*)) {
	.fr-details-toggle {
		display: none;
	}
}

@media (min-width: 768px) {
	.fr-discovery__heading {
		margin-top: var(--fr-space-6);
		font-size: 1.25rem;
	}

	.fr-discovery__toolbar {
		margin-bottom: var(--fr-space-3);
	}
}

.fr-discovery__ignored {
	margin: var(--fr-space-5) 0 0;
}

/* --- Active-filter summary (Phase 4B, D166) ---
   White pills on navy: plain text plus a separate removal link — each item
   states its own name ("Cabin: Business"), so nothing relies on colour. */
.fr-active-filters {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: var(--fr-space-2) var(--fr-space-3);
	margin: 0 0 var(--fr-space-4);
}

.fr-discovery__ignored + .fr-active-filters {
	margin-top: var(--fr-space-4);
}

.fr-discovery__results > .fr-active-filters:first-child {
	margin-top: var(--fr-space-5);
}

.fr-active-filters__title {
	margin: 0;
	color: var(--fr-g5-text-muted);
	text-transform: uppercase;
}

.fr-active-filters__list {
	display: flex;
	flex-wrap: wrap;
	gap: var(--fr-space-2);
	margin: 0;
	padding: 0;
	list-style: none;
	min-width: 0;
}

.fr-active-filter {
	display: inline-flex;
	align-items: center;
	max-width: 100%;
	min-height: 44px;
	padding-left: var(--fr-space-3);
	border-radius: var(--fr-radius-pill);
	border: 1.5px solid var(--fr-g5-cyan);
	background: var(--fr-surface);
	color: var(--fr-g5-ink);
	font-size: 0.85rem;
}

.fr-active-filter__text {
	min-width: 0;
	overflow-wrap: anywhere;
}

.fr-active-filter__label {
	font-weight: 600;
}

.fr-active-filter__remove {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
	min-width: 44px;
	min-height: 44px;
	border-radius: var(--fr-radius-pill);
	color: var(--fr-g5-ink);
	font-size: 1.1rem;
	font-weight: 700;
	text-decoration: none;
}

.fr-active-filter__remove:hover {
	background: var(--fr-g5-rating-unrated-bg);
}

.fr-active-filters__clear {
	flex-shrink: 0;
}

/* Secondary buttons on the navy page take the Gate 5 outlined look
   (white outline and text, cyan hover). */
.fr-discovery .fr-btn--secondary {
	border-color: var(--fr-g5-text);
	color: var(--fr-g5-text);
}

.fr-discovery .fr-btn--secondary:hover {
	border-color: var(--fr-g5-cyan);
	color: var(--fr-g5-cyan);
}

/* --- Results list: the shared white Deal row cards, one per row --- */
.fr-discovery-list {
	display: flex;
	flex-direction: column;
	gap: 10px;
}

@media (min-width: 768px) {
	.fr-discovery-list {
		gap: var(--fr-space-4);
	}
}

.fr-discovery-result {
	min-width: 0;
}

/* --- Smart Route callout — a separate link under its card, secondary to
   the card's own price, always naming the different departure airport.
   D311: quieter, a slim outlined row in muted text, so the cards lead; the
   airport, fare and saving stay in full. */
.fr-smart-route {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 2px var(--fr-space-3);
	min-height: 44px;
	margin: 4px var(--fr-space-3) 0;
	padding: 4px var(--fr-space-3);
	border-radius: var(--fr-radius-md);
	background: transparent;
	border: 1px solid color-mix(in srgb, var(--fr-g5-cyan) 35%, transparent);
	font-size: 0.78rem;
	text-decoration: none;
	color: var(--fr-g5-text-muted);
}

.fr-smart-route:hover {
	border-color: var(--fr-g5-cyan);
	color: var(--fr-g5-text);
}

.fr-smart-route__label {
	display: inline-block;
	font-weight: 700;
	color: var(--fr-g5-cyan);
	text-transform: uppercase;
	font-size: 0.62rem;
	letter-spacing: 0.06em;
}

.fr-smart-route__body {
	display: flex;
	flex: 1 1 auto;
	align-items: baseline;
	justify-content: space-between;
	gap: var(--fr-space-2);
	flex-wrap: wrap;
}

.fr-smart-route__price {
	font-weight: 700;
	font-size: 0.85rem;
	color: var(--fr-g5-text);
}

.fr-smart-route__savings {
	color: var(--fr-g5-green);
	font-weight: 600;
}

/* --- Empty / no-results state --- */
.fr-discovery-empty {
	position: relative;
	text-align: center;
	padding: var(--fr-space-7) var(--fr-space-4);
	max-width: 480px;
	margin: 0 auto;
	color: var(--fr-g5-text);
}

.fr-discovery-empty::before {
	content: "";
	display: block;
	width: 64px;
	height: 4px;
	margin: 0 auto var(--fr-space-5);
	border-radius: var(--fr-radius-pill);
	background: var(--fr-g5-gradient-cta);
}

.fr-discovery-empty .fr-heading-md {
	font-family: var(--fr-font-g5-display);
	font-weight: 800;
	color: var(--fr-g5-text);
}

.fr-discovery-empty .fr-body-sm {
	color: var(--fr-g5-text-muted);
}

.fr-discovery-empty img {
	margin: 0 auto var(--fr-space-4);
	width: 96px;
}

/* --- Pagination (Phase 4B, D170) — bounded, wraps at narrow widths,
   44px targets, current page shown by fill AND aria-current AND a "Page N
   of M" status line, never colour alone. --- */
.fr-discovery-pagination {
	margin-top: var(--fr-space-6);
	text-align: center;
}

.fr-discovery-pagination__list {
	display: flex;
	justify-content: center;
	flex-wrap: wrap;
	gap: var(--fr-space-2);
	margin: 0;
	padding: 0;
	list-style: none;
}

.fr-discovery-pagination a,
.fr-discovery-pagination .fr-is-current {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: var(--fr-space-1);
	min-width: 44px;
	min-height: 44px;
	padding: 0 var(--fr-space-3);
	border-radius: var(--fr-radius-md);
	border: 1.5px solid var(--fr-g5-line);
	text-decoration: none;
	color: var(--fr-g5-text);
	font-size: 0.9rem;
}

.fr-discovery-pagination a:hover {
	border-color: var(--fr-g5-cyan);
}

.fr-discovery-pagination .fr-is-current {
	background: var(--fr-g5-cyan);
	border-color: var(--fr-g5-cyan);
	color: var(--fr-g5-night);
	font-weight: 700;
}

.fr-discovery-pagination__gap {
	display: inline-flex;
	align-items: center;
	min-height: 44px;
	padding: 0 var(--fr-space-1);
	color: var(--fr-g5-text-muted);
}

.fr-discovery-pagination__status {
	margin: var(--fr-space-2) 0 0;
	color: var(--fr-g5-text-muted);
}

/* The Discovery Alert CTA: a raised navy panel with the hairline glow; its
   now-visible email label uses the inverse text token and takes its own row. */
.fr-alert-cta--discovery {
	margin-top: var(--fr-space-6);
	background: var(--fr-g5-panel-raised);
	box-shadow: var(--fr-shadow-g5-glow);
}

.fr-alert-cta__label {
	flex: 1 1 100%;
	color: var(--fr-text-inverse);
}

/* --- Loading state (progressive enhancement — assets/js/discovery.js) ---
   The form still submits and navigates normally with JS disabled; this
   class only ever gets added right before that navigation happens, as a
   perceived-performance affordance, never as the only way results update. */
.fr-discovery__results.is-discovery-loading {
	position: relative;
	opacity: 0.5;
	pointer-events: none;
}

/* --- S7-B nearby airports (AIRPORT_DATA.md §21, D303) ---
   A quiet card directly beneath the search card, in the same surface,
   border and radius language; existing tokens only (DESIGN_SYSTEM.md §14).
   Rendered only when there is something to show, so it never reserves
   space. Selection is the native checkbox tick plus the button text, never
   colour alone; rows are at least 44px tall. */
.fr-nearby {
	margin-top: var(--fr-space-4);
	padding: var(--fr-space-4);
	background: var(--fr-surface);
	border: 1px solid var(--fr-border);
	border-radius: var(--fr-radius-lg);
	box-shadow: var(--fr-shadow-sm);
	min-width: 0;
}

.fr-nearby__title {
	margin: 0;
}

.fr-nearby__hint {
	margin: var(--fr-space-1) 0 var(--fr-space-3);
	font-size: 0.8rem;
	line-height: 1.4;
	color: var(--fr-text-muted);
}

.fr-nearby__options {
	border: none;
	padding: 0;
	margin: 0;
	min-width: 0;
}

.fr-nearby__list {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	grid-template-columns: 1fr;
	gap: var(--fr-space-2);
}

.fr-nearby__choice {
	align-items: flex-start;
	padding: var(--fr-space-2) var(--fr-space-3);
	border: 1.5px solid var(--fr-border);
	border-radius: var(--fr-radius-sm);
	cursor: pointer;
}

.fr-nearby__choice:hover {
	border-color: var(--fr-coral);
}

.fr-nearby__choice:has(input:checked) {
	border-color: var(--fr-navy);
}

.fr-nearby__choice input {
	margin: 2px 0 0;
}

.fr-nearby__text {
	display: flex;
	flex-direction: column;
	gap: 2px;
	min-width: 0;
}

.fr-nearby__name {
	font-weight: 600;
	color: var(--fr-text);
	overflow-wrap: anywhere;
}

.fr-nearby__code {
	font-weight: 700;
	white-space: nowrap;
}

.fr-nearby__distance {
	font-size: 0.8rem;
	color: var(--fr-text-muted);
}

.fr-nearby__error {
	margin: var(--fr-space-2) 0 0;
	color: var(--fr-danger);
	font-size: 0.85rem;
	font-weight: 600;
}

.fr-nearby__error:empty {
	margin: 0;
}

.fr-nearby__submit {
	width: 100%;
	margin-top: var(--fr-space-3);
	padding-top: var(--fr-space-2);
	padding-bottom: var(--fr-space-2);
	text-align: center;
	overflow-wrap: anywhere;
}

@media (min-width: 768px) {
	.fr-nearby__list {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}

	.fr-nearby__submit {
		width: auto;
	}
}
