/**
 * Domestic flight search strip.
 *
 * Sits directly under the hero, as a single white card on the page - there is
 * deliberately no coloured band behind it, which left the hero and the strip
 * competing as two stacked blocks of colour.
 *
 * The palette is the site's own: brand green #218035 on the button, the
 * heading rule and the focus states, with the same ink as body copy.
 */

.leaf-fs {
	--fs-green: #218035;
	--fs-green-dark: #1c6e2d;
	--fs-green-soft: #eef5ef;
	--fs-label: #6e737c;
	--fs-line: #dde3e2;
	--fs-ink: #1c2011;

	position: relative;
	/* No band. The card carries the strip on its own, so it reads as one
	   object sitting on the page instead of a second block of colour
	   competing with the hero directly above it. */
	background: transparent;
	padding: clamp(1.25rem, 3vw, 2rem) clamp(1rem, 4vw, 3rem) clamp(1.5rem, 3vw, 2.25rem);
}

.leaf-fs__inner {
	max-width: 82rem;
	margin: 0 auto;
}

/* ------------------------------------------------------------------- tab */

/*
 * A heading inside the card, underlined in green.
 *
 * Three classes and an element, deliberately: the theme ships a bare
 * "h2 { font-size: 55px }" for Elementor section titles, and at that size this
 * label swamped the strip. It is an <h2> because it names the section for
 * assistive technology, not because it is a section heading.
 */
.leaf-fs .leaf-fs__card h2.leaf-fs__tab {
	display: inline-block;
	margin: 0 0 1rem;
	padding: 0 0 0.5rem;
	background: none;
	color: var(--fs-ink);
	font-size: 1.0625rem;
	font-weight: 700;
	line-height: 1.3;
	letter-spacing: 0;
	text-transform: none;
	border-bottom: 3px solid var(--fs-green);
	border-radius: 0;
}

/* ------------------------------------------------------------------ card */

.leaf-fs__card {
	background: #fff;
	border: 1px solid var(--fs-line);
	border-radius: 14px;
	padding: clamp(1.2rem, 2.5vw, 1.75rem);
	box-shadow: 0 10px 28px rgba(16, 42, 22, .10);
}

/* --------------------------------------------------------------- trip type */

.leaf-fs__trip {
	display: flex;
	gap: 1.75rem;
	margin: 0 0 1.25rem;
	padding: 0 0 1.1rem;
	border: 0;
	border-bottom: 1px solid var(--fs-line);
}

.leaf-fs__radio {
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
	font-size: 0.9375rem;
	font-weight: 500;
	color: var(--fs-ink);
	cursor: pointer;
}

/* The theme sets appearance:none on radios and draws its own with a coloured
   border and a ::before dot, so accent-color alone never applies. Both halves
   are restated here. */
.leaf-fs .leaf-fs__radio input[type="radio"] {
	width: 1rem;
	height: 1rem;
	margin: 0;
	cursor: pointer;
	accent-color: var(--fs-green);
	border-color: var(--fs-green);
}

.leaf-fs .leaf-fs__radio input[type="radio"]::before {
	background: var(--fs-green);
}

/* ---------------------------------------------------------------- fields */

.leaf-fs__fields {
	display: grid;
	grid-template-columns:
		minmax(0, 1.35fr) auto minmax(0, 1.35fr)
		minmax(0, 1fr) minmax(0, 1fr)
		minmax(0, 1fr) minmax(0, .55fr) minmax(0, .55fr)
		auto;
	align-items: end;
	gap: 0.75rem;
}

.leaf-fs__field {
	display: flex;
	flex-direction: column;
	gap: 0.35rem;
	min-width: 0;
}

.leaf-fs__field label {
	font-size: 0.75rem;
	font-weight: 600;
	letter-spacing: .01em;
	color: var(--fs-label);
	text-transform: uppercase;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.leaf-fs__field select,
.leaf-fs__field input {
	width: 100%;
	height: 2.875rem;
	padding: 0 0.75rem;
	border: 1px solid var(--fs-line);
	border-radius: 8px;
	background: #fff;
	color: var(--fs-ink);
	font-size: 0.9375rem;
	font-family: inherit;
	transition: border-color .15s ease, box-shadow .15s ease;
}

.leaf-fs__field input::placeholder {
	color: #a4a9b0;
}

.leaf-fs__field select:hover,
.leaf-fs__field input:hover:not(:disabled) {
	border-color: #b9c4bd;
}

.leaf-fs__field select {
	appearance: none;
	padding-right: 1.9rem;
	/* Chevron in the background, so no icon font is needed. */
	background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236e737c' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: right 0.65rem center;
	background-size: 1rem;
	cursor: pointer;
}

.leaf-fs__field select:focus-visible,
.leaf-fs__field input:focus-visible,
.leaf-fs__swap:focus-visible,
.leaf-fs__submit:focus-visible {
	outline: 2px solid var(--fs-green-dark);
	outline-offset: 2px;
}

.leaf-fs__field select:focus,
.leaf-fs__field input:focus {
	border-color: var(--fs-green);
	box-shadow: 0 0 0 3px rgba(33, 128, 53, .14);
}

/* A disabled return date should read as "not yet", not as broken. */
.leaf-fs__field input:disabled {
	background: #f5f7f6;
	color: #9aa0a8;
	cursor: not-allowed;
}

/* -------------------------------------------------------------- dropdown */

/*
 * The list the combobox script builds, replacing the browser's own datalist
 * popup - which only appeared once you had typed something, and rendered as
 * an unstyled operating-system list that matched nothing else on the page.
 */
.leaf-fs__combo {
	position: relative;
}

/*
 * A chevron on the combobox fields.
 *
 * Without it these read as plain text boxes and nothing tells the visitor
 * there is a list behind them - which was the whole complaint about the
 * native datalist. The class is added by the script, so a field only gets the
 * chevron once it actually has a working dropdown.
 */
.leaf-fs__combo input[type="text"] {
	padding-right: 1.9rem;
	background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236e737c' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: right 0.65rem center;
	background-size: 1rem;
}

.leaf-fs__options {
	position: absolute;
	top: calc(100% + 4px);
	left: 0;
	right: 0;
	z-index: 30;
	max-height: 15rem;
	margin: 0;
	padding: 0.3rem;
	overflow-y: auto;
	list-style: none;
	background: #fff;
	border: 1px solid var(--fs-line);
	border-radius: 10px;
	/* Not the theme's list indentation. */
	text-indent: 0;
	box-shadow: 0 12px 28px rgba(16, 42, 22, .16);
}

/* The theme puts a 25px bottom margin on every <li>, which turned a compact
   list of airports into a column of widely spaced rows. Two classes and the
   element beat it. */
.leaf-fs .leaf-fs__options li.leaf-fs__option {
	margin: 0;
	padding: 0.5rem 0.7rem;
	border-radius: 6px;
	font-size: 0.9375rem;
	line-height: 1.35;
	color: var(--fs-ink);
	cursor: pointer;
	list-style: none;
}

.leaf-fs .leaf-fs__options li.leaf-fs__option:hover,
.leaf-fs .leaf-fs__options li.leaf-fs__option.is-active {
	background: var(--fs-green-soft);
	color: var(--fs-green-dark);
}

/* ---------------------------------------------------------------- dates */

/*
 * A native date input is the right control - it brings the platform's own
 * picker and its keyboard handling - but Chrome renders the placeholder as a
 * grey "mm/dd/yyyy" and hides the calendar button until hover, so the two date
 * fields did not look like each other or like the fields beside them.
 *
 * The picker button is given a consistent calendar icon and made permanently
 * visible, which is also a larger, more obvious target.
 */
.leaf-fs__field input[type="date"] {
	position: relative;
	padding-right: 0.6rem;
}

.leaf-fs__field input[type="date"]::-webkit-calendar-picker-indicator {
	width: 1.15rem;
	height: 1.15rem;
	margin: 0;
	padding: 0;
	opacity: 1;
	cursor: pointer;
	background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23218035' stroke-width='1.8' stroke-linecap='round'%3E%3Crect x='3' y='5' width='18' height='16' rx='2'/%3E%3Cpath d='M8 3v4M16 3v4M3 10h18'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: center;
	background-size: contain;
}

.leaf-fs__field input[type="date"]:disabled::-webkit-calendar-picker-indicator {
	opacity: .35;
	cursor: not-allowed;
}

/* Chrome shows the unfilled date as literal "mm/dd/yyyy" in the same weight as
   a real value. Muting it makes an empty field read as empty. */
.leaf-fs__field input[type="date"]:not(:focus):in-range::-webkit-datetime-edit-year-field,
.leaf-fs__field input[type="date"]:not(:focus):in-range::-webkit-datetime-edit-month-field,
.leaf-fs__field input[type="date"]:not(:focus):in-range::-webkit-datetime-edit-day-field,
.leaf-fs__field input[type="date"]:not(:focus):in-range::-webkit-datetime-edit-text {
	color: var(--fs-ink);
}

.leaf-fs__field input[type="date"]:invalid::-webkit-datetime-edit,
.leaf-fs__field input[type="date"]:disabled::-webkit-datetime-edit {
	color: #a4a9b0;
}

/* ------------------------------------------------------------------ swap */

.leaf-fs__swap {
	width: 2.25rem;
	height: 2.25rem;
	margin-bottom: 0.3rem;
	padding: 0;
	border: 1px solid var(--fs-line);
	border-radius: 50%;
	background: var(--fs-green-soft);
	color: var(--fs-green-dark);
	cursor: pointer;
	display: grid;
	place-items: center;
	transition: background-color .15s ease, color .15s ease;
}

.leaf-fs__swap:hover {
	background: var(--fs-green);
	color: #fff;
}

.leaf-fs__swap svg { width: 1.1rem; height: 1.1rem; }

/* ---------------------------------------------------------------- submit */

.leaf-fs__submit {
	min-width: 8.5rem;
	height: 2.875rem;
	padding: 0 1.5rem;
	border: 0;
	border-radius: 8px;
	background: var(--fs-green);
	color: #fff;
	font-size: 0.9375rem;
	font-weight: 600;
	font-family: inherit;
	cursor: pointer;
	transition: background-color .15s ease;
}

.leaf-fs__submit:hover { background: var(--fs-green-dark); }

/* ------------------------------------------------------- error and note */

/* #a3231b is 5.6:1 on white, so the message is readable rather than merely
   red. */
.leaf-fs__error {
	margin: 0.85rem 0 0;
	font-size: 0.875rem;
	font-weight: 500;
	color: #a3231b;
}

.leaf-fs__note {
	margin: 0.85rem 0 0;
	font-size: 0.8125rem;
	color: var(--fs-label);
}

/* ------------------------------------------------------------ responsive */

/* Nine controls will not sit on one line below about 1200px. */
@media (max-width: 1200px) {

	.leaf-fs__fields {
		grid-template-columns: repeat(4, minmax(0, 1fr));
	}

	.leaf-fs__swap {
		justify-self: center;
	}

	.leaf-fs__submit {
		grid-column: 1 / -1;
		width: 100%;
	}
}

@media (max-width: 782px) {

	.leaf-fs {
		padding-bottom: 1.5rem;
	}

	.leaf-fs__fields {
		grid-template-columns: 1fr 1fr;
		gap: 0.7rem;
	}

	/* The swap control belongs between the two places it swaps, and those are
	   stacked here, so it becomes a row of its own turned on its side. */
	.leaf-fs__swap {
		grid-column: 1 / -1;
		justify-self: start;
		transform: rotate(90deg);
	}

	.leaf-fs__field--place { grid-column: 1 / -1; }

	.leaf-fs .leaf-fs__inner h2.leaf-fs__tab {
		width: 100%;
		justify-content: center;
	}

	.leaf-fs__card { border-radius: 0 0 12px 12px; }

	.leaf-fs__trip { gap: 1.25rem; }
}
