/* Europcar-style rental search widget */
.vrm-rental-search {
	--vrm-rs-primary: #00802f;
	--vrm-rs-btn-bg: #ffde00;
	--vrm-rs-btn-text: #1a2332;
	--vrm-rs-error: #d63638;
	--vrm-rs-card-bg: #ffffff;
	--vrm-rs-radius: 8px;
	--vrm-rs-border: #dde3ea;
	--vrm-rs-muted: #5c6670;
	font-family: inherit;
	max-width: 1140px;
	margin: 0 auto;
}

.vrm-rs__card {
	background: var(--vrm-rs-card-bg);
	border: 1px solid var(--vrm-rs-border);
	border-radius: var(--vrm-rs-radius);
	box-shadow: 0 8px 28px rgba(0, 0, 0, 0.08);
	padding: 1.25rem 1.5rem 1rem;
	overflow: visible;
}

.vrm-rs__heading {
	margin: 0 0 0.65rem;
	font-size: 0.95rem;
	font-weight: 700;
	color: #1a2332;
}

.vrm-rs__section--types {
	margin-bottom: 1rem;
}

.vrm-rs__type-pills {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
}

.vrm-rs__type-pill {
	margin: 0;
	cursor: pointer;
}

.vrm-rs__type-pill input {
	position: absolute;
	opacity: 0;
	width: 0;
	height: 0;
}

.vrm-rs__type-pill span {
	display: inline-flex;
	align-items: center;
	gap: 0.45rem;
	padding: 0.55rem 1.1rem;
	border: 1px solid var(--vrm-rs-border);
	border-radius: 6px;
	background: #fff;
	font-size: 0.9rem;
	font-weight: 600;
	color: #2c3338;
	transition: all 0.15s ease;
}

.vrm-rs__type-pill.is-active span,
.vrm-rs__type-pill:hover span {
	background: var(--vrm-rs-primary);
	border-color: var(--vrm-rs-primary);
	color: #fff;
}

.vrm-rs__section--fields {
	display: grid;
	grid-template-columns: 1.2fr 1.2fr 1fr 1fr;
	gap: 1rem;
	align-items: start;
}

.vrm-rs__label-row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 0.75rem;
	flex-wrap: wrap;
	margin-bottom: 0.4rem;
}

.vrm-rs__label {
	display: block;
	font-size: 0.8rem;
	font-weight: 600;
	color: #1a2332;
	margin: 0 0 0.4rem;
}

.vrm-rs__label-row .vrm-rs__label {
	margin-bottom: 0;
}

.vrm-rs__same-return {
	display: inline-flex;
	align-items: center;
	gap: 0.35rem;
	font-size: 0.78rem;
	color: var(--vrm-rs-muted);
	cursor: pointer;
	margin: 0;
}

.vrm-rs__same-return input {
	accent-color: var(--vrm-rs-primary);
	margin: 0;
}

.vrm-rs__field--drop.is-hidden {
	display: none;
}

.vrm-rs__control {
	position: relative;
	display: flex;
	align-items: center;
	width: 100%;
}

.vrm-rs__icon {
	position: absolute;
	left: 0.75rem;
	color: var(--vrm-rs-primary);
	pointer-events: none;
	z-index: 1;
}

.vrm-rs__input,
.vrm-rs__select {
	width: 100%;
	padding: 0.7rem 2.25rem 0.7rem 2.35rem;
	border: 1px solid var(--vrm-rs-border);
	border-radius: 6px;
	background: #fff;
	font-size: 0.95rem;
	color: #1a2332;
	transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

/* Override theme globals (Royal Addons / WooCommerce input[type=text] { background:#f1f1f1 }) */
.vrm-rental-search .vrm-rs__control input.vrm-rs__input[type="text"],
.vrm-rental-search .vrm-location-combobox__control input.vrm-location-search-input[type="text"] {
	border-radius: 6px !important;
	border: 1px solid var(--vrm-rs-border) !important;
	border-width: 1px !important;
	border-style: solid !important;
	border-color: var(--vrm-rs-border) !important;
	background: #fff !important;
	background-color: #fff !important;
	color: #1a2332 !important;
	padding: 0.7rem 2.25rem 0.7rem 2.35rem !important;
	font-size: 0.95rem !important;
	font-weight: 600 !important;
	line-height: 1.4 !important;
	height: auto !important;
	min-height: 0 !important;
	box-shadow: none !important;
	-webkit-appearance: none;
	appearance: none;
}

.vrm-rental-search .vrm-rs__control input.vrm-rs__input[type="text"]:focus,
.vrm-rental-search .vrm-location-combobox__control input.vrm-location-search-input[type="text"]:focus {
	outline: none !important;
	border-color: var(--vrm-rs-primary) !important;
	box-shadow: 0 0 0 1px var(--vrm-rs-primary) !important;
}

.vrm-rental-search .vrm-rs__control input.vrm-rs__input[type="text"]:disabled,
.vrm-rental-search .vrm-location-combobox__control input.vrm-location-search-input[type="text"]:disabled {
	background: #f4f7fb !important;
	background-color: #f4f7fb !important;
	opacity: 0.85;
	cursor: not-allowed;
}

.vrm-rs__input:focus,
.vrm-rs__select:focus {
	outline: none;
	border-color: var(--vrm-rs-primary);
	box-shadow: 0 0 0 1px var(--vrm-rs-primary);
}

.vrm-rs__clear {
	position: absolute;
	right: 0.5rem;
	top: 50%;
	transform: translateY(-50%);
	border: none;
	background: transparent;
	color: var(--vrm-rs-muted);
	font-size: 1.25rem;
	line-height: 1;
	cursor: pointer;
	padding: 0.15rem 0.35rem;
	z-index: 2;
}

.vrm-rs__field.is-error .vrm-rs__control,
.vrm-rs__field.is-error .vrm-rs__datetime .vrm-rs__date-btn,
.vrm-rs__field.is-error .vrm-rs__datetime .vrm-rs__time-btn {
	border-color: var(--vrm-rs-error);
	box-shadow: 0 0 0 1px var(--vrm-rs-error);
}

.vrm-rs__error {
	margin: 0.35rem 0 0;
	font-size: 0.8rem;
	color: var(--vrm-rs-error);
}

.vrm-rs__error[hidden] {
	display: none !important;
}

.vrm-rs__datetime {
	display: grid;
	grid-template-columns: 1fr auto;
	gap: 0.5rem;
}

.vrm-rs__date-btn,
.vrm-rs__time-btn {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	width: 100%;
	padding: 0.7rem 0.85rem;
	border: 1px solid var(--vrm-rs-border);
	border-radius: 6px;
	background: #fff;
	font-size: 0.95rem;
	color: #1a2332;
	cursor: pointer;
	text-align: left;
	transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.vrm-rs__time-btn {
	min-width: 5.5rem;
	justify-content: center;
}

.vrm-rs__date-btn.is-active,
.vrm-rs__time-btn.is-active {
	border-color: var(--vrm-rs-primary);
	box-shadow: 0 0 0 2px var(--vrm-rs-primary);
}

.vrm-rs__date-btn .vrm-rs__icon {
	position: static;
}

.vrm-rs__location-panel {
	position: relative;
	display: grid;
	grid-template-columns: minmax(200px, 1fr) minmax(200px, 1fr) minmax(220px, 1fr);
	gap: 1rem;
	margin-top: 1rem;
	padding-top: 1rem;
	border-top: 1px solid var(--vrm-rs-border);
	width: 100%;
}

.vrm-rs__location-panel--branch {
	grid-template-columns: minmax(220px, 1fr) minmax(220px, 1fr);
}

.vrm-rs__location-panel__list {
	position: relative;
	min-width: 0;
}

/* Panel list is inline in the card — never use fleet dropdown absolute positioning */
.vrm-rs__location-panel .vrm-rs__suggestions,
.vrm-rs__location-panel .vrm-location-suggestions {
	position: static !important;
	left: auto !important;
	right: auto !important;
	top: auto !important;
	width: 100%;
	margin: 0;
	padding: 0;
	list-style: none;
	background: transparent;
	border: none;
	border-radius: 0;
	box-shadow: none;
	max-height: 280px;
	overflow-y: auto;
	z-index: auto;
}

.vrm-rs__location-panel[hidden] {
	display: none !important;
}

.vrm-rs__location-panel__heading {
	margin: 0 0 0.5rem;
	font-size: 0.72rem;
	font-weight: 800;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: var(--vrm-rs-muted);
}

.vrm-rs__location-panel__detail h4 {
	margin: 0 0 0.35rem;
	font-size: 0.9rem;
	font-weight: 800;
	text-transform: uppercase;
	color: #1a2332;
}

.vrm-rs__location-panel__detail p {
	margin: 0 0 0.5rem;
	font-size: 0.85rem;
	color: var(--vrm-rs-muted);
	line-height: 1.45;
}

.vrm-rs__location-panel__map {
	min-height: 200px;
	border: 1px solid var(--vrm-rs-border);
	border-radius: 6px;
	background: #f4f7fb;
}

.vrm-rs__location-panel__map[aria-hidden="true"] {
	display: none;
}

.vrm-rs__suggestions {
	list-style: none;
	margin: 0;
	padding: 0;
	max-height: 280px;
	overflow-y: auto;
	position: static;
	width: 100%;
}

.vrm-rs__suggestions .vrm-location-suggestions__heading {
	padding: 0.45rem 0.5rem 0.25rem;
	font-size: 0.68rem;
	font-weight: 800;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: var(--vrm-rs-muted);
}

.vrm-rs__suggestions .vrm-location-suggestions__item {
	display: flex;
	align-items: flex-start;
	gap: 0.65rem;
	padding: 0.55rem 0.5rem;
	cursor: pointer;
	border-radius: 4px;
}

.vrm-rs__suggestions .vrm-location-suggestions__item:hover,
.vrm-rs__suggestions .vrm-location-suggestions__item.is-active {
	background: #f4f7fb;
}

.vrm-rs__suggestions .vrm-location-suggestions__icon {
	flex-shrink: 0;
	width: 1.1rem;
	height: 1.1rem;
	margin-top: 0.15rem;
	border-radius: 50%;
	background: #e8edf3;
	opacity: 0.85;
}

.vrm-rs__suggestions .vrm-location-suggestions__text {
	display: flex;
	flex-direction: column;
	gap: 0.1rem;
	min-width: 0;
}

.vrm-rs__suggestions .vrm-location-suggestions__main {
	font-size: 0.9rem;
	font-weight: 600;
	color: #1a2332;
}

.vrm-rs__suggestions .vrm-location-suggestions__secondary {
	font-size: 0.78rem;
	color: var(--vrm-rs-muted);
	line-height: 1.35;
}

.vrm-rs__suggestions .vrm-location-suggestions__empty {
	padding: 0.75rem 0.5rem;
	font-size: 0.85rem;
	color: var(--vrm-rs-muted);
	line-height: 1.45;
}

.vrm-rs__overlay {
	position: relative;
	z-index: 20;
	margin-top: 0.5rem;
}

.vrm-rs__overlay[hidden] {
	display: none !important;
}

.vrm-rs__overlay-inner {
	background: #fff;
	border: 1px solid var(--vrm-rs-border);
	border-radius: 6px;
	box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
	padding: 0.75rem;
}

.vrm-rs__overlay--calendar {
	display: flex;
	justify-content: center;
}

.vrm-rs__overlay--calendar .vrm-rs__overlay-inner {
	overflow: visible;
	display: flex;
	justify-content: center;
	align-items: center;
	padding: 1rem;
	width: fit-content;
	max-width: 100%;
	margin: 0 auto;
}

.vrm-rs__calendar-mount {
	display: flex;
	justify-content: center;
	align-items: center;
	width: 100%;
}

.vrm-rs__calendar-mount .flatpickr-calendar {
	position: static !important;
	box-shadow: none !important;
	margin: 0;
	width: auto !important;
	max-width: 100%;
}

.vrm-rs__calendar-mount .flatpickr-calendar.inline {
	opacity: 1;
	visibility: visible;
}

.vrm-rs__time-list {
	list-style: none;
	margin: 0;
	padding: 0.25rem;
	max-height: 280px;
	overflow-y: auto;
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 0.35rem;
}

.vrm-rs__time-list li {
	margin: 0;
}

.vrm-rs__time-list button {
	width: 100%;
	padding: 0.45rem 0.35rem;
	border: 1px solid var(--vrm-rs-border);
	border-radius: 4px;
	background: #fff;
	color: #000 !important;
	font-size: 0.85rem;
	cursor: pointer;
}

.vrm-rs__time-list button:hover,
.vrm-rs__time-list button.is-active {
	border-color: var(--vrm-rs-primary);
	background: #f4f7fb;
}

.vrm-rs__section--footer {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 1rem;
	margin-top: 1.25rem;
	padding-top: 1rem;
	border-top: 1px solid var(--vrm-rs-border);
}

.vrm-rs__cosmetic {
	display: inline-flex;
	align-items: center;
	gap: 0.35rem;
	font-size: 0.88rem;
	color: var(--vrm-rs-muted);
}

.vrm-rs__cosmetic-btn {
	border: none;
	background: transparent;
	padding: 0;
	font-size: inherit;
	color: inherit;
	cursor: default;
	text-decoration: underline;
	text-underline-offset: 2px;
}

.vrm-rs__negotiated {
	display: inline-flex;
	align-items: center;
	gap: 0.4rem;
	font-size: 0.85rem;
	color: var(--vrm-rs-muted);
	margin: 0;
	cursor: pointer;
}

.vrm-rs__negotiated input {
	accent-color: var(--vrm-rs-primary);
	margin: 0;
}

.vrm-rs__search-btn {
	margin-left: auto;
	min-width: 200px;
	padding: 0.85rem 2rem;
	border: none;
	border-radius: 6px;
	background: var(--vrm-rs-btn-bg);
	color: var(--vrm-rs-btn-text);
	font-size: 1rem;
	font-weight: 700;
	cursor: pointer;
	transition: filter 0.15s ease;
}

.vrm-rs__search-btn:hover {
	filter: brightness(0.96);
}

.vrm-rs__promo {
	display: flex;
	align-items: center;
	gap: 0.75rem;
	margin-top: 0;
	padding: 0.65rem 1rem;
	background: #2c3338;
	color: #fff;
	border-radius: 0 0 var(--vrm-rs-radius) var(--vrm-rs-radius);
	font-size: 0.85rem;
}

.vrm-rs__promo-tag {
	display: inline-flex;
	align-items: center;
	padding: 0.2rem 0.5rem;
	background: #e2007a;
	border-radius: 3px;
	font-size: 0.68rem;
	font-weight: 800;
	text-transform: uppercase;
}

.vrm-rs__promo-text a {
	color: #fff;
	margin-left: 0.35rem;
}

.vrm-rs__combobox .vrm-location-suggestions {
	display: none !important;
}

@media (max-width: 1024px) {
	.vrm-rs__section--fields {
		grid-template-columns: repeat(2, 1fr);
	}

	.vrm-rs__location-panel {
		grid-template-columns: 1fr;
	}
}

@media (max-width: 640px) {
	.vrm-rs__section--fields {
		grid-template-columns: 1fr;
	}

	.vrm-rs__search-btn {
		width: 100%;
		margin-left: 0;
	}

	.vrm-rs__time-list {
		grid-template-columns: repeat(3, 1fr);
	}

	.vrm-rs__overlay--calendar .vrm-rs__overlay-inner {
		width: 100%;
	}

	.vrm-rs__overlay--calendar .flatpickr-calendar {
		width: 100% !important;
		max-width: 320px;
	}
}
