/* ASL Edits – front-end fixes. Task IDs refer to the "ASL Suggestions & Solutions" document. */

/* ---------- W1: reserve the booking widget height (no layout shift while it loads) ---------- */
.asl-sc-wrap { min-height: var(--asl-sc-h-desktop, 370px); }
@media (max-width: 1024px) { .asl-sc-wrap { min-height: var(--asl-sc-h-tablet, 440px); } }
@media (max-width: 767px)  { .asl-sc-wrap { min-height: var(--asl-sc-h-mobile, 585px); } }

/* ---------- Widget fixes (only when enabled in settings) ---------- */

/* W5: readable field labels (was #CCDAE8 on white, ~1.4:1). #4A6584 on white ≈ 6:1. */
.asl-widget-fixes #SearchCriterias .form-input_label,
.asl-widget-fixes #SearchCriterias .form-input > label:not(.button--switch),
.asl-widget-fixes #SearchCriterias label.any-date,
.asl-widget-fixes #SearchCriterias .other-settings label {
	color: #4a6584 !important;
	opacity: 1 !important;
}

/* W6: visible keyboard focus (the original embed removed it). */
.asl-widget-fixes #SearchCriterias :focus-visible {
	outline: 2px solid #72cdf4 !important;
	outline-offset: 2px;
}
/* Text/readonly inputs always match :focus-visible, so a ring around the bare input
   looked broken on every click. Show focus on the whole field box instead. */
.asl-widget-fixes #SearchCriterias .form-input .form-control:focus,
.asl-widget-fixes #SearchCriterias .form-input .form-control:focus-visible,
.asl-widget-fixes #SearchCriterias .form-input input[type="text"]:focus-visible {
	outline: none !important;
	box-shadow: none !important;
}
.asl-widget-fixes #SearchCriterias .form-input:focus-within {
	box-shadow: inset 0 0 0 2px #72cdf4 !important;
	border-radius: 4px;
}

/* Return date: the "OPEN" toggle sat on top of the "Retour" label. */
.asl-widget-fixes #SearchCriterias .date-range-to .button--switch {
	left: auto !important;
	right: 0 !important;
}

/* Passengers popup: "flexible dates" icon. The label is text-transform: capitalize,
   which broke the Material Icons ligatures (they rendered as letters over the text). */
.asl-widget-fixes #SearchCriterias .other-settings > label::before,
.asl-widget-fixes #SearchCriterias .other-settings > label::after {
	text-transform: none !important;
	font-feature-settings: "liga" !important;
	line-height: 1 !important;
}
.asl-widget-fixes #SearchCriterias .passengers-popup .other-settings:not(.currency) > label {
	padding-left: 28px !important;
}

/* Dropdown buttons (currency, discount type): the Hello theme's global button styles
   (pink #c36 text, coloured background on hover/focus) leaked into the widget. */
.asl-widget-fixes #SearchCriterias .btn-select,
.asl-widget-fixes #SearchCriterias .btn-select:hover,
.asl-widget-fixes #SearchCriterias .btn-select:focus,
.asl-widget-fixes #SearchCriterias .btn-select:active {
	background: transparent !important;
	border: 0 !important;
	box-shadow: none !important;
	color: #00488c !important;
}
.asl-widget-fixes #SearchCriterias .btn-select .font-weight-bold,
.asl-widget-fixes #SearchCriterias .btn-select .material-icons,
.asl-widget-fixes #SearchCriterias .travelers-select .c-icon {
	color: #00488c !important;
}
.asl-widget-fixes #SearchCriterias .btn-select:focus-visible {
	outline: 2px solid #00488c !important;
	outline-offset: 2px;
}
/* Dropdown lists: inherited 21 px text → 14 px, brand colours. */
.asl-widget-fixes #SearchCriterias .dropdown-list-popup a {
	display: block;
	padding: 8px 12px !important;
	font-size: 14px !important;
	line-height: 1.4 !important;
	color: #00488c !important;
	text-decoration: none !important;
	background: #fff !important;
}
.asl-widget-fixes #SearchCriterias .dropdown-list-popup a:hover,
.asl-widget-fixes #SearchCriterias .dropdown-list-popup a:focus {
	background: #e8f0f8 !important;
	color: #00488c !important;
}

@media (max-width: 767px) {
	/* W3: text inputs below 16 px make iOS zoom in on focus (radios/checkboxes excluded). */
	.asl-widget-fixes #SearchCriterias input:not([type="radio"]):not([type="checkbox"]),
	.asl-widget-fixes #SearchCriterias select,
	.asl-widget-fixes #SearchCriterias textarea {
		font-size: 16px !important;
	}

	/* Slightly less inner padding so fields and the trip type have room (20 px → 12 px). */
	.asl-widget-fixes #SearchCriterias .searchbar-main_tab-content_pane {
		padding-left: 12px !important;
		padding-right: 12px !important;
	}

	/* W7: trip type (one-way / return / multi-city) on a single line. Text stays at 12 px (legible). */
	.asl-widget-fixes #SearchCriterias .search .tab-pane_options-container fieldset {
		display: flex !important;
		flex-wrap: nowrap !important;
		justify-content: space-between !important;
		gap: 4px !important;
		width: 100% !important;
		min-width: 0 !important; /* fieldsets default to min-content width */
		margin: 0 !important;
		padding: 0 2px !important;
		border: 0 !important;
	}
	.asl-widget-fixes #SearchCriterias .search .tab-pane_options-container .form-checkbox--button {
		margin: 0 !important;
		padding: 0 !important;
		flex: 0 1 auto !important;
		min-width: 0;
	}
	.asl-widget-fixes #SearchCriterias .tab-pane_options-container label {
		display: flex !important;
		align-items: center;
		gap: 4px !important;
		min-height: 24px; /* tap target: the whole label is clickable */
		margin: 0 !important;
		padding: 4px 0 !important;
		font-size: 12px !important;
		white-space: nowrap;
	}
	.asl-widget-fixes #SearchCriterias .tab-pane_options-container label span {
		font-size: 12px !important;
		margin: 0 !important;
		padding: 0 !important;
	}
	.asl-widget-fixes #SearchCriterias .tab-pane_options-container input[type="radio"] {
		width: 14px !important;
		height: 14px !important;
		margin: 0 !important;
		flex: 0 0 14px !important;
	}

	/* Manage-booking tab: the two options were touching. */
	.asl-widget-fixes #SearchCriterias .check-in .tab-pane_options-container {
		display: flex !important;
		flex-wrap: wrap;
		justify-content: center;
		gap: 8px 24px !important;
	}

	/* W12: calendar as a centred modal. The wrapper becomes a full-screen backdrop that
	   blocks the page until dates are picked. Only while it holds the calendar: the
	   wrapper keeps .is-interactive, empty, after closing. Popper's inline position is overridden. */
	.asl-widget-fixes #SearchCriterias .form-input.dates > div > .vc-popover-content-wrapper.is-interactive:has(> .vc-popover-content:not(.vc-slide-fade-leave-active)) {
		position: fixed !important;
		inset: 0 !important;
		transform: none !important;
		margin: 0 !important;
		width: 100% !important;
		max-width: 100% !important;
		height: 100% !important;
		height: 100dvh !important;
		display: flex !important;
		align-items: center;
		justify-content: center;
		padding: 16px !important;
		box-sizing: border-box;
		background: rgba(0, 20, 50, .55) !important;
		z-index: 100001 !important;
		overscroll-behavior: contain;
		touch-action: none;
	}
	.asl-widget-fixes #SearchCriterias .form-input.dates > div > .vc-popover-content-wrapper.is-interactive > .vc-popover-content {
		width: 100% !important;
		max-width: 420px !important;
		max-height: 100% !important;
		flex-direction: column !important;
		overflow: auto;
		border: 0 !important;
		border-radius: 16px !important;
		padding: 16px 8px !important;
		box-shadow: 0 12px 40px rgba(0, 20, 50, .35) !important;
		touch-action: auto;
	}
	.asl-widget-fixes #SearchCriterias .form-input.dates > div > .vc-popover-content-wrapper.is-interactive .vc-popover-caret {
		display: none !important;
	}
	.asl-widget-fixes #SearchCriterias .form-input.dates > div > .vc-popover-content-wrapper.is-interactive .vc-container {
		width: 100% !important;
		max-width: 100% !important;
		border: 0 !important;
	}
	/* Bigger tap targets (were 28 px). */
	.asl-widget-fixes #SearchCriterias .form-input.dates .vc-popover-content .vc-weeks .vc-day {
		min-height: 44px !important;
	}
	.asl-widget-fixes #SearchCriterias .form-input.dates .vc-popover-content .vc-weeks .vc-day-content {
		width: 40px !important;
		height: 40px !important;
		font-size: 15px !important;
	}
	.asl-widget-fixes #SearchCriterias .form-input.dates .vc-popover-content .vc-weeks .vc-highlight {
		height: 40px !important;
	}
	.asl-widget-fixes #SearchCriterias .form-input.dates .vc-popover-content .vc-weeks .vc-highlight:not(.vc-highlight-base-start):not(.vc-highlight-base-middle):not(.vc-highlight-base-end) {
		width: 40px !important;
	}
	.asl-widget-fixes #SearchCriterias .form-input.dates .vc-popover-content .vc-title {
		font-size: 17px !important;
	}
	/* Close button added by asl-edits.js under the legend. */
	.asl-widget-fixes #SearchCriterias .vc-popover-content .asl-cal-close {
		display: block !important;
		width: 100% !important;
		min-height: 44px;
		margin: 8px 0 0 !important;
		padding: 10px !important;
		background: transparent !important;
		border: 0 !important;
		border-top: 1px solid #e3e9f0 !important;
		border-radius: 0 !important;
		color: #00488c !important;
		font-size: 15px !important;
		font-weight: 600 !important;
		line-height: 1.2 !important;
		font-family: inherit !important;
		text-decoration: underline;
		cursor: pointer;
	}
	.asl-widget-fixes #SearchCriterias .vc-popover-content .asl-cal-close:focus-visible {
		outline: 2px solid #72cdf4 !important;
		outline-offset: -2px;
	}
	/* No page scroll behind the open calendar. */
	html:has(.asl-widget-fixes #SearchCriterias .form-input.dates > div > .vc-popover-content-wrapper.is-interactive > .vc-popover-content:not(.vc-slide-fade-leave-active)),
	html:has(.asl-widget-fixes #SearchCriterias .form-input.dates > div > .vc-popover-content-wrapper.is-interactive > .vc-popover-content:not(.vc-slide-fade-leave-active)) body {
		overflow: hidden !important;
	}

	/* W10: more room for airport names, while keeping text clear of the swap button
	   (the button overlaps each field by ~16 px). */
	.asl-widget-fixes #SearchCriterias .form-input.origin {
		padding-left: 12px !important;
		padding-right: 24px !important;
	}
	.asl-widget-fixes #SearchCriterias .form-input.destination {
		padding-left: 26px !important;
		padding-right: 10px !important;
	}
	.asl-widget-fixes #SearchCriterias .switch-airports {
		width: 32px !important;
		height: 32px !important;
		min-width: 32px;
	}

	/* W4: widget popups (passengers, cities, calendar) above the sticky header. */
	.asl-widget-fixes #SearchCriterias .searchbar-popup {
		z-index: 100000 !important;
	}
}

/* Tabs fix: the vendor CSS gives .searchbar-main_tabs z-index:-1 on mobile, so the tabs fell
   behind the page (hidden on the homepage, covered and not clickable on category pages) once
   no ancestor created a stacking context. Isolating the search bar keeps them inside it. */
#SearchCriterias .searchbar-main {
	isolation: isolate; /* Not tied to "Widget CSS fixes": needed whenever entrance animations are off. */
}

/* Tab labels ("VOLS" / "VOTRE RÉSERVATION") fit their tabs on small phones.
   The ID is doubled to beat the vendor's own !important rules. */
@media (max-width: 767px) {
	.asl-widget-fixes #SearchCriterias#SearchCriterias .searchbar-main_tabs .searchbar-main_tabs_tab .tab {
		padding-left: 6px !important;
		padding-right: 6px !important;
	}
	.asl-widget-fixes #SearchCriterias#SearchCriterias .searchbar-main_tabs .tab .tab-name {
		font-size: 11px !important;
	}
}
@media (max-width: 359px) {
	/* No room for the tab icons below 360 px. */
	.asl-widget-fixes #SearchCriterias#SearchCriterias .searchbar-main_tabs .tab p::before {
		display: none !important;
	}
}

/* W8: promo code collapsed behind a link (JS adds the classes, ≤ 1024 px). */
@media (max-width: 1024px) {
	#SearchCriterias.asl-promo-collapsed .additional-elements .other-settings { display: none !important; }
}
#SearchCriterias .asl-promo-toggle {
	display: none !important;
	width: auto !important;
	min-height: 0 !important;
	margin: 0 !important;
	padding: 8px 0 !important;
	border: 0 !important;
	border-radius: 0 !important;
	background: none !important;
	box-shadow: none !important;
	color: #fff !important;
	font-family: inherit !important;
	font-size: 14px !important;
	font-weight: 500 !important;
	text-decoration: underline !important;
	text-underline-offset: 3px;
	cursor: pointer;
}
#SearchCriterias .asl-promo-toggle:hover,
#SearchCriterias .asl-promo-toggle:focus { color: #72cdf4 !important; background: none !important; }
@media (max-width: 1024px) {
	#SearchCriterias.asl-promo-collapsed .asl-promo-toggle { display: inline-block !important; }
}
/* Promo code box: label sat directly on the input and the input's focus ring overlapped it. */
.asl-widget-fixes #SearchCriterias .additional-elements .other-settings {
	gap: 8px !important;
}
.asl-widget-fixes #SearchCriterias .additional-elements .other-settings label {
	line-height: 1.3 !important;
	margin: 0 !important;
}
.asl-widget-fixes #SearchCriterias .additional-elements .other-settings input,
.asl-widget-fixes #SearchCriterias .additional-elements .other-settings input:focus-visible {
	outline: none !important;
}
.asl-widget-fixes #SearchCriterias .additional-elements .other-settings:focus-within {
	box-shadow: inset 0 0 0 2px #72cdf4 !important;
}
/* Desktop: keep the promo label on one line. */
@media (min-width: 1025px) {
	.asl-widget-fixes #SearchCriterias .other-settings label { white-space: nowrap; }
}

/* ---------- Sticky booking bar (L5 / R2) – overlay, so it never shifts content ---------- */
.asl-sticky-book {
	position: fixed;
	left: 0;
	right: 0;
	bottom: 0;
	z-index: 9990;
	display: none;
	padding: 10px 16px calc(10px + env(safe-area-inset-bottom));
	background: #fff;
	box-shadow: 0 -4px 16px rgba(0, 20, 50, .12);
	transform: translateY(110%);
	transition: transform .25s ease;
}
.asl-sticky-book.is-visible { transform: translateY(0); }
/* Same look as the site's Elementor buttons (global kit: accent background,
   secondary text, Poppins 13px bold, pill shape; hover = secondary background, white text).
   Selectors are doubled so Hello Elementor's pink button reset can't win. */
.asl-sticky-book .asl-sticky-book__btn.asl-sticky-book__btn {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	min-height: 48px;
	margin: 0;
	padding: 14px 24px;
	border: 0;
	border-radius: 100px;
	background-color: var(--e-global-color-accent, #72cdf4);
	color: var(--e-global-color-secondary, #00488c);
	font-family: var(--e-global-typography-accent-font-family, "Poppins"), sans-serif;
	font-size: var(--e-global-typography-accent-font-size, 13px);
	font-weight: var(--e-global-typography-accent-font-weight, 700);
	line-height: 1;
	text-transform: none;
	text-decoration: none;
	text-align: center;
	box-shadow: none;
	cursor: pointer;
	transition: background-color .3s, color .3s;
}
.asl-sticky-book .asl-sticky-book__btn.asl-sticky-book__btn:hover,
.asl-sticky-book .asl-sticky-book__btn.asl-sticky-book__btn:focus {
	background-color: var(--e-global-color-secondary, #00488c);
	color: #fff;
}
.asl-sticky-book .asl-sticky-book__btn.asl-sticky-book__btn:focus-visible {
	outline: 2px solid var(--e-global-color-secondary, #00488c);
	outline-offset: 2px;
}
@media (max-width: 1024px) {
	.asl-has-sticky-book .asl-sticky-book { display: block; }
	.asl-has-sticky-book footer,
	.asl-has-sticky-book .elementor-location-footer { padding-bottom: 72px; }
}
@media (prefers-reduced-motion: reduce) {
	.asl-sticky-book { transition: none; }
}
/* W11: keep the chat bubble and reCAPTCHA badge above the sticky bar while it is visible. */
@media (max-width: 1024px) {
	.asl-sticky-visible .elementor-element.elementor-fixed:not(.header_main),
	.asl-sticky-visible .grecaptcha-badge {
		transform: translateY(-72px) !important;
		transition: transform .25s ease;
	}
}

/* ---------- H9: no entrance animations on mobile (they delay the first paint of content) ---------- */
@media (max-width: 1024px) {
	.asl-no-entrance-anim .elementor-invisible { visibility: visible !important; }
	.asl-no-entrance-anim .animated { animation: none !important; }
}
