/*
 * Car search form (template-parts/global/search-form.php), on every page that has a search.
 * The card around it comes from the page (home hero card, .bcr-search-hero-card, /cars/ band).
 * Wide screens: [pick-up] [pick-up date & time] [return date & time] [Search];
 * with a different return location the locations take the first row.
 */
.bcr-cs-form { position: relative; text-align: left; color: var(--ds-ink); }
.bcr-cs-grid {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: 12px;
}
.bcr-cs-field { position: relative; min-width: 0; }
.bcr-cs-field[hidden] { display: none; }
.bcr-cs-label {
	display: block;
	margin: 0 0 6px;
	color: var(--ds-muted);
	font-size: 11px;
	font-weight: 700;
	letter-spacing: .06em;
	line-height: 1.2;
	text-transform: uppercase;
}
.bcr-cs-shell {
	display: flex;
	align-items: center;
	gap: 8px;
	height: 50px;
	padding: 0 12px;
	border: 1px solid #d5dce6;
	border-radius: 10px;
	background: #fff;
	transition: border-color .2s ease, box-shadow .2s ease;
}
.bcr-cs-shell:focus-within { border-color: var(--ds-accent); box-shadow: 0 0 0 3px rgba(253, 167, 2, .18); }
.bcr-cs-shell > .bi { flex: none; color: var(--ds-accent-ink); font-size: 17px; }
.bcr-cs-input {
	flex: 1 1 auto;
	width: 100%;
	min-width: 0;
	height: 100%;
	padding: 0;
	border: 0;
	background: transparent;
	color: var(--ds-ink);
	font-size: 14px;
	font-weight: 600;
	outline: 0;
	-webkit-appearance: none;
	appearance: none;
}
.bcr-cs-input::placeholder { color: #8a94a3; font-weight: 500; }
.bcr-cs-date { min-width: 0; }
.bcr-cs-date::-webkit-calendar-picker-indicator { opacity: .55; cursor: pointer; }
.bcr-cs-time {
	flex: 0 0 92px;
	width: 92px;
	padding-left: 10px;
	border-left: 1px solid #e3e8ef;
	cursor: pointer;
}
.bcr-cs-submit {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	width: 100%;
	height: 50px;
	padding: 0 22px;
	border: 0;
	border-radius: 10px;
	background: var(--ds-accent);
	color: #111827;
	font-size: 15px;
	font-weight: 700;
	white-space: nowrap;
	cursor: pointer;
	transition: background .2s ease, transform .2s ease;
}
.bcr-cs-submit:hover { background: var(--ds-accent-hover); transform: translateY(-1px); }
.bcr-cs-submit:focus-visible { outline: 3px solid var(--ds-navy); outline-offset: 2px; }
.bcr-cs-submit.is-loading { opacity: .85; cursor: wait; transform: none; }

.bcr-cs-options {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 10px 24px;
	margin-top: 12px;
	color: var(--ds-text);
	font-size: 13.5px;
	font-weight: 600;
}
.bcr-cs-check, .bcr-cs-age { display: inline-flex; align-items: center; gap: 8px; margin: 0; cursor: pointer; }
.bcr-cs-check input { width: 17px; height: 17px; margin: 0; accent-color: var(--ds-accent-ink); }
.bcr-cs-age select {
	height: 32px;
	padding: 0 8px;
	border: 1px solid #d5dce6;
	border-radius: 8px;
	background: #fff;
	color: var(--ds-ink);
	font-size: 13.5px;
	font-weight: 600;
}

/* Suggestions */
.bcr-cs-suggest {
	position: absolute;
	top: 100%;
	right: 0;
	left: 0;
	z-index: 60;
	max-height: 320px;
	margin: 6px 0 0;
	padding: 6px;
	overflow-y: auto;
	border: 1px solid var(--ds-line);
	border-radius: 12px;
	background: #fff;
	box-shadow: 0 18px 40px -12px rgba(15, 23, 42, .3);
	list-style: none;
}
.bcr-cs-suggest[hidden] { display: none; }
.bcr-cs-option {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 9px 10px;
	border-radius: 8px;
	cursor: pointer;
}
.bcr-cs-option[aria-selected="true"] { background: var(--ds-accent-soft); }
.bcr-cs-option > .bi {
	display: flex;
	flex: none;
	align-items: center;
	justify-content: center;
	width: 32px;
	height: 32px;
	border-radius: 50%;
	background: var(--ds-soft);
	color: var(--ds-accent-ink);
}
.bcr-cs-option span { min-width: 0; }
.bcr-cs-option b, .bcr-cs-option small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bcr-cs-option b { color: var(--ds-ink); font-size: 14px; font-weight: 700; }
.bcr-cs-option small { color: var(--ds-muted); font-size: 12px; }

.bcr-spinner {
	display: inline-block;
	width: 16px;
	height: 16px;
	border: 2px solid currentColor;
	border-right-color: transparent;
	border-radius: 50%;
	vertical-align: -3px;
	animation: bcr-spin .7s linear infinite;
}
@keyframes bcr-spin { to { transform: rotate(360deg); } }

@media (min-width: 768px) {
	.bcr-cs-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.bcr-cs-field--pickup { grid-column: span 2; }
	.bcr-cs-grid:not([data-same]) .bcr-cs-field--pickup { grid-column: auto; }
	.bcr-cs-field--go { grid-column: span 2; }
}
@media (min-width: 992px) {
	.bcr-cs-grid[data-same] { grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr) minmax(0, 1fr) auto; }
	.bcr-cs-grid:not([data-same]) { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto; }
	.bcr-cs-grid[data-same] .bcr-cs-field--pickup { grid-column: auto; }
	.bcr-cs-grid:not([data-same]) .bcr-cs-field--dropoff { grid-column: span 2; }
	.bcr-cs-field--go { grid-column: auto; display: flex; align-items: flex-end; }
	.bcr-cs-submit { width: auto; min-width: 150px; }
}
@media (max-width: 575px) {
	.bcr-cs-options { font-size: 13px; }
}
