/* ==========================================================================
   Binham — Tickets enquiry card
   Loaded only on the Tickets template. Every colour comes from tokens.css.
   ========================================================================== */

.bnh-hero--tickets .bnh-hero__in {
	justify-items: center;
	padding-block: clamp(2.5rem, 2rem + 4vw, 5rem);
}

.bnh-hero--tickets::before {
	background: linear-gradient(180deg, rgba(0, 37, 64, .58) 0%, rgba(0, 37, 64, .42) 55%, rgba(0, 37, 64, .58) 100%);
}

/* --- The card ------------------------------------------------------------- */

.bnh-fq {
	display: grid;
	gap: var(--bnh-s4);
	width: min(860px, 100%);
	padding: clamp(1.25rem, 1rem + 2vw, 2.25rem);
	background: rgba(255, 255, 255, .93);
	border: 1px solid rgba(255, 255, 255, .6);
	border-radius: var(--bnh-r-lg);
	box-shadow: var(--bnh-sh-lg);
	backdrop-filter: blur(8px);
	color: var(--bnh-ink);
	/* .bnh-hero--center centres its children; the form reads left-aligned. */
	text-align: left;
}

.bnh-fq__head { text-align: center; }

.bnh-fq__title {
	margin: 0 0 .35rem;
	color: var(--bnh-navy-800);
	font-family: var(--bnh-font-display);
	font-size: clamp(1.5rem, 1.2rem + 1.2vw, 2rem);
	font-weight: 700;
	line-height: 1.2;
}

.bnh-fq__lead {
	margin: 0;
	color: var(--bnh-muted);
	font-size: var(--bnh-fs-sm);
}

/* --- Trip type ------------------------------------------------------------ */

.bnh-fq__trip {
	display: flex;
	flex-wrap: wrap;
	gap: var(--bnh-s2);
	margin: 0;
	padding: 0;
	border: 0;
}

/* --- Rows and fields ------------------------------------------------------ */

.bnh-fq__row {
	display: grid;
	gap: var(--bnh-s3);
	align-items: end;
}

.bnh-fq__row--2 { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.bnh-fq__row--dates { grid-template-columns: repeat(auto-fit, minmax(168px, 1fr)); }

/*
 * `display` on the rules above outranks the browser's `[hidden]` rule, so the
 * hidden state has to be restated — the trip-type switch relies on it.
 */
.bnh-fq__row[hidden],
.bnh-fq__f[hidden],
.bnh-fq__multi[hidden],
.bnh-fq__addleg[hidden],
.bnh-fq__dropleg[hidden] { display: none; }

.bnh-fq__f { min-width: 0; }

.bnh-fq__f > label {
	display: block;
	margin-bottom: .3rem;
	color: var(--bnh-navy);
	font-size: var(--bnh-fs-xs);
	font-weight: 600;
}

.bnh-fq__f > label b { font-weight: 600; }

.bnh-fq input[type="text"],
.bnh-fq input[type="date"],
.bnh-fq input[type="number"],
.bnh-fq select {
	width: 100%;
	min-height: 44px;
	padding: .55rem .75rem;
	background: var(--bnh-white);
	border: 1px solid var(--bnh-line);
	border-radius: var(--bnh-r-sm);
	color: var(--bnh-ink);
	font-family: inherit;
	font-size: var(--bnh-fs-sm);
}

.bnh-fq select {
	padding-right: 2rem;
	background-position: right .6rem center;
}

/* Icon sitting inside the field. */
.bnh-fq__input { position: relative; display: block; }

.bnh-fq__input svg {
	position: absolute;
	top: 50%;
	left: .7rem;
	transform: translateY(-50%);
	color: var(--bnh-muted);
	pointer-events: none;
}

/*
 * `.bnh-fq input[type="text"]` above sets the `padding` shorthand and outranks
 * a bare `.bnh-fq__input input`, which reset the left padding back under the
 * icon. Matching its specificity keeps the text clear of the glyph.
 */
.bnh-fq .bnh-fq__input input { padding-left: 2.2rem; }

/* --- Place suggestions ----------------------------------------------------- */

.bnh-places {
	position: absolute;
	z-index: 40;
	top: calc(100% + 4px);
	left: 0;
	right: 0;
	max-height: 260px;
	margin: 0;
	padding: .25rem;
	overflow-y: auto;
	list-style: none;
	background: var(--bnh-white);
	border: 1px solid var(--bnh-line);
	border-radius: var(--bnh-r-sm);
	box-shadow: var(--bnh-sh-lg);
}

.bnh-places__item {
	display: grid;
	grid-template-columns: 3.1rem minmax(0, 1fr);
	gap: .5rem;
	align-items: baseline;
	padding: .5rem .6rem;
	border-radius: var(--bnh-r-sm);
	color: var(--bnh-ink);
	font-size: var(--bnh-fs-sm);
	line-height: 1.4;
	cursor: pointer;
}

/* The IATA code identifies the airport, so it leads in its own column. */
.bnh-places__code {
	color: var(--bnh-navy-800);
	font-size: var(--bnh-fs-xs);
	font-weight: 700;
	letter-spacing: .04em;
}

.bnh-places__name { color: var(--bnh-muted); }
.bnh-places__item:hover .bnh-places__name,
.bnh-places__item.is-active .bnh-places__name { color: var(--bnh-navy-800); }

/* Hover and keyboard highlight share one look, so the two never disagree. */
.bnh-places__item:hover,
.bnh-places__item.is-active {
	background: var(--bnh-navy-050);
	color: var(--bnh-navy-800);
}

/* --- Multi-city legs ------------------------------------------------------ */

.bnh-fq__multi { display: grid; gap: var(--bnh-s3); }

.bnh-fq__legs { display: grid; gap: var(--bnh-s3); }

.bnh-fq__leg {
	display: grid;
	gap: var(--bnh-s3);
	grid-template-columns: minmax(0, 1fr);
	align-items: end;
	padding: var(--bnh-s3);
	background: var(--bnh-grey-050);
	border: 1px solid var(--bnh-line);
	border-radius: var(--bnh-r);
}

.bnh-fq__addleg {
	display: inline-flex;
	align-items: center;
	justify-self: start;
	gap: .4rem;
	padding: .5rem 1rem;
	background: var(--bnh-navy-050);
	border: 1px dashed var(--bnh-navy);
	border-radius: var(--bnh-r-pill);
	color: var(--bnh-navy);
	font-family: inherit;
	font-size: var(--bnh-fs-sm);
	font-weight: 600;
	cursor: pointer;
}

.bnh-fq__addleg:hover { background: var(--bnh-navy); color: var(--bnh-white); }

.bnh-fq__dropleg {
	display: grid;
	place-items: center;
	width: 36px;
	height: 36px;
	margin-bottom: 4px;
	padding: 0;
	background: transparent;
	border: 1px solid var(--bnh-line);
	border-radius: 50%;
	color: var(--bnh-err);
	font-size: 1.25rem;
	line-height: 1;
	cursor: pointer;
}

.bnh-fq__dropleg:hover { background: var(--bnh-err); border-color: var(--bnh-err); color: var(--bnh-white); }

/* --- Submit --------------------------------------------------------------- */

.bnh-fq__submit { margin-top: var(--bnh-s1); }

.bnh-fq__note {
	margin: 0;
	color: var(--bnh-muted);
	font-size: var(--bnh-fs-xs);
	text-align: center;
}

@media (min-width: 700px) {
	.bnh-fq__leg { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 170px 36px; }
}

@media (max-width: 480px) {
	.bnh-fq { gap: var(--bnh-s3); }
	.bnh-fq__trip { gap: .35rem; }
	.bnh-radio { padding: .35rem .7rem; font-size: var(--bnh-fs-xs); }
}
