form.search {
	box-sizing: border-box;
	display: flex;
	flex-direction: column;
	gap: 10px;
	margin: 0 auto;
	max-width: 560px;
}

form.search > .where,
form.search > .when,
form.search > .guests {
	position: relative;
	padding: 7px 15px;
	border: 1px solid #e0e0e0;
	border-radius: 7px;
	background: #fff;
	cursor: pointer;
}

form.search > .where > div:first-child,
form.search > .when > div:first-child,
form.search > .guests > div:first-child {
	display: flex;
	align-items: center;
	gap: 12px;
}

form.search > .where > div:first-child > img,
form.search > .when > div:first-child > img,
form.search > .guests > div:first-child > img {
	width: 22px;
	height: 22px;
	display: block;
	flex-shrink: 0;
}

form.search label {
	display: block;
	font-size: 13px;
	color: #8a8a8a;
	font-weight: 400;
	line-height: 1.2;
}

form.search span {
	display: block;
	font-size: 15px;
	color: #222;
	font-weight: 500;
	line-height: 1.2;
}

form.search button {
	display: flex;
	align-items: center;
	justify-content: space-between;
	width: 100%;
	padding: 12px 18px 12px 22px;
	text-align: left;
	border: none;
	border-radius: 7px;
	background: #1a7af8;
	color: #fff;
	font-size: 16px;
	font-weight: 400;
	cursor: pointer;
}

form.search button > svg {
	width: 22px;
	height: 22px;
	flex-shrink: 0;
	stroke: #fff;
	fill: none;
	margin-left: 30px;
}

form.search > .where > div:last-child,
form.search > .when > div:last-child,
form.search > .guests > div:last-child {
	display: none;
	position: absolute;
	top: calc(100% + 8px);
	left: 0;
	right: auto;
	bottom: auto;
	width: min(380px, calc(100vw - 40px));
	max-height: min(60vh, 520px);
	overflow: hidden;
	box-sizing: border-box;
	background: var(--white);
	border: 1px solid var(--border);
	border-radius: 10px;
	box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
	z-index: 1;
	cursor: default;
}

form.search > .where.open > div:last-child,
form.search > .when.open > div:last-child,
form.search > .guests.open > div:last-child {
	display: block;
}

form.search > .where > div:last-child,
form.search > .when > div:last-child {
	height: min(60vh, 520px);
}

form.search > .guests > div:last-child {
	height: auto;
	overflow: visible;
}

@media (max-width: 959.999px) {
	form.search > .where > div:last-child,
	form.search > .when > div:last-child,
	form.search > .guests > div:last-child {
		position: fixed;
		top: 50%;
		left: 50%;
		right: auto;
		bottom: auto;
		transform: translate(-50%, -50%);
		width: min(380px, calc(100vw - 40px));
		max-height: min(86vh, 720px);
	}

	form.search > .where > div:last-child,
	form.search > .when > div:last-child {
		height: min(70vh, 640px);
	}
}

@media (min-width: 960px) {
	form.search {
		max-width: 1200px;
		flex-direction: row;
		align-items: stretch;
	}

	form.search > .where,
	form.search > .when,
	form.search > .guests {
		flex: 1;
	}

	form.search button {
		width: auto;
		padding: 14px 22px 14px 26px;
	}
}

form.search.no-resort button {
	background: var(--border);
}

/* host form on pages without visible search (e.g. offers) */
form.search.bar-host {
	position: absolute;
	top: 0;
	left: 0;
	display: block;
	width: 0;
	height: 0;
	min-height: 0;
	padding: 0;
	margin: 0;
	overflow: visible;
	pointer-events: none;
}

form.search.bar-host > div {
	position: absolute;
	width: 0;
	height: 0;
	padding: 0;
	border: 0;
	overflow: visible;
}

form.search.bar-host > div > div:first-child {
	display: none;
}

form.search.bar-host > div > div:last-child {
	pointer-events: auto;
}

form.search.bar-host > .where.open > div:last-child,
form.search.bar-host > .when.open > div:last-child,
form.search.bar-host > .guests.open > div:last-child,
form.search.bar-open > .where.open > div:last-child,
form.search.bar-open > .when.open > div:last-child,
form.search.bar-open > .guests.open > div:last-child {
	position: fixed;
	top: auto;
	left: 50%;
	right: auto;
	bottom: 80px;
	transform: translateX(-50%);
	width: min(380px, calc(100vw - 24px));
	max-height: min(55vh, 480px);
	height: auto;
	display: block;
}

form.search.bar-host > .where.open > div:last-child,
form.search.bar-host > .when.open > div:last-child,
form.search.bar-open > .where.open > div:last-child,
form.search.bar-open > .when.open > div:last-child {
	height: min(55vh, 480px);
}
