/* H-Lead Form Field — location autocomplete, date-time picker, age dropdown,
 * passengers/luggage steppers, search form. Verified against Figma
 * input-location / input-date-time / input-age / input-passengers /
 * input-luggage / input-search-form (Styleguide > Components). */

.hl-field {
	position: relative;
	display: flex;
	flex-direction: column;
	gap: var(--hl-space-4);
	font-family: var(--hl-font-family);
}

/* Label: 14/20 Medium #17181a */
.hl-field__label {
	font-size: var(--hl-form-label-size);
	line-height: var(--hl-form-label-line-height);
	font-weight: var(--hl-font-weight-medium);
	color: var(--hl-color-text-primary);
}

/* Input box: 48px tall, padding 12, radius 8, 1px #c6c8cc, white */
.hl-field__box {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: var(--hl-space-10, 10px);
	box-sizing: border-box;
	width: 100%;
	min-height: var(--hl-space-48);
	padding: var(--hl-space-12);
	border: 1px solid var(--hl-color-form-stroke);
	border-radius: var(--hl-radius-8);
	background-color: var(--hl-color-form-surface);
	transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

/* Beat theme/Elementor button + input element styles */
.hl-field button.hl-field__box,
.hl-field button.hl-field__box:hover,
.hl-field button.hl-field__box:focus {
	cursor: pointer;
	text-align: left;
	font-family: var(--hl-font-family);
	background-color: var(--hl-color-form-surface);
	border: 1px solid var(--hl-color-form-stroke);
	color: var(--hl-color-brand-900);
}

.hl-field--disabled button.hl-field__box,
.hl-field--disabled button.hl-field__box:hover {
	border-color: var(--hl-color-grey-100);
	background-color: var(--hl-color-form-surface);
}

.hl-field .hl-field__input,
.hl-field .hl-field__input:focus {
	width: 100%;
	min-height: 0;
	border: none;
	outline: none;
	box-shadow: none;
	background: transparent;
	padding: 0;
	font-family: var(--hl-font-family);
	font-size: var(--hl-form-input-size);
	line-height: var(--hl-form-input-line-height);
	font-weight: var(--hl-font-weight-regular);
	color: var(--hl-color-brand-900);
}

.hl-field__input::placeholder {
	color: var(--hl-color-form-content-default);
	font-weight: var(--hl-font-weight-regular);
	opacity: 1;
}

/* Filled: SemiBold #00090d */
.hl-field__input:not(:placeholder-shown) {
	font-weight: var(--hl-font-weight-semibold);
	color: var(--hl-color-brand-900);
}

/* Focus ring: 2px #99abb2 */
.hl-field__box:focus-within,
button.hl-field__box:focus-visible,
.hl-field--open .hl-field__box {
	outline: none;
	box-shadow: 0 0 0 var(--hl-space-2) var(--hl-color-brand-200);
}

/* Disabled: stroke + content #e3e4e6 */
.hl-field--disabled .hl-field__box,
.hl-field__box:has(.hl-field__input:disabled) {
	border-color: var(--hl-color-grey-100);
}

.hl-field--disabled .hl-field__box *,
.hl-field__input:disabled,
.hl-field__input:disabled::placeholder {
	color: var(--hl-color-grey-100);
	cursor: not-allowed;
}

/* Select-style trigger content */
.hl-field__selected {
	font-size: var(--hl-form-input-size);
	line-height: var(--hl-form-input-line-height);
	font-weight: var(--hl-font-weight-semibold);
	color: var(--hl-color-brand-900);
}

.hl-field__selected--placeholder {
	font-weight: var(--hl-font-weight-regular);
}

.hl-field__chevron {
	flex-shrink: 0;
	width: var(--hl-space-24);
	height: var(--hl-space-24);
	color: var(--hl-color-brand-900);
	transition: transform 0.15s ease;
}

.hl-field__chevron svg {
	width: 100%;
	height: 100%;
	display: block;
}

.hl-field--open .hl-field__chevron {
	transform: rotate(180deg);
}

/* The time-select nested inside the date-time field has its own open state —
 * its chevron must not react to the outer date-time field being open. */
.hl-field__time-select .hl-field__chevron {
	transform: none;
}

.hl-field__time-select--open .hl-field__chevron {
	transform: rotate(180deg);
}

/* Date-time trigger content: date left semibold #00090d, time right #335865 */
.hl-field__datetime-placeholder {
	font-size: var(--hl-form-input-size);
	line-height: var(--hl-form-input-line-height);
	color: var(--hl-color-brand-900);
	white-space: nowrap;
	text-overflow: ellipsis;
	overflow: hidden;
}

.hl-field__datetime-date {
	font-size: var(--hl-form-input-size);
	line-height: var(--hl-form-input-line-height);
	font-weight: var(--hl-font-weight-semibold);
	color: var(--hl-color-brand-900);
}

.hl-field__datetime-time {
	font-size: var(--hl-form-input-size);
	line-height: var(--hl-form-input-line-height);
	font-weight: var(--hl-font-weight-semibold);
	color: var(--hl-color-text-price);
}

/* ---- Dropdown panels ---- */
.hl-field__dropdown {
	position: absolute;
	top: 100%;
	left: 0;
	right: 0;
	z-index: 30;
	margin-top: var(--hl-space-12);
	background-color: var(--hl-color-white);
	border: 1px solid var(--hl-color-form-stroke);
	border-radius: var(--hl-radius-8);
	box-shadow: var(--hl-shadow-sm);
	overflow: hidden;
	opacity: 0;
	/* transform: translateY(-4px); */
	transition: opacity 0.5s ease, transform 0.15s ease;
	pointer-events: none;
}

.hl-field__dropdown.hl-field__dropdown--visible {
	opacity: 1;
	transform: translateY(0);
	pointer-events: auto;
}

/* ---- Location search spinner ---- */
.hl-field__spinner {
	flex-shrink: 0;
	width: var(--hl-space-20);
	height: var(--hl-space-20);
	border: 2px solid var(--hl-color-form-stroke);
	border-top-color: var(--hl-color-brand-500);
	border-radius: 50%;
	animation: hl-field-spin 0.6s linear infinite;
}

@keyframes hl-field-spin {
	to {
		transform: rotate(360deg);
	}
}

.hl-field__option mark {
	background: none;
	color: inherit;
	font-weight: var(--hl-font-weight-bold);
	padding: 0;
	margin: 0;
}

/* Location results + age/time lists: flat list, rows 36px */
.hl-field__dropdown--location,
.hl-field__dropdown--age,
.hl-field__dropdown--time {
	max-height: 396px;
	overflow-y: auto;
}

.hl-field__group-title {
	padding: var(--hl-space-8);
	background-color: var(--hl-color-brand-50);
	color: var(--hl-color-brand-500);
	font-size: var(--hl-form-label-size);
	line-height: var(--hl-form-label-line-height);
	font-weight: var(--hl-font-weight-semibold);
	text-transform: capitalize;
}

.hl-field__option {
	display: block;
	width: 100%;
	padding: var(--hl-space-8);
	border: none;
	background-color: var(--hl-color-white);
	text-align: left;
	cursor: pointer;
	font-family: var(--hl-font-family);
	font-size: var(--hl-form-label-size);
	line-height: var(--hl-form-label-line-height);
	font-weight: var(--hl-font-weight-regular);
	color: var(--hl-color-brand-900);
}

.hl-field__dropdown--age .hl-field__option,
.hl-field__dropdown--time .hl-field__option {
	font-weight: var(--hl-font-weight-semibold);
}

.hl-field__option:hover,
.hl-field__option:focus-visible {
	background-color: var(--hl-color-brand-50);
	color: var(--hl-color-brand-900);
	outline: none;
}

/* Date-time panel: padding 20, gap 24, radius kept square per Figma frame */
.hl-field__dropdown--datetime {
	display: flex;
	flex-direction: column;
	gap: var(--hl-space-24);
	padding: var(--hl-space-20);
	border-radius: var(--hl-radius-8);
	width: 288px;
	right: auto;
	overflow: visible;
}

.hl-field__dropdown--time {
	border-radius: var(--hl-radius-8);
}

.hl-field__picker-section {
	display: flex;
	flex-direction: column;
	gap: var(--hl-space-4);
}

.hl-field__picker-title {
	font-size: var(--hl-form-label-size);
	line-height: var(--hl-form-label-line-height);
	font-weight: var(--hl-font-weight-bold);
	color: var(--hl-color-brand-900);
}

/* Mini calendar */
.hl-calendar {
	border: 1px solid var(--hl-color-form-stroke);
	border-radius: var(--hl-radius-8);
	padding: var(--hl-space-20);
	display: flex;
	flex-direction: column;
	gap: var(--hl-space-16);
	background-color: var(--hl-color-white);
}

.hl-calendar__nav {
	display: flex;
	align-items: center;
	justify-content: space-between;
}

.hl-calendar__prev,
.hl-calendar__next {
	width: 29px;
	height: 29px;
	padding: var(--hl-space-4);
	border: none;
	background: none;
	cursor: pointer;
	color: var(--hl-color-brand-900);
}

.hl-calendar__prev svg,
.hl-calendar__next svg {
	width: 100%;
	height: 100%;
	display: block;
}

.hl-calendar__month {
	font-size: var(--hl-body-default-size);
	line-height: var(--hl-body-default-line-height);
	font-weight: var(--hl-font-weight-bold);
	color: var(--hl-color-brand-900);
}

.hl-calendar__weekdays {
	display: grid;
	grid-template-columns: repeat(7, 1fr);
	gap: var(--hl-space-6);
}

.hl-calendar__weekdays span {
	text-align: center;
	font-size: var(--hl-text-micro-size);
	line-height: var(--hl-text-micro-line-height);
	font-weight: var(--hl-font-weight-semibold);
	text-transform: uppercase;
	color: var(--hl-color-brand-500);
}

.hl-calendar__days {
	display: grid;
	grid-template-columns: repeat(7, 1fr);
	gap: var(--hl-space-6);
}

.hl-calendar__day {
	aspect-ratio: 1;
	min-width: 0;
	padding: 0;
	border: none;
	background-color: var(--hl-color-white);
	border-radius: var(--hl-radius-8);
	cursor: pointer;
	font-family: var(--hl-font-family);
	font-size: var(--hl-form-label-size);
	line-height: 18px;
	font-weight: var(--hl-font-weight-medium);
	color: var(--hl-color-brand-900);
}

.hl-calendar__day:hover {
	background-color: var(--hl-color-brand-50);
}

/* Selected day: yellow #f7ec13 (Figma "18" cell) */
.hl-calendar__day--selected,
.hl-calendar__day--selected:hover {
	background-color: var(--hl-color-yellow-500);
}

.hl-calendar__day--empty {
	visibility: hidden;
	pointer-events: none;
}

.hl-calendar__day--disabled {
	cursor: not-allowed !important;
	color: var(--hl-color-form-stroke);
}

/* Time select: same trigger + dropdown pattern as the age field */
.hl-field__time-select {
	position: relative;
}

/* Apply button = Primary button */
.hl-field__apply {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	padding: var(--hl-space-12) var(--hl-space-32);
	border: none;
	border-radius: var(--hl-radius-8);
	background-color: var(--hl-btn-primary-surface);
	color: var(--hl-btn-primary-content);
	font-family: var(--hl-font-family);
	font-size: var(--hl-body-default-size);
	line-height: var(--hl-body-default-line-height);
	font-weight: var(--hl-font-weight-semibold);
	cursor: pointer;
	transition: background-color 0.15s ease;
}

.hl-field__apply:hover {
	background-color: var(--hl-btn-primary-surface-hover);
}

/* ---- Stepper (passengers / luggage) ---- */
.hl-field__box--stepper {
	justify-content: space-between;
	gap: var(--hl-space-12);
	min-height: 50px;
	padding: var(--hl-space-4) var(--hl-space-12);
}

.hl-field__value {
	font-size: var(--hl-form-input-size);
	line-height: var(--hl-form-input-line-height);
	font-weight: var(--hl-font-weight-semibold);
	color: var(--hl-color-brand-900);
}

/* Plain minus/plus icons (Figma icons/general/minus & plus, no borders) */
.hl-field .hl-field__step,
.hl-field .hl-field__step:hover,
.hl-field .hl-field__step:focus {
	background-color: transparent;
	border: none;
	color: var(--hl-color-brand-900) !important;
	transition: all .3s ease;
}

.hl-field .hl-field__step:hover,
.hl-field .hl-field__step:focus {
	color: var(--hl-color-grey-300) !important;
}

.hl-field__step {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 29px;
	height: 29px;
	padding: var(--hl-space-2);
	flex-shrink: 0;
	border: none;
	background: none;
	cursor: pointer;
	color: var(--hl-color-brand-900);
	border-radius: var(--hl-radius-8);
}

.hl-field__step svg {
	width: 100%;
	height: 100%;
	display: block;
}

.hl-field__step:hover {
	background-color: var(--hl-color-brand-50);
}

.hl-field__step:disabled {
	cursor: not-allowed;
	color: var(--hl-color-grey-100);
	background: none;
}

/* ---- Search form (input-search-form): input + attached primary button ---- */
.hl-search-form {
	display: flex;
	align-items: stretch;
	margin-left: auto;
	margin-right: auto;
	width: 100%;
	max-width: 500px;
}

.hl-search-form__input {
	flex: 1 1 auto;
	min-width: 0;
	box-sizing: border-box;
	min-height: var(--hl-space-48);
	padding: var(--hl-space-12) var(--hl-space-16) !important;
	border: 1px solid var(--hl-color-form-stroke) !important;
	border-right: none;
	border-radius: var(--hl-radius-8) 0 0 var(--hl-radius-8) !important;
	background-color: var(--hl-color-white) !important;
	font-family: var(--hl-font-family);
	font-size: var(--hl-body-default-size);
	line-height: var(--hl-body-default-line-height);
	color: var(--hl-color-brand-900) !important;
	outline: none;
}

.hl-search-form__input::placeholder {
	color: var(--hl-color-grey-300) !important;
	opacity: 1;
}

.hl-search-form__input:focus {
	box-shadow: 0 0 0 var(--hl-space-2) var(--hl-color-brand-200) !important;
}

.hl-search-form__button {
	flex: 0 0 auto;
	padding: var(--hl-space-12) var(--hl-space-32);
	border: none;
	border-radius: 0 var(--hl-radius-8) var(--hl-radius-8) 0;
	background-color: var(--hl-btn-primary-surface);
	color: var(--hl-btn-primary-content);
	font-family: var(--hl-font-family);
	font-size: var(--hl-body-default-size);
	line-height: var(--hl-body-default-line-height);
	font-weight: var(--hl-font-weight-semibold);
	cursor: pointer;
	transition: background-color 0.15s ease;
}

.hl-search-form__button:hover {
	background-color: var(--hl-btn-primary-surface-hover);
}