/**
 * Flight Assistant VF — [vf_search] shortcode styling.
 * Scoped entirely under .flight-assistant-vf-search so it cannot leak into theme/Elementor styles.
 */

.flight-assistant-vf-search {
	max-width: 640px;
	width: 100%;
	box-sizing: border-box;
}

.flight-assistant-vf-search *,
.flight-assistant-vf-search *::before,
.flight-assistant-vf-search *::after {
	box-sizing: inherit;
}

.flight-assistant-vf-search__form {
	position: relative;
}

.flight-assistant-vf-search__input {
	height: 45px!important;
	display: block;
	width: 100%!important;
	/* Right padding reserved for the circular submit button (45px wide + 6px offset from the
	   edge), which overlaps the input's edge rather than sitting beside it (see __button below). */
	padding: 12px 60px 12px 15px!important;
	font-size: 15px!important;
	font-family: 'poppins', Arial, sans-serif!important;
	line-height: 1.4!important;
	border: 1px solid #000!important;
	border-radius: 0px!important;
	background: #fff!important;
	color: #4f4f4f!important;
}

.flight-assistant-vf-search__input::placeholder {
	color: #7d7d7d;
}

.flight-assistant-vf-search__button {
	position: absolute;
	top: 50%;
	right: 6px;
	transform: translateY(-50%);
	display: flex;
	align-items: center;
	justify-content: center;
	width: 30px;
	height: 30px;
	padding: 0;
	border: none;
	border-radius: 50%;
	background: #fff!important;
	color: #000!important;
	cursor: pointer;
}

.flight-assistant-vf-search__button:hover {
	background: #000!important;
	color: #fff!important;
}

.flight-assistant-vf-search__button:disabled {
	opacity: 0.6;
	cursor: not-allowed;
}

.flight-assistant-vf-search__status {
	margin: 6px 0 0;
	font-size: 14px;
	color: #fff;
	min-height: 1em; /* avoids a layout jump when the message appears/disappears */
}

.flight-assistant-vf-search__chips {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	margin-top: 14px;
}

.flight-assistant-vf-search__chip {
	padding: 4px 10px;
	font-family: "Poppins", Arial, sans-serif;
	font-size: 12px;
	line-height: 1.4;
	border: 1px solid #000;
	border-radius: 999px;
	background: transparent!important;
	color: #000!important;
	cursor: pointer;
}

.flight-assistant-vf-search__chip:hover {
	background: #000!important;
	color: #fff!important;
}

.flight-assistant-vf-search__input:focus-visible,
.flight-assistant-vf-search__button:focus-visible,
.flight-assistant-vf-search__chip:focus-visible {
	outline: 2px solid #2563eb;
	outline-offset: 2px;
}

@media (max-width: 480px) {
	.flight-assistant-vf-search__input {
		/* Must repeat !important here: a later rule without it would lose to the base rule above
		   regardless of this media query, since !important always wins over source order. */
		height: 48px!important;
		font-size: 16px!important; /* staying >=16px keeps iOS Safari from auto-zooming on focus */
		padding: 10px 56px 10px 16px!important;
	}

	/* Button itself is left at its full 45px size on purpose — it's already a touch target and
	   shrinking it on mobile would make it harder to tap, not easier. */

	.flight-assistant-vf-search__chips {
		gap: 8px;
	}

	.flight-assistant-vf-search__chip {
		padding: 6px 12px;
		font-size: 14px;
	}
}

/* Scoped fallback so the submit button's accessible name (its visually-hidden label) doesn't
   silently depend on the active theme providing a correct .screen-reader-text utility class. */
.flight-assistant-vf-search .screen-reader-text {
	position: absolute !important;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

/* Progressive chip reveal (opt-in via the vf_search progressive_chips="true" attribute). Chips
   only ever go hidden -> revealed, never back, so no hide-transition/delay is needed. */
.flight-assistant-vf-search--progressive .flight-assistant-vf-search__chip {
	opacity: 0;
	visibility: hidden;
	transform: translateY(4px);
	pointer-events: none;
	transition: opacity 1s ease, transform 1s ease, visibility 0s;
}

.flight-assistant-vf-search--progressive.flight-assistant-vf-search--revealed .flight-assistant-vf-search__chip {
	opacity: 1;
	visibility: visible;
	transform: translateY(0);
	pointer-events: auto;
}

/* Stagger delays, capped at MAX_CHIPS (6). */
.flight-assistant-vf-search--progressive.flight-assistant-vf-search--revealed .flight-assistant-vf-search__chip:nth-child(1) { transition-delay: 100ms; }
.flight-assistant-vf-search--progressive.flight-assistant-vf-search--revealed .flight-assistant-vf-search__chip:nth-child(2) { transition-delay: 300ms; }
.flight-assistant-vf-search--progressive.flight-assistant-vf-search--revealed .flight-assistant-vf-search__chip:nth-child(3) { transition-delay: 500ms; }
.flight-assistant-vf-search--progressive.flight-assistant-vf-search--revealed .flight-assistant-vf-search__chip:nth-child(4) { transition-delay: 700ms; }
.flight-assistant-vf-search--progressive.flight-assistant-vf-search--revealed .flight-assistant-vf-search__chip:nth-child(5) { transition-delay: 900ms; }
.flight-assistant-vf-search--progressive.flight-assistant-vf-search--revealed .flight-assistant-vf-search__chip:nth-child(6) { transition-delay: 1100ms; }

@media (prefers-reduced-motion: reduce) {
	.flight-assistant-vf-search--progressive .flight-assistant-vf-search__chip {
		transition: none;
	}
}
