/**
 * Aether Flight Search — frontend (scoped).
 * Production travel-bar layout: From · To · Dates · Travelers · Search.
 */

.aether-fsb {
	--afs-bg: #ffffff;
	--afs-text: #111827;
	--afs-muted: #6b7280;
	--afs-border: #e5e7eb;
	--afs-soft: #f3f4f6;
	--afs-cta: #0f172a;
	--afs-cta-hover: #1e293b;
	--afs-radius-pill: 9999px;
	--afs-radius-card: 14px;
	--afs-shadow: 0 8px 28px rgba(15, 23, 42, 0.1);
	--afs-shadow-lg: 0 16px 48px rgba(15, 23, 42, 0.16);

	box-sizing: border-box;
	color: var(--afs-text);
	font-family: inherit;
	width: 100%;
	max-width: 860px;
	margin: 0 auto;
	position: relative;
	z-index: 20;
	line-height: 1.4;
}

.aether-fsb *,
.aether-fsb *::before,
.aether-fsb *::after {
	box-sizing: border-box;
}

/* Hard reset — protect icons from theme CSS wiping strokes/fills */
.aether-fsb button,
.aether-fsb input,
.aether-fsb select {
	font: inherit;
	color: inherit;
}



.aether-fsb svg {
	display: block !important;
	width: 1em !important;
	height: 1em !important;
	max-width: none !important;
	flex-shrink: 0;
	overflow: visible !important;
	fill: currentColor !important;
	stroke: none !important;
}

.aether-fsb svg[data-stroke] {
	fill: none !important;
	stroke: currentColor !important;
	stroke-width: 1.75 !important;
	stroke-linecap: round !important;
	stroke-linejoin: round !important;
}

.aether-fsb__heading {
	font-size: 1.35rem;
	font-weight: 600;
	margin: 0 0 0.85rem;
	letter-spacing: -0.02em;
}

.aether-fsb__form {
	margin: 0;
	position: relative;
}

/* Trip type */
.aether-fsb__trip-types {
	display: flex;
	align-items: center;
	gap: 0.15rem;
	margin: 0 0 0.65rem;
}

.aether-fsb__trip-type {
	cursor: pointer;
	margin: 0;
}

.aether-fsb__trip-type input {
	position: absolute;
	opacity: 0;
	width: 0;
	height: 0;
	pointer-events: none;
}

.aether-fsb__trip-type span {
	display: inline-block;
	padding: 0.35rem 0.8rem;
	font-size: 0.8125rem;
	font-weight: 500;
	color: var(--afs-muted);
	border-radius: var(--afs-radius-pill);
	transition: 0.15s ease;
}

.aether-fsb__trip-type input:checked + span {
	color: #fff;
	background: var(--afs-cta);
	font-weight: 600;
}

.aether-fsb__trip-type:hover input:not(:checked) + span {
	color: var(--afs-text);
	background: var(--afs-soft);
}

/* ── Search bar ── */
.aether-fsb__bar {
	display: grid;
	grid-template-columns:
		minmax(0, 1.15fr)
		36px
		minmax(0, 1.15fr)
		minmax(168px, 1.05fr)
		minmax(148px, 0.95fr)
		auto;
	align-items: stretch;
	gap: 0;
	min-height: 64px;
	padding: 6px;
	background: var(--afs-bg);
	border: 1px solid var(--afs-border);
	border-radius: 40px;
	box-shadow: var(--afs-shadow);
	overflow: visible;
}

.aether-fsb__field {
	display: flex;
	flex-direction: column;
	justify-content: center;
	gap: 2px;
	min-width: 0;
	padding: 8px 14px;
	position: relative;
	border-radius: 32px;
	transition: background 0.15s ease;
	overflow: visible;
}

.aether-fsb__field:hover {
	background: rgba(243, 244, 246, 0.65);
}

.aether-fsb__field--origin {
	padding-left: 18px;
}

.aether-fsb__field--dates,
.aether-fsb__field--travelers {
	border-left: 1px solid var(--afs-border);
	border-radius: 0;
}

.aether-fsb__field--dates:hover,
.aether-fsb__field--travelers:hover {
	background: rgba(243, 244, 246, 0.65);
}

.aether-fsb__field--submit {
	padding: 0;
	border-radius: 0;
}

.aether-fsb__field--submit:hover {
	background: transparent;
}

.aether-fsb__divider {
	display: none;
}

.aether-fsb__label {
	display: block;
	font-size: 0.625rem;
	font-weight: 700;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: var(--afs-muted);
	line-height: 1.2;
	margin: 0;
}

.aether-fsb__input-wrap {
	position: relative;
	display: block;
	width: 100%;
}

.aether-fsb__input {
	display: block;
	width: 100%;
	appearance: none;
	-webkit-appearance: none;
	border: 0 !important;
	outline: none !important;
	box-shadow: none !important;
	background: transparent !important;
	padding: 0 !important;
	margin: 0;
	font-size: 0.9375rem;
	font-weight: 600;
	color: var(--afs-text);
	line-height: 1.3;
	min-width: 0;
}

.aether-fsb__input::placeholder {
	color: #9ca3af;
	font-weight: 400;
}

/* Swap — high-visibility control */
.aether-fsb__swap {
	align-self: center;
	justify-self: center;
	display: inline-flex !important;
	align-items: center;
	justify-content: center;
	width: 34px;
	height: 34px;
	padding: 0 !important;
	margin: 0;
	border: 1px solid var(--afs-border) !important;
	border-radius: 50% !important;
	background: var(--afs-soft) !important;
	color: var(--afs-cta) !important;
	cursor: pointer;
	z-index: 3;
	transition: background 0.15s ease, transform 0.25s ease, border-color 0.15s ease;
}

.aether-fsb__swap svg {
	width: 15px !important;
	height: 15px !important;
	color: var(--afs-cta) !important;
	fill: currentColor !important;
}

.aether-fsb__swap:hover {
	background: #e5e7eb !important;
	border-color: #d1d5db !important;
	transform: rotate(180deg);
}

/* Field triggers */
.aether-fsb__trigger {
	display: flex;
	align-items: center;
	gap: 8px;
	width: 100%;
	min-width: 0;
	padding: 0 !important;
	margin: 0;
	border: 0 !important;
	border-radius: 0 !important;
	background: transparent !important;
	cursor: pointer;
	text-align: left;
	color: var(--afs-text);
	box-shadow: none !important;
}

.aether-fsb__trigger-icon {
	display: flex;
	align-items: center;
	justify-content: center;
	color: var(--afs-muted);
	flex-shrink: 0;
}

.aether-fsb__trigger-icon svg {
	width: 15px !important;
	height: 15px !important;
}

.aether-fsb__trigger-text {
	flex: 1;
	min-width: 0;
	font-size: 0.9375rem;
	font-weight: 600;
	line-height: 1.3;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.aether-fsb__trigger-text.is-placeholder {
	color: #9ca3af;
	font-weight: 400;
}

.aether-fsb__suggest {
	position: absolute;
	top: calc(100% + 10px);
	left: 0;
	min-width: 240px;
	width: max(100%, 260px);
	z-index: 100;
	margin: 0;
	padding: 6px;
	list-style: none;
	background: #fff;
	border: 1px solid var(--afs-border);
	border-radius: 12px;
	box-shadow: var(--afs-shadow-lg);
	max-height: 240px;
	overflow-y: auto;
}

.aether-fsb__suggest-item {
	display: flex;
	flex-direction: column;
	gap: 1px;
	padding: 10px 12px;
	border-radius: 8px;
	cursor: pointer;
}

.aether-fsb__suggest-item:hover,
.aether-fsb__suggest-item.is-active {
	background: var(--afs-soft);
}

.aether-fsb__suggest-label {
	font-size: 0.875rem;
	font-weight: 600;
}

.aether-fsb__suggest-meta {
	font-size: 0.75rem;
	color: var(--afs-muted);
}

.aether-fsb__submit {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 6px;
	height: 52px;
	padding: 0 22px !important;
	margin: 0;
	border: 0 !important;
	border-radius: var(--afs-radius-pill) !important;
	background: var(--afs-cta) !important;
	color: #fff !important;
	font-size: 0.875rem;
	font-weight: 600;
	cursor: pointer;
	white-space: nowrap;
	box-shadow: none !important;
	transition: background 0.15s ease, transform 0.1s ease;
}

.aether-fsb__submit:hover {
	background: var(--afs-cta-hover) !important;
	color: #fff !important;
}

.aether-fsb__submit:active {
	transform: scale(0.98);
}

.aether-fsb__submit.is-loading {
	opacity: 0.7;
	pointer-events: none;
}

/* ── Popovers ── */
.aether-fsb__popover {
	position: absolute;
	top: calc(100% + 10px);
	z-index: 120;
	background: #fff;
	border: 1px solid var(--afs-border);
	border-radius: 14px;
	box-shadow: var(--afs-shadow-lg);
}

.aether-fsb__popover--calendar {
	left: 50%;
	transform: translateX(-50%);
	width: 456px;
	max-width: calc(100vw - 24px);
	padding: 12px 12px 10px;
}

.aether-fsb__popover--travelers {
	right: 0;
	left: auto;
	width: 280px;
	padding: 14px;
}

.aether-fsb__cal-nav {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 4px;
	margin-bottom: 4px;
}

.aether-fsb__cal-nav-btn {
	display: inline-flex !important;
	align-items: center;
	justify-content: center;
	width: 28px;
	height: 28px;
	padding: 0 !important;
	border: 1px solid var(--afs-border) !important;
	border-radius: 50% !important;
	background: #fff !important;
	color: var(--afs-text) !important;
	cursor: pointer;
	flex-shrink: 0;
}

.aether-fsb__cal-nav-btn svg {
	width: 12px !important;
	height: 12px !important;
	fill: currentColor !important;
}

.aether-fsb__cal-nav-btn:hover {
	background: var(--afs-soft) !important;
}

.aether-fsb__cal-months {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 16px;
	flex: 1;
	min-width: 0;
}

.aether-fsb__cal-month {
	min-width: 0;
}

.aether-fsb__cal-month-title {
	text-align: center;
	font-weight: 600;
	font-size: 0.8125rem;
	margin: 0 0 8px;
	color: var(--afs-text);
}

.aether-fsb__cal-weekdays {
	display: grid;
	grid-template-columns: repeat(7, 1fr);
	margin-bottom: 2px;
	text-align: center;
	font-size: 0.625rem;
	font-weight: 600;
	color: var(--afs-muted);
	text-transform: uppercase;
	letter-spacing: 0.02em;
}

.aether-fsb__cal-weekdays span {
	padding: 2px 0;
}

.aether-fsb__cal-grid {
	display: grid;
	grid-template-columns: repeat(7, 1fr);
	gap: 1px 0;
}

.aether-fsb__cal-day {
	appearance: none;
	-webkit-appearance: none;
	border: 0 !important;
	background: transparent !important;
	width: 100%;
	height: 30px;
	max-width: none;
	margin: 0;
	padding: 0 !important;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 0.75rem;
	font-weight: 500;
	color: var(--afs-text) !important;
	border-radius: 50% !important;
	cursor: pointer;
	line-height: 1;
	box-shadow: none !important;
}

.aether-fsb__cal-day.is-empty {
	pointer-events: none;
	visibility: hidden;
}

.aether-fsb__cal-day.is-disabled {
	color: #d1d5db !important;
	cursor: not-allowed;
}

.aether-fsb__cal-day:not(.is-disabled):not(.is-empty):hover {
	background: var(--afs-soft) !important;
}

.aether-fsb__cal-day.is-today:not(.is-start):not(.is-end) {
	box-shadow: inset 0 0 0 1px #94a3b8 !important;
}

.aether-fsb__cal-day.is-in-range {
	background: #e8edf5 !important;
	border-radius: 0 !important;
	color: var(--afs-text) !important;
}

.aether-fsb__cal-day.is-start,
.aether-fsb__cal-day.is-end {
	background: var(--afs-cta) !important;
	color: #fff !important;
	border-radius: 50% !important;
	font-weight: 600;
}

.aether-fsb__cal-footer {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-top: 10px;
	padding-top: 10px;
	border-top: 1px solid var(--afs-border);
}

.aether-fsb__cal-clear {
	border: 0 !important;
	background: none !important;
	color: var(--afs-muted) !important;
	font-size: 0.8125rem;
	font-weight: 500;
	cursor: pointer;
	text-decoration: underline;
	text-underline-offset: 2px;
	padding: 4px 0 !important;
	border-radius: 0 !important;
	box-shadow: none !important;
}

.aether-fsb__cal-clear:hover {
	color: var(--afs-text) !important;
}

.aether-fsb__cal-done {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 8px 16px !important;
	border: 0 !important;
	border-radius: var(--afs-radius-pill) !important;
	background: var(--afs-cta) !important;
	color: #fff !important;
	font-size: 0.8125rem;
	font-weight: 600;
	cursor: pointer;
	box-shadow: none !important;
}

.aether-fsb__cal-done:hover {
	background: var(--afs-cta-hover) !important;
}

/* Travelers popover */
.aether-fsb__stepper-row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	margin-bottom: 14px;
}

.aether-fsb__stepper-title {
	display: block;
	font-weight: 600;
	font-size: 0.875rem;
}

.aether-fsb__stepper-hint {
	display: block;
	font-size: 0.75rem;
	color: var(--afs-muted);
	margin-top: 1px;
}

.aether-fsb__stepper {
	display: flex;
	align-items: center;
	gap: 10px;
}

.aether-fsb__stepper-btn {
	width: 30px;
	height: 30px;
	border: 1px solid var(--afs-border) !important;
	border-radius: 50% !important;
	background: #fff !important;
	font-size: 1rem;
	line-height: 1;
	cursor: pointer;
	color: var(--afs-text) !important;
	padding: 0 !important;
}

.aether-fsb__stepper-btn:hover {
	background: var(--afs-soft) !important;
}

.aether-fsb__stepper-val {
	min-width: 1.1rem;
	text-align: center;
	font-weight: 600;
	font-size: 0.9375rem;
}

.aether-fsb__cabin-block {
	margin-bottom: 12px;
}

.aether-fsb__cabin-block .aether-fsb__stepper-title {
	margin-bottom: 8px;
}

.aether-fsb__cabin-pills {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
}

.aether-fsb__cabin-pill {
	padding: 6px 10px !important;
	border: 1px solid var(--afs-border) !important;
	border-radius: var(--afs-radius-pill) !important;
	background: #fff !important;
	font-size: 0.75rem;
	font-weight: 500;
	cursor: pointer;
	color: var(--afs-text) !important;
}

.aether-fsb__cabin-pill.is-active {
	background: var(--afs-cta) !important;
	border-color: var(--afs-cta) !important;
	color: #fff !important;
}

.aether-fsb__popover--travelers .aether-fsb__cal-done {
	width: 100%;
}

.aether-fsb__form-error {
	margin: 10px 0 0;
	padding: 10px 12px;
	border-radius: 10px;
	background: #fef2f2;
	color: #991b1b;
	font-size: 0.875rem;
}

/* Results */
.aether-fsb__results {
	margin-top: 1.5rem;
}

.aether-fsb__results-header {
	margin-bottom: 0.85rem;
}

.aether-fsb__results-title {
	margin: 0 0 0.25rem;
	font-size: 1.15rem;
	font-weight: 600;
	letter-spacing: -0.01em;
}

.aether-fsb__results-summary {
	margin: 0;
	color: var(--afs-muted);
	font-size: 0.875rem;
}

.aether-fsb__empty {
	padding: 1.25rem;
	text-align: center;
	color: var(--afs-muted);
	background: #f8fafc;
	border-radius: var(--afs-radius-card);
}

.aether-fsb__cards {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 10px;
}

.aether-fsb__card {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	padding: 14px 16px;
	background: var(--afs-bg);
	border: 1px solid var(--afs-border);
	border-radius: var(--afs-radius-card);
	box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
	transition: box-shadow 0.15s ease, border-color 0.15s ease;
}

.aether-fsb__card:hover {
	box-shadow: var(--afs-shadow);
	border-color: #d1d5db;
}

.aether-fsb__card--unavailable {
	opacity: 0.85;
}

.aether-fsb__card-brand {
	display: flex;
	align-items: center;
	gap: 12px;
	min-width: 0;
}

.aether-fsb__card-logo {
	width: 44px;
	height: 44px;
	object-fit: contain;
	border-radius: 10px;
	background: #f8fafc;
	border: 1px solid var(--afs-border);
	padding: 5px;
	flex-shrink: 0;
}

.aether-fsb__card-fallback {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	border-radius: 9999px;
	background: var(--afs-cta);
	color: #fff;
	font-size: 0.75rem;
	font-weight: 700;
	flex-shrink: 0;
}

.aether-fsb__card-meta {
	display: flex;
	flex-direction: column;
	gap: 2px;
	min-width: 0;
}

.aether-fsb__card-name {
	font-weight: 600;
	font-size: 0.9375rem;
}

.aether-fsb__card-route {
	font-size: 0.8125rem;
	color: var(--afs-muted);
}

.aether-fsb__card-action {
	flex-shrink: 0;
}

.aether-fsb__book {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 10px 16px !important;
	border-radius: var(--afs-radius-pill) !important;
	background: var(--afs-cta);
	color: #fff !important;
	text-decoration: none !important;
	font-size: 0.875rem;
	font-weight: 600;
	transition: background 0.15s ease;
}

.aether-fsb__book:hover {
	background: var(--afs-cta-hover);
	color: #fff !important;
}

.aether-fsb__unavailable {
	display: inline-block;
	padding: 8px 12px;
	border-radius: var(--afs-radius-pill);
	background: #f1f5f9;
	color: var(--afs-muted);
	font-size: 0.8125rem;
	font-weight: 500;
}

@media (max-width: 760px) {
	.aether-fsb {
		max-width: 100%;
	}

	.aether-fsb__bar {
		display: flex;
		flex-direction: column;
		border-radius: 16px;
		padding: 8px;
		gap: 0;
	}

	.aether-fsb__field {
		width: 100%;
		padding: 12px 14px;
		border-radius: 10px;
	}

	.aether-fsb__field--dates,
	.aether-fsb__field--travelers {
		border-left: 0;
		border-top: 1px solid var(--afs-border);
		border-radius: 0;
	}

	.aether-fsb__swap {
		margin: 4px auto;
	}

	.aether-fsb__field--submit {
		width: 100%;
		padding-top: 8px;
	}

	.aether-fsb__submit {
		width: 100%;
		height: 48px;
	}

	.aether-fsb__popover--calendar {
		left: 0;
		right: 0;
		transform: none;
		width: auto;
		padding: 12px;
	}

	.aether-fsb__cal-months {
		grid-template-columns: 1fr;
		gap: 14px;
	}

	.aether-fsb__cal-month:last-child {
		display: none;
	}

	.aether-fsb__popover--travelers {
		left: 0;
		right: 0;
		width: auto;
	}

	.aether-fsb__card {
		flex-direction: column;
		align-items: flex-start;
	}

	.aether-fsb__card-action,
	.aether-fsb__book,
	.aether-fsb__unavailable {
		width: 100%;
		justify-content: center;
		text-align: center;
	}
}
