/**
 * Aviatrix Flight Status: homepage card and flight board.
 *
 * Card values come from the ILM homepage design (Figma nodes 509:13808
 * desktop, 509:16405 mobile). The board has no Figma frame. It is set like a
 * timetable: no box, the time leading every row, the city as the main text,
 * and colour kept for the flights that need attention. A theme can restyle
 * both by setting the custom properties below. The typeface is inherited
 * from the theme.
 *
 * The layout follows the width of the space the card or board is given, not
 * the width of the screen, so it reflows the same in a narrow column, on a
 * phone, or zoomed to 200%.
 *
 * Deliberate changes from the design, for WCAG 2.1 AA:
 * - "Delayed" pills use navy text on salmon (5.8:1). White would be 2.5:1.
 * - Each flight says "To" or "From", and gives its time, because the status
 *   word alone does not say which flight it is about.
 */

.avx-flights {
	--avx-flights-ink: #002855;
	--avx-flights-surface: #fefefe;
	--avx-flights-muted: #44546a;
	--avx-flights-rule: rgba(0, 40, 85, 0.4);
	--avx-flights-rule-soft: rgba(0, 40, 85, 0.16);
	--avx-flights-stripe: #f1f4f8;
	--avx-flights-hover: #f8fafc;
	--avx-flights-field-bg: #ffffff;
	--avx-flights-button-bg: #002855;
	--avx-flights-button-bg-hover: #0b3a70;
	--avx-flights-button-ink: #ffffff;
	--avx-flights-good-bg: #9cdbd9;
	--avx-flights-good-soft: #dff3f2;
	--avx-flights-good-ink: #002855;
	--avx-flights-warn-bg: #fa8072;
	--avx-flights-warn-ink: #002855;
	--avx-flights-alert-bg: #002855;
	--avx-flights-alert-ink: #ffffff;
	--avx-flights-done-bg: #e6ebf1;
	--avx-flights-done-ink: #002855;
	--avx-flights-notice-bg: #e6ebf1;
	--avx-flights-notice-ink: #002855;
	--avx-flights-focus: #002855;
	--avx-flights-ghost: #e9edf2;
	--avx-flights-radius: 8px;
	--avx-flights-shadow: 0 0 12.5px rgba(0, 0, 0, 0.15);

	container-type: inline-size;
	box-sizing: border-box;
	/* A container that sizes its contents cannot take its width from them, so it fills the space it is given. */
	width: 100%;
	border-radius: var(--avx-flights-radius);
	background: var(--avx-flights-surface);
	color: var(--avx-flights-ink);
	box-shadow: var(--avx-flights-shadow);
	/* Text is Medium (500) at the least; headings, times and pills are heavier. */
	font-weight: 500;
	text-align: left;
}

.avx-flights *,
.avx-flights *::before,
.avx-flights *::after {
	box-sizing: border-box;
}

.avx-flights [hidden] {
	display: none !important;
}

.avx-flights ::selection {
	background: var(--avx-flights-good-bg);
	color: var(--avx-flights-ink);
}

.avx-flights__inner {
	display: flex;
	flex-direction: column;
	gap: 1.5rem;
	padding: 2rem 1.5rem;
}

/*
 * The card fills whatever height its place on the page gives it (a row of
 * cards stretched to match, for example). Spare height goes above the link
 * at the bottom, never under the card.
 */
.avx-flights-card {
	display: flex;
	flex-direction: column;
	height: 100%;
}

.avx-flights-card .avx-flights__inner,
.avx-flights-card .avx-flights__now {
	flex: 1 1 auto;
}

/*
 * The phone design, 342 by 596: 32 above and below, 24 at the sides; heading
 * 34, 8, search field 50, 8, button 45, 24, "Happening now" 21, 12, three
 * flights of 72 with 16 either side of each rule, 32, link 18.
 */
.avx-flights-card .avx-flights__inner {
	gap: 0.5rem;
}

.avx-flights-card .avx-flights__heading {
	line-height: 1.4167;
}

.avx-flights-card .avx-flights__now {
	margin-top: 1rem;
}

.avx-flights-card .avx-flights__foot {
	margin-top: auto;
	padding-top: 1.25rem;
}

.avx-flights-card .avx-flights__all {
	margin-top: 0;
	line-height: 1.125;
}

.avx-flights-card .avx-flights__item:last-child {
	padding-bottom: 0;
}

/* The heading, with the "sample flights" label beside it where there is room. */
.avx-flights__head {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 0.375rem 1rem;
}

.avx-flights__tag {
	margin: 0;
	color: var(--avx-flights-muted);
	font-size: 0.875rem;
	font-weight: 600;
	line-height: 1.2857;
}

/* Visible to screen readers only. */
.avx-flights__sr {
	position: absolute;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	clip-path: inset(50%);
	white-space: nowrap;
	border: 0;
}

.avx-flights__heading {
	margin: 0;
	color: inherit;
	font-size: 1.5rem;
	font-weight: 600;
	line-height: 1.3334;
}

.avx-flights__subheading {
	margin: 0;
	color: inherit;
	font-size: 1rem;
	font-weight: 600;
	line-height: 1.3125;
}

/* ---- Search (card) ---- */

.avx-flights__search {
	margin: 0;
}

.avx-flights__searchbox {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 0.5rem;
}

.avx-flights__input {
	width: 100%;
	min-height: 3.125rem;
	margin: 0;
	padding: 0.625rem 1rem;
	border: 1px solid var(--avx-flights-ink);
	border-radius: 1.5625rem;
	background-color: var(--avx-flights-field-bg);
	color: var(--avx-flights-ink);
	font: inherit;
	font-size: 1rem;
	line-height: 1.375;
	box-shadow: none;
	caret-color: var(--avx-flights-ink);
	-webkit-appearance: none;
	appearance: none;
}

.avx-flights__input::placeholder {
	color: var(--avx-flights-ink);
	opacity: 1;
}

.avx-flights__input:placeholder-shown {
	text-overflow: ellipsis;
}

/* Safari adds its own search decorations and clipping. */
.avx-flights__input::-webkit-search-decoration {
	-webkit-appearance: none;
}

/* The browser's own "clear" cross, redrawn in the board's ink. */
.avx-flights__input::-webkit-search-cancel-button {
	-webkit-appearance: none;
	width: 1rem;
	height: 1rem;
	margin-left: 0.5rem;
	background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3.5 3.5l9 9m0-9l-9 9' fill='none' stroke='%23002855' stroke-width='1.75' stroke-linecap='round'/%3E%3C/svg%3E") center / contain no-repeat;
	cursor: pointer;
}

.avx-flights__button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 8.25rem;
	min-height: 2.8125rem;
	margin: 0;
	padding: 0.625rem 1.5rem;
	border: 1px solid transparent;
	border-radius: 2.0625rem;
	background: var(--avx-flights-button-bg);
	color: var(--avx-flights-button-ink);
	font: inherit;
	font-size: 1rem;
	font-weight: 800;
	line-height: 1.2;
	text-decoration: none;
	cursor: pointer;
}

.avx-flights__button:hover,
.avx-flights__button:focus {
	background: var(--avx-flights-button-bg-hover);
	color: var(--avx-flights-button-ink);
}

/*
 * On the home card the Search button sits inside the right end of the field at
 * every width, as on desktop (Kyle, 2026-11-17), not on its own line under the
 * field as in the phone mockup. The script shortens the field's hint when the
 * field is too narrow to show it whole. Wider cards set their own sizes below.
 */
.avx-flights-card .avx-flights__searchbox {
	position: relative;
	display: block;
}

.avx-flights-card .avx-flights__input {
	padding-right: 6.25rem;
}

.avx-flights-card .avx-flights__button {
	position: absolute;
	top: 0;
	right: 0;
	height: 100%;
	min-width: 5.75rem;
	padding: 0.5rem 1rem;
}

.avx-flights__button--quiet {
	border-color: var(--avx-flights-ink);
	background: transparent;
	color: var(--avx-flights-ink);
}

.avx-flights__button--quiet:hover,
.avx-flights__button--quiet:focus {
	background: var(--avx-flights-done-bg);
	color: var(--avx-flights-ink);
}

/*
 * Keyboard focus: one ring, 2px, and never two edges. A button or a link
 * takes it 2px off. A control with a border of its own (the search field, the
 * Arrivals / Departures switch) takes it on its edge, so the border and the
 * ring read as one thicker edge.
 */
.avx-flights__input:focus-visible,
.avx-flights__button:focus-visible,
.avx-flights__all:focus-visible,
.avx-flights__pause:focus-visible,
.avx-flights__airline:focus-visible {
	outline: 2px solid var(--avx-flights-focus);
	outline-offset: 2px;
}

.avx-flights__input:focus-visible {
	outline-offset: 0;
}

/* This link's underline hangs just below its box, so its ring stands further off and stays clear of it. */
.avx-flights__all:focus-visible {
	outline-offset: 4px;
}

/* ---- Happening now (card) ---- */

.avx-flights__now {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 0.75rem;
}

.avx-flights__list {
	width: 100%;
	margin: 0;
	padding: 0;
	list-style: none;
}

.avx-flights__item {
	display: grid;
	grid-template-columns: minmax(0, 1fr) auto;
	grid-template-areas:
		"city city"
		"detail pill";
	align-items: center;
	gap: 0.25rem 0.625rem;
	margin: 0;
	padding: 1rem 0;
	border-top: 1px solid var(--avx-flights-rule);
}

.avx-flights__item:first-child {
	padding-top: 0;
	border-top: 0;
}

.avx-flights__item:last-child {
	padding-bottom: 0.25rem;
}

.avx-flights__item--message {
	display: block;
	color: var(--avx-flights-muted);
	font-size: 1rem;
	line-height: 1.375;
}

.avx-flights__item--message {
	color: var(--avx-flights-ink);
}

/* On narrow widths the city, the detail and the pill are placed by the row's grid. */
.avx-flights__where {
	display: contents;
}

.avx-flights__item .avx-flights__pill {
	grid-area: pill;
}

.avx-flights__city {
	grid-area: city;
	font-size: 1.125rem;
	font-weight: 600;
	line-height: 1.3334;
	overflow-wrap: anywhere;
}

.avx-flights__nobreak,
.avx-flights__detail time {
	white-space: nowrap;
}

/* "From" and "To" say which way the flight is going; the city is what stands out. */
.avx-flights__dir {
	font-size: 1rem;
	font-weight: 500;
}

.avx-flights__detail {
	grid-area: detail;
	font-size: 1rem;
	font-weight: 500;
	line-height: 1.375;
	overflow-wrap: anywhere;
}

.avx-flights__all {
	display: inline-block;
	margin: 0.5rem 0 0;
	padding: 0;
	border: 0;
	background: none;
	color: var(--avx-flights-ink);
	font: inherit;
	font-size: 1rem;
	font-weight: 600;
	line-height: 1.5;
	text-decoration: underline;
	text-decoration-thickness: 0.08em;
	text-underline-offset: 0.2em;
	cursor: pointer;
}

.avx-flights__all:hover,
.avx-flights__all:focus {
	color: var(--avx-flights-ink);
	text-decoration-thickness: 0.14em;
}

/* ---- Status pills ---- */

.avx-flights__pill {
	display: inline-flex;
	flex: none;
	align-items: center;
	justify-content: center;
	min-width: 5.875rem;
	min-height: 1.875rem;
	/* One pixel less than the design's padding, to leave room for the border (used in high-contrast modes). */
	padding: 0.3125rem 0.9375rem;
	border: 1px solid transparent;
	border-radius: 2.3125rem;
	background: var(--avx-flights-good-bg);
	color: var(--avx-flights-good-ink);
	font-size: 0.875rem;
	font-weight: 800;
	line-height: 1.2857;
	text-align: center;
	white-space: nowrap;
}

.avx-flights__pill--warn {
	background: var(--avx-flights-warn-bg);
	color: var(--avx-flights-warn-ink);
}

.avx-flights__pill--alert {
	background: var(--avx-flights-alert-bg);
	color: var(--avx-flights-alert-ink);
}

.avx-flights__pill--done {
	background: var(--avx-flights-done-bg);
	color: var(--avx-flights-done-ink);
}

/*
 * ---- While the first flights load ----
 *
 * Grey shapes stand where the rows will be, built from the same classes as
 * the rows, so they take the same room and nothing moves when the flights
 * arrive. A bar stands for each group of words and wraps where the words
 * would. They are still, with no shimmer: the wait is about a third of a
 * second. The colour matches the parking card's empty pills.
 */
.avx-flights__bone {
	display: inline-block;
	width: var(--avx-flights-bone, 6em);
	max-width: 100%;
	height: 0.75em;
	border-radius: 0.375em;
	background: var(--avx-flights-ghost);
	vertical-align: middle;
}

/* Weighted to win over the pill colours, wherever those rules sit in this file. */
.avx-flights .avx-flights__pill.avx-flights__pill--ghost {
	border-color: transparent;
	background: var(--avx-flights-ghost);
}

.avx-flights-board .avx-flights__pill.avx-flights__pill--ghost {
	width: 5.25rem;
}

/* ---- Messages ---- */

.avx-flights__notice {
	width: 100%;
	margin: 0;
	padding: 0.75rem 1rem 0.75rem 2.875rem;
	border: 1px solid transparent;
	border-radius: 8px;
	background-color: var(--avx-flights-notice-bg);
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Ccircle cx='10' cy='10' r='8.25' fill='none' stroke='%23002855' stroke-width='1.5'/%3E%3Cpath d='M10 9.25v4.5' fill='none' stroke='%23002855' stroke-width='1.75' stroke-linecap='round'/%3E%3Ccircle cx='10' cy='6.3' r='1.05' fill='%23002855'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: 1rem 0.8125rem;
	background-size: 1.25rem 1.25rem;
	color: var(--avx-flights-notice-ink);
	font-size: 1rem;
	font-weight: 500;
	line-height: 1.375;
}

.avx-flights__note,
.avx-flights__summary,
.avx-flights__auto {
	margin: 0;
	color: var(--avx-flights-muted);
	font-size: 1rem;
	line-height: 1.375;
}

/* The board's flight count, or the card's link, with the "Stop updating" button beside it. */
.avx-flights__meta,
.avx-flights__foot {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	justify-content: space-between;
	gap: 0.25rem 1rem;
	width: 100%;
}

/* A quiet text button: the flights update by themselves, and this stops that. */
.avx-flights__pause {
	display: inline-block;
	min-height: 1.5rem;
	margin: 0;
	padding: 0;
	border: 0;
	background: none;
	color: var(--avx-flights-muted);
	font: inherit;
	font-size: 1rem;
	font-weight: 600;
	line-height: 1.5;
	text-align: left;
	text-decoration: underline;
	text-decoration-thickness: 0.08em;
	text-underline-offset: 0.2em;
	cursor: pointer;
}

.avx-flights__pause:hover,
.avx-flights__pause:focus {
	color: var(--avx-flights-ink);
	text-decoration-thickness: 0.14em;
}

.avx-flights__empty {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 1rem;
	padding: 1.5rem 0;
	border-top: 1px solid var(--avx-flights-rule-soft);
	border-bottom: 1px solid var(--avx-flights-rule-soft);
	font-size: 1.0625rem;
	line-height: 1.4118;
}

.avx-flights__emptytext {
	margin: 0;
}

/* ---- Board ---- */

/* The board sits on the page itself: no box and no shadow. */
.avx-flights-board {
	/* How far the flights, the day labels and the line under the list sit in from the board's edge. */
	--avx-flights-inset: 0.5rem;

	border-radius: 0;
	background: var(--avx-flights-board-surface, transparent);
	box-shadow: none;
}

/* Wide enough for every column, narrow enough that the eye can follow a row from its time to its status. */
.avx-flights-board .avx-flights__inner {
	gap: 1.25rem;
	max-width: var(--avx-flights-board-width, 62rem);
	padding: 0;
}

.avx-flights-board .avx-flights__heading {
	font-size: 1.75rem;
	font-weight: 700;
	line-height: 1.2143;
	text-wrap: balance;
}

.avx-flights__controls {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: 0.75rem;
	margin: 0;
}

.avx-flights__switch {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	min-width: 0;
	margin: 0;
	padding: 3px;
	border: 1px solid var(--avx-flights-ink);
	border-radius: 1.75rem;
	background: var(--avx-flights-field-bg);
}

.avx-flights__choice {
	position: relative;
	display: flex;
	min-width: 0;
}

/* The radio stays in place, invisible, so the keyboard and touch still reach it. */
.avx-flights__choice input {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	margin: 0;
	opacity: 0;
	cursor: pointer;
}

.avx-flights__choice label {
	display: flex;
	flex: 1;
	align-items: center;
	justify-content: center;
	flex-wrap: wrap;
	gap: 0 0.375rem;
	min-width: 0;
	min-height: 2.5rem;
	padding: 0.375rem 0.75rem;
	border-radius: 1.5rem;
	color: var(--avx-flights-ink);
	font-size: 1rem;
	font-weight: 600;
	line-height: 1.2;
	text-align: center;
}

.avx-flights__choice input:hover + label {
	background: var(--avx-flights-stripe);
}

.avx-flights__choice input:checked + label {
	background: var(--avx-flights-button-bg);
	color: var(--avx-flights-button-ink);
}

/*
 * The switch is one control with a border of its own, and focus is always on
 * the side that is chosen, so the ring goes on the switch's edge: one thicker
 * edge, as on the search field. A ring round the chosen side alone would run
 * into the switch's border and under the other side. The radio button itself
 * is invisible and takes no ring.
 */
.avx-flights__choice input:focus-visible {
	outline: 0;
}

.avx-flights__switch:focus-within {
	outline: 2px solid var(--avx-flights-focus);
	outline-offset: 0;
}

/* Where the browser can tell the keyboard's focus from a click's, the ring is for the keyboard alone. */
@supports selector(:has(a)) {
	.avx-flights__switch:focus-within {
		outline: 0;
	}

	.avx-flights__switch:has(input:focus-visible) {
		outline: 2px solid var(--avx-flights-focus);
		outline-offset: 0;
	}
}

.avx-flights__count {
	font-weight: 500;
}

.avx-flights__count:empty {
	display: none;
}

/* One search box, with a magnifying glass drawn inside its left end. */
.avx-flights__find {
	position: relative;
	min-width: 0;
}

.avx-flights__findicon {
	position: absolute;
	top: 50%;
	left: 1.125rem;
	width: 1.25rem;
	height: 1.25rem;
	transform: translateY(-50%);
	color: var(--avx-flights-ink);
	pointer-events: none;
}

.avx-flights__find .avx-flights__input {
	min-height: 2.875rem;
	padding-left: 3rem;
}

.avx-flights-board .avx-flights__input::placeholder {
	color: var(--avx-flights-muted);
}

/* ---- Board: the flights, as a list of rows on narrow widths ---- */

/*
 * Themes style tables in page content: a border on every cell, tinted header
 * cells, striped rows, their own padding. None of that belongs on the board.
 * It is cleared here, and every rule for the board's table carries ":not(#_)".
 * That matches everything (nothing has the id "_") and gives the rule the
 * weight of an id, so it wins over a theme's table rules however they are
 * written, without a single "!important".
 */
.avx-flights:not(#_) .avx-flights__table,
.avx-flights:not(#_) .avx-flights__table caption,
.avx-flights:not(#_) .avx-flights__table thead,
.avx-flights:not(#_) .avx-flights__table tbody,
.avx-flights:not(#_) .avx-flights__table tr,
.avx-flights:not(#_) .avx-flights__table th,
.avx-flights:not(#_) .avx-flights__table td {
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 0;
	background: none;
	box-shadow: none;
	color: inherit;
	font-weight: 500;
	letter-spacing: normal;
	text-align: left;
	text-transform: none;
	vertical-align: middle;
}

/* The minimum width is cleared too: a theme may give tables in page content one on small screens, to make them scroll sideways. */
.avx-flights-board:not(#_) .avx-flights__table {
	display: block;
	width: 100%;
	min-width: 0;
	max-width: 100%;
	border-collapse: collapse;
	font-size: 1rem;
	line-height: 1.375;
}

.avx-flights-board:not(#_) .avx-flights__table thead {
	position: absolute;
	width: 1px;
	height: 1px;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	clip-path: inset(50%);
	white-space: nowrap;
}

.avx-flights-board:not(#_) .avx-flights__table tbody,
.avx-flights-board:not(#_) .avx-flights__table .avx-flights__dayrow,
.avx-flights-board:not(#_) .avx-flights__table .avx-flights__daycell {
	display: block;
}

/* The day: a soft band the width of the list. It is the only fill on the board besides the pills. */
.avx-flights-board:not(#_) .avx-flights__table .avx-flights__day + .avx-flights__day .avx-flights__daycell {
	padding-top: 1.5rem;
}

.avx-flights__daylabel {
	display: block;
	padding: 0.5rem var(--avx-flights-inset);
	border-radius: 8px;
	background: var(--avx-flights-stripe);
	font-size: 1rem;
	font-weight: 600;
	line-height: 1.375;
}

/* One fine rule under each flight, and nothing else: no boxes, no rules between columns. */
.avx-flights-board:not(#_) .avx-flights__table .avx-flights__row {
	display: grid;
	grid-template-columns: 5.25rem max-content minmax(0, 1fr);
	grid-template-areas:
		"time flight flight"
		"time status gate"
		"time bag bag";
	align-items: start;
	column-gap: 0.75rem;
	padding: 0.875rem var(--avx-flights-inset);
	border-bottom: 1px solid var(--avx-flights-rule-soft);
}

/* The time leads the row. A changed time: the scheduled one struck through, the new one in bold under it. */
.avx-flights-board:not(#_) .avx-flights__table .avx-flights__cell--time {
	grid-area: time;
	font-size: 1.0625rem;
	font-weight: 700;
	line-height: 1.4118;
	white-space: nowrap;
}

.avx-flights__new,
.avx-flights__was {
	display: block;
}

.avx-flights__was {
	color: var(--avx-flights-muted);
	font-weight: 500;
	text-decoration: line-through;
}

.avx-flights-board:not(#_) .avx-flights__table .avx-flights__cell--flight {
	grid-area: flight;
	min-width: 0;
}

.avx-flights__place,
.avx-flights__line,
.avx-flights__also {
	display: block;
	overflow-wrap: anywhere;
}

.avx-flights__place {
	font-size: 1.0625rem;
	font-weight: 600;
	line-height: 1.4118;
}

.avx-flights__iata {
	color: var(--avx-flights-muted);
	font-weight: 500;
}

.avx-flights__line {
	color: var(--avx-flights-muted);
	font-size: 1rem;
	line-height: 1.375;
}

.avx-flights__also {
	color: var(--avx-flights-muted);
	font-size: 0.875rem;
	line-height: 1.4286;
}

/* On the card (its own search, with no board page set), the line goes under the flight's details. */
.avx-flights-card .avx-flights__also {
	flex: 1 0 100%;
	grid-column: 1 / -1;
}

.avx-flights__airline {
	color: inherit;
}

a.avx-flights__airline {
	text-decoration: underline;
	text-decoration-thickness: 0.08em;
	text-underline-offset: 0.2em;
}

a.avx-flights__airline:hover,
a.avx-flights__airline:focus {
	color: var(--avx-flights-ink);
	text-decoration-thickness: 0.14em;
}

.avx-flights__code {
	white-space: nowrap;
}

.avx-flights-board:not(#_) .avx-flights__table .avx-flights__cell--status {
	grid-area: status;
	margin-top: 0.375rem;
}

/* Gate and baggage claim each say what they are: "Gate 6", "Baggage claim 1". */
.avx-flights-board:not(#_) .avx-flights__table .avx-flights__cell--gate,
.avx-flights-board:not(#_) .avx-flights__table .avx-flights__cell--bag {
	align-self: center;
	margin-top: 0.375rem;
	color: var(--avx-flights-muted);
	font-size: 1rem;
	line-height: 1.375;
	white-space: nowrap;
}

.avx-flights-board:not(#_) .avx-flights__table .avx-flights__cell--gate {
	grid-area: gate;
}

.avx-flights-board:not(#_) .avx-flights__table .avx-flights__cell--bag {
	grid-area: bag;
}

.avx-flights-board:not(#_) .avx-flights__table .avx-flights__cell--gate:empty,
.avx-flights-board:not(#_) .avx-flights__table .avx-flights__cell--bag:empty {
	display: none;
}

/* With no gate yet, the baggage claim starts where the gate would have. */
.avx-flights-board:not(#_) .avx-flights__table .avx-flights__cell--gate:empty + .avx-flights__cell--bag {
	grid-column-start: 2;
}

.avx-flights__v {
	color: var(--avx-flights-ink);
	font-weight: 600;
}

/*
 * Status on the board. Most flights are on time, so that is the quiet one.
 * Solid colour is kept for the flights that need a second look.
 */
.avx-flights-board .avx-flights__pill {
	min-width: 0;
	min-height: 1.75rem;
	padding: 0.125rem 0.75rem;
	background: var(--avx-flights-good-soft);
	color: var(--avx-flights-good-ink);
	font-size: 0.875rem;
	font-weight: 600;
	line-height: 1.4286;
}

.avx-flights-board .avx-flights__pill--warn {
	background: var(--avx-flights-warn-bg);
	color: var(--avx-flights-warn-ink);
}

.avx-flights-board .avx-flights__pill--alert {
	background: var(--avx-flights-alert-bg);
	color: var(--avx-flights-alert-ink);
}

/* Landed or gone: plain words, and the row steps back. */
.avx-flights-board .avx-flights__pill--done {
	padding-right: 0;
	padding-left: 0;
	background: none;
	color: var(--avx-flights-muted);
}

.avx-flights-board:not(#_) .avx-flights__table .avx-flights__row.is-done .avx-flights__cell--time,
.avx-flights-board:not(#_) .avx-flights__table .avx-flights__row.is-done .avx-flights__place,
.avx-flights-board:not(#_) .avx-flights__table .avx-flights__row.is-cancelled .avx-flights__cell--time {
	color: var(--avx-flights-muted);
}

.avx-flights-board:not(#_) .avx-flights__table .avx-flights__row.is-cancelled .avx-flights__cell--time {
	text-decoration: line-through;
}

/*
 * Under the flights, read as one line from the left: how many are listed,
 * when they were last read, that the list updates itself, and the button
 * that stops it. On a phone the two halves sit one under the other.
 */
.avx-flights-board .avx-flights__meta {
	justify-content: flex-start;
	gap: 0.25rem 0.375rem;
	margin-top: -0.25rem;
	padding: 0 var(--avx-flights-inset);
}

/* The sentence and its button: side by side while they fit, the button on a line of its own when they do not. */
.avx-flights-board .avx-flights__auto {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	gap: 0.25rem 0.375rem;
	min-width: 0;
}

/* The button is the one thing to press in the line, so it takes the ink colour and never breaks in two. */
.avx-flights-board .avx-flights__pause {
	color: var(--avx-flights-ink);
	white-space: nowrap;
}

/* ---- Wider spaces: the card as designed for desktop, the board as a table ---- */

/*
 * The card as designed for desktop starts at 400px, not at the board's 480px:
 * beside another card on a tablet held upright it is about 430 to 480px wide,
 * and there is room there for the flights with the pill at the end of the row.
 */
@container (min-width: 25rem) {
	.avx-flights__inner {
		padding: 1.5rem;
	}

	/*
	 * The home page design, 542 by 358: 24 around and 30 under; heading 32,
	 * 12, search 40, 24, "Happening now" 21, 12, three one-line flights 53
	 * apart, 12, link 16.
	 */
	.avx-flights-card .avx-flights__inner {
		gap: 0.75rem;
		padding: 1.5rem 1.5rem 1.875rem;
	}

	.avx-flights-card .avx-flights__heading {
		line-height: 1.3334;
	}

	.avx-flights-card .avx-flights__now {
		margin-top: 0.75rem;
	}

	/*
	 * The "Happening now" heading is kept for screen readers only on the wider
	 * card (Kyle, 2026-11-17). With every flight on two lines the card had
	 * grown 38px, and the parking card beside it stretched to match, leaving a
	 * gap above its button. The heading and its gap give back 33px. Phones
	 * still show it. (If the card ever lists search matches itself, without a
	 * board page to go to, the matches have no visible heading here.)
	 */
	.avx-flights-card .avx-flights__subheading {
		position: absolute;
		width: 1px;
		height: 1px;
		margin: -1px;
		padding: 0;
		overflow: hidden;
		clip-path: inset(50%);
		white-space: nowrap;
		border: 0;
	}

	.avx-flights-card .avx-flights__foot {
		padding-top: 0;
	}

	.avx-flights-card .avx-flights__head {
		flex-wrap: nowrap;
		min-height: 2rem;
	}

	/* The heading keeps to one line; the label takes what is left beside it. */
	.avx-flights-card .avx-flights__heading {
		flex: none;
	}

	/* Two short lines beside the heading, inside its 32px height, so the label costs the card nothing. */
	.avx-flights-card .avx-flights__tag {
		flex: 0 1 15.5rem;
		min-width: 0;
		line-height: 1.1429;
		text-align: right;
		text-wrap: balance;
	}

	.avx-flights__subheading {
		font-size: 1rem;
		line-height: 1.3125;
	}

	/* The button sits inside the right end of the field. */
	.avx-flights__searchbox {
		position: relative;
		display: block;
	}

	.avx-flights-card .avx-flights__input {
		min-height: 2.5rem;
		padding: 0.3125rem 7rem 0.3125rem 1.25rem;
		border-radius: 1.875rem;
		font-size: 1rem;
		line-height: 1.5;
	}

	.avx-flights-card .avx-flights__button {
		position: absolute;
		top: 0;
		right: 0;
		min-width: 6rem;
		min-height: 2.5rem;
		height: 100%;
		padding: 0.5rem 1rem;
		border-radius: 2rem;
		font-size: 1rem;
	}

	/* City and detail, with the pill at the end (on the home card the two stack: see below). */
	.avx-flights__item {
		display: flex;
		justify-content: space-between;
		padding: 0.75rem 0;
	}

	.avx-flights__item:last-child {
		padding-bottom: 0;
	}

	.avx-flights__item--message {
		display: block;
	}

	.avx-flights__where {
		display: flex;
		flex-wrap: wrap;
		align-items: baseline;
		gap: 0 0.375rem;
		min-width: 0;
	}

	.avx-flights-card .avx-flights__item {
		align-items: center;
		column-gap: 0.5rem;
		min-height: 1.8125rem;
	}

	/*
	 * On the home card every flight takes two lines, the city above its
	 * detail, as on phones (Kyle, 2026-11-17). Before, a flight stayed on one
	 * line when it fit and only a long city wrapped, so neighbouring rows
	 * looked different. The pill sits centred beside the two lines.
	 */
	.avx-flights-card .avx-flights__where {
		flex-direction: column;
		align-items: flex-start;
		gap: 0;
	}

	/*
	 * Room for three two-line flights, so the card is the same height
	 * whatever the flights are, and the same height while it waits (the grey
	 * rows use the same classes) as when they arrive: 48px for each flight,
	 * 12px either side of each rule, 194px in all. The parking card beside it
	 * stretches to the same height.
	 */
	.avx-flights-card .avx-flights__list {
		min-height: 12.125rem;
	}

	.avx-flights__city {
		font-size: 1rem;
		line-height: 1.5;
	}

	.avx-flights__detail {
		font-size: 1rem;
		line-height: 1.5;
	}

	.avx-flights__pill {
		min-width: 6rem;
		min-height: 1.8125rem;
		padding: 0.1875rem 0.5625rem;
		border-radius: 3.125rem;
		font-size: 0.875rem;
		font-weight: 600;
		line-height: 1.5;
	}

	.avx-flights-card .avx-flights__all {
		margin-top: 0;
		font-size: 1rem;
		line-height: 1.125;
	}
}

@container (min-width: 30rem) {
	.avx-flights-board .avx-flights__inner {
		--avx-flights-inset: 0.875rem;

		padding: 0;
	}

	/* Room for the status at the end of the first line. */
	.avx-flights-board:not(#_) .avx-flights__table .avx-flights__row {
		grid-template-columns: 5.75rem max-content minmax(0, 1fr) max-content;
		grid-template-areas:
			"time flight flight status"
			"time gate bag status";
		column-gap: 1rem;
	}

	.avx-flights-board:not(#_) .avx-flights__table .avx-flights__cell--status {
		margin-top: 0;
	}

	.avx-flights-board:not(#_) .avx-flights__table .avx-flights__cell--gate,
	.avx-flights-board:not(#_) .avx-flights__table .avx-flights__cell--bag {
		margin-top: 0.375rem;
	}
}

@container (min-width: 44rem) {
	.avx-flights__controls {
		grid-template-columns: 20rem minmax(0, 24rem);
		justify-content: space-between;
		align-items: center;
	}

	.avx-flights-board:not(#_) .avx-flights__table {
		display: table;
		table-layout: auto;
	}

	.avx-flights-board:not(#_) .avx-flights__table thead {
		position: static;
		width: auto;
		height: auto;
		margin: 0;
		overflow: visible;
		clip: auto;
		clip-path: none;
		white-space: normal;
		display: table-header-group;
	}

	.avx-flights-board:not(#_) .avx-flights__table tbody {
		display: table-row-group;
	}

	.avx-flights-board:not(#_) .avx-flights__table .avx-flights__dayrow,
	.avx-flights-board:not(#_) .avx-flights__table .avx-flights__row {
		display: table-row;
		padding: 0;
		border: 0;
	}

	/* Column headings: small, quiet words over the columns. No rule, no fill. */
	.avx-flights-board:not(#_) .avx-flights__table thead th {
		padding: 0 0.75rem 0.625rem;
		color: var(--avx-flights-muted);
		font-size: 0.875rem;
		font-weight: 600;
		line-height: 1.4286;
		white-space: nowrap;
	}

	.avx-flights-board:not(#_) .avx-flights__table .avx-flights__daycell {
		display: table-cell;
	}

	.avx-flights-board:not(#_) .avx-flights__table .avx-flights__cell {
		display: table-cell;
		margin: 0;
		padding: 0.9375rem 0.75rem;
		border-bottom: 1px solid var(--avx-flights-rule-soft);
		vertical-align: middle;
	}

	/* The first and last columns sit in from the edge by the same amount as the day's label. */
	.avx-flights-board:not(#_) .avx-flights__table thead th:first-child,
	.avx-flights-board:not(#_) .avx-flights__table .avx-flights__cell:first-child {
		padding-left: var(--avx-flights-inset);
	}

	.avx-flights-board:not(#_) .avx-flights__table thead th:last-child,
	.avx-flights-board:not(#_) .avx-flights__table .avx-flights__cell:last-child {
		padding-right: var(--avx-flights-inset);
	}

	.avx-flights-board:not(#_) .avx-flights__table .avx-flights__cell--time {
		width: 8rem;
	}

	.avx-flights-board:not(#_) .avx-flights__table .avx-flights__cell--status {
		width: 9rem;
	}

	.avx-flights-board:not(#_) .avx-flights__table .avx-flights__cell--gate {
		width: 5.5rem;
	}

	.avx-flights-board:not(#_) .avx-flights__table .avx-flights__cell--bag {
		width: 9rem;
	}

	/* An empty gate or belt still holds its place in the row. */
	.avx-flights-board:not(#_) .avx-flights__table .avx-flights__cell--gate:empty,
	.avx-flights-board:not(#_) .avx-flights__table .avx-flights__cell--bag:empty {
		display: table-cell;
	}

	.avx-flights-board:not(#_) .avx-flights__table .avx-flights__cell--gate,
	.avx-flights-board:not(#_) .avx-flights__table .avx-flights__cell--bag {
		font-size: 1rem;
	}

	/* The column heading says "Gate" and "Baggage claim", so the cell is the number alone. */
	.avx-flights-board:not(#_) .avx-flights__table .avx-flights__k {
		display: none;
	}
}

/* A row under the pointer is picked out faintly, to help the eye across from the time to the status. */
@media (hover: hover) {
	.avx-flights-board:not(#_) .avx-flights__table .avx-flights__row:hover,
	.avx-flights-board:not(#_) .avx-flights__table .avx-flights__row:hover .avx-flights__cell {
		background-color: var(--avx-flights-hover);
	}
}

/* Larger touch targets on phones and tablets. */
@media (pointer: coarse) {
	/* A taller area to tap, without moving anything: the padding is taken back as margin. */
	.avx-flights__all,
	.avx-flights__pause {
		margin-top: -0.625rem;
		margin-bottom: -0.625rem;
		padding: 0.625rem 0;
	}

	.avx-flights-card .avx-flights__all {
		margin-top: -0.625rem;
	}

	/* The board's button sits beside or under a sentence, so its taller area takes real room and never lies over the words. */
	.avx-flights-board .avx-flights__pause {
		margin-top: 0;
		margin-bottom: 0;
	}

	/* The desktop card's 40px search row grows to 44 for fingers. The phone card's is taller already. */
	@container (min-width: 25rem) {
		.avx-flights-card .avx-flights__input,
		.avx-flights-card .avx-flights__button {
			min-height: 2.75rem;
		}
	}
}

/* ---- Motion: only where it tells the visitor something changed ---- */

@media (prefers-reduced-motion: no-preference) {
	.avx-flights__button,
	.avx-flights__choice label {
		transition: background-color 150ms ease, color 150ms ease;
	}

	.avx-flights__pill {
		transition: background-color 200ms ease, color 200ms ease;
	}

	/* A status that changed while the page was open. */
	.avx-flights__pill.is-changed {
		animation: avx-flights-changed 450ms ease-out;
	}

	/* The first rows fade in where the grey shapes were. Nothing moves, and later changes simply appear. */
	.avx-flights .is-entering {
		animation: avx-flights-arrive 170ms ease-out both;
	}
}

@keyframes avx-flights-changed {
	from {
		opacity: 0.35;
		transform: scale(0.94);
	}

	to {
		opacity: 1;
		transform: scale(1);
	}
}

@keyframes avx-flights-arrive {
	from {
		opacity: 0;
	}

	to {
		opacity: 1;
	}
}

@media (forced-colors: active) {
	.avx-flights,
	.avx-flights__pill,
	.avx-flights__button {
		border: 1px solid currentColor;
	}

	.avx-flights__choice input:checked + label {
		outline: 2px solid currentColor;
		outline-offset: -4px;
	}
}
