/**
 * Restyles flatpickr to match the plugin's own look (Inter font, the same
 * the orange (#E77917) accent color, the same field
 * radius/border as the rest of .vrm-search-form) so the calendar/time
 * dropdown is identical on every browser and device, instead of each OS
 * drawing its own native date/time picker.
 */

:root {
	--vrm-accent: #e77917;
	--vrm-accent-hover: #c46714;
	--vrm-accent-tint: #fcefe3;
	--vrm-border: #ccc;
	--vrm-text: #333;
	--vrm-muted: #777;
}

/* The field itself, before the calendar even opens - keep it visually
   identical to the select/text fields already in .vrm-search-form, and
   add a small calendar glyph so it still reads as "tap to pick". */
.vrm-search-form input.vrm-datepicker {
	background-color: #fff;
	background-repeat: no-repeat;
	background-position: right 10px center;
	background-size: 16px 16px;
	padding-right: 32px;
	cursor: pointer;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23e77917' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='4' width='18' height='18' rx='2'/%3E%3Cline x1='16' y1='2' x2='16' y2='6'/%3E%3Cline x1='8' y1='2' x2='8' y2='6'/%3E%3Cline x1='3' y1='10' x2='21' y2='10'/%3E%3C/svg%3E");
}
.vrm-search-form input.vrm-datepicker:focus {
	outline: none;
	border-color: var(--vrm-accent);
	box-shadow: 0 0 0 3px var(--vrm-accent-tint);
}

/* The calendar/time popup */
.flatpickr-calendar {
	font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
	box-shadow: 0 8px 24px rgba(0, 0, 0, 0.14), 0 0 0 1px #eee;
	border-radius: 10px;
	overflow: hidden;
	width: 300px;
}
.flatpickr-calendar.arrowTop:before,
.flatpickr-calendar.arrowTop:after {
	display: none; /* the box-shadow/border above already anchors it visually - the little arrow just looked like a stray triangle across themes */
}

/* Month header */
.flatpickr-months {
	background: var(--vrm-accent);
	padding: 10px 0 8px;
}
.flatpickr-current-month {
	font-size: 15px;
	font-weight: 700;
	color: #fff;
	padding: 0;
}
.flatpickr-current-month input.cur-year {
	color: #fff;
	font-weight: 700;
}
.flatpickr-current-month .flatpickr-monthDropdown-months {
	color: #fff;
	font-weight: 700;
}
.flatpickr-current-month .flatpickr-monthDropdown-months option {
	color: #000;
}
.flatpickr-prev-month,
.flatpickr-next-month {
	fill: #fff;
	color: #fff;
	top: 12px;
}
.flatpickr-prev-month:hover svg,
.flatpickr-next-month:hover svg {
	fill: #fff;
	opacity: 0.75;
}
span.flatpickr-weekday {
	background: var(--vrm-accent);
	color: #fdf1e6;
	font-weight: 600;
	font-size: 12px;
}

/* Day grid */
.flatpickr-day {
	border-radius: 6px;
	color: var(--vrm-text);
	font-weight: 500;
}
.flatpickr-day.today {
	border-color: var(--vrm-accent);
}
.flatpickr-day:hover,
.flatpickr-day:focus {
	background: var(--vrm-accent-tint);
	border-color: var(--vrm-accent-tint);
}
.flatpickr-day.selected,
.flatpickr-day.selected:hover,
.flatpickr-day.startRange,
.flatpickr-day.endRange {
	background: var(--vrm-accent);
	border-color: var(--vrm-accent);
	color: #fff;
}
.flatpickr-day.flatpickr-disabled,
.flatpickr-day.flatpickr-disabled:hover,
.flatpickr-day.prevMonthDay,
.flatpickr-day.nextMonthDay {
	color: #c8c8c8;
}

/* Mobile: let the calendar size itself to the viewport instead of
   overflowing it, and make touch targets a bit larger. */
@media (max-width: 420px) {
	.flatpickr-calendar {
		width: 92vw;
		max-width: 320px;
	}
	.flatpickr-day {
		height: 38px;
		line-height: 38px;
	}
}
