.ibv-hero-search {
	width: 100%;
	max-width: 28.75rem;
	background-color: var(--ibv-color-bg-alt);
	border-radius: 5.25rem;
	padding: 0.5rem 0.5rem 0.5rem 0.75rem;
	box-shadow: 0 0 5px rgb(52 52 52 / 0.1);
}

.ibv-hero-search__inner {
	display: flex;
	flex-direction: row;
	align-items: center;
	justify-content: space-between;
	gap: 0;
}

.ibv-hero-search__field {
	flex: 1 1 0;
	min-width: 0;
	display: flex;
	flex-direction: column;
	gap: var(--ibv-space-2xs);
	padding-inline: 1rem 1.0625rem;
	border-inline-end: 1px solid rgb(191 200 200 / 0.3);
}

.ibv-hero-search__field:last-of-type {
	border-inline-end: 0;
}

.ibv-hero-search__label {
	font-family: var(--ibv-font-body);
	font-size: 0.75rem;
	font-weight: var(--ibv-font-weight-medium);
	line-height: 1.4;
	color: var(--ibv-color-text);
	letter-spacing: 0;
}

.ibv-hero-search__input {
	border: 0;
	background-color: transparent;
	padding: 0;
	font-family: var(--ibv-font-body);
	font-size: 0.875rem;
	font-weight: var(--ibv-font-weight-regular);
	line-height: 1.2;
	color: var(--ibv-color-text);
	width: 100%;
	min-width: 0;
}

.ibv-hero-search__input::placeholder {
	color: var(--ibv-color-border);
}

/* Date inputs read as muted (placeholder-style) until filled. */
.ibv-hero-search__input[type="date"]:not(:focus):invalid {
	color: var(--ibv-color-border);
}

/* Group size select — native chrome stripped, custom chevron overlaid. */
.ibv-hero-search__select-wrap {
	position: relative;
	display: flex;
	align-items: center;
	width: 100%;
	min-width: 0;
}

.ibv-hero-search__input--select {
	appearance: none;
	padding-inline-end: 1.25rem;
	cursor: pointer;
}

/* Reads as muted (placeholder-style) while the empty option is selected. */
.ibv-hero-search__input--select:invalid {
	color: var(--ibv-color-border);
}

.ibv-hero-search__select-icon {
	position: absolute;
	inset-inline-end: 0;
	width: 1rem;
	height: 1rem;
	color: var(--ibv-color-text-muted);
	pointer-events: none;
}

.ibv-hero-search__input[type="date"]::-webkit-calendar-picker-indicator {
	/* Hide the native date picker icon. */
	display: none;
}

.ibv-hero-search__input[type="date"]::-webkit-inner-spin-button {
	display: none;
}

.ibv-hero-search__input[type="date"]::-webkit-datetime-edit {
	color: inherit;
}

.ibv-hero-search__input:focus {
	outline: none;
}

/* "When" trigger — replaces the two visible date inputs with a single
 * button that shows the selected range. Hidden inputs still hold the
 * date_from / date_to values for form submission. */
.ibv-hero-search__field--when {
	position: relative;
}

.ibv-hero-search__when-trigger {
	display: flex;
	flex-direction: column;
	gap: var(--ibv-space-2xs);
	width: 100%;
	min-width: 0;
	padding: 0;
	border: 0;
	background-color: transparent;
	color: var(--ibv-color-text);
	font-family: inherit;
	text-align: start;
	cursor: pointer;
}

.ibv-hero-search__when-trigger:focus,
.ibv-hero-search__when-trigger:focus-visible {
	outline: none;
}

.ibv-hero-search__when-value {
	font-family: var(--ibv-font-body);
	font-size: 0.875rem;
	font-weight: var(--ibv-font-weight-regular);
	line-height: 1.2;
	color: var(--ibv-color-text);
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.ibv-hero-search__when-value.is-empty {
	color: var(--ibv-color-border);
}

.ibv-hero-search__when-clear {
	position: absolute;
	inset-inline-end: 0.25rem;
	inset-block-start: 50%;
	translate: 0 -50%;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 1.5rem;
	height: 1.5rem;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background-color: transparent;
	color: var(--ibv-color-text-muted);
	font-size: 1.25rem;
	line-height: 1;
	cursor: pointer;
	transition: background-color 120ms ease, color 120ms ease;
}

.ibv-hero-search__when-clear[hidden] {
	display: none;
}

.ibv-hero-search__when-clear:hover,
.ibv-hero-search__when-clear:focus-visible {
	background-color: var(--ibv-color-tint-teal);
	color: var(--ibv-color-text);
	outline: none;
}

.ibv-hero-search__submit {
	flex: 0 0 auto;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 3.75rem;
	height: 3.75rem;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background-color: var(--ibv-color-accent);
	color: var(--ibv-color-accent-contrast);
	cursor: pointer;
	transition: background-color var(--ibv-duration-normal) var(--ibv-ease-standard);
}

.ibv-hero-search__submit:hover,
.ibv-hero-search__submit:focus-visible {
	background-color: var(--ibv-color-link);
}

.ibv-hero-search__submit-icon {
	flex-shrink: 0;
	width: 0.84375rem;
	height: 0.84375rem;
	color: var(--ibv-color-accent-contrast);
	stroke: currentColor;
}

/* Very narrow viewports: shrink the submit button so the row keeps
 * fitting When + Group size + button without wrapping. */
@media (max-width: 22.5rem) { /* 360px */
	.ibv-hero-search__submit {
		width: 2.5rem;
		height: 2.5rem;
	}
}

