/**
 * Eventsmaster on the scenario sites: the date picker inside the booking checkout's own document (the overlay and ?em_checkout=1), loaded from scenario-polish.php on the checkout's em_checkout_prepare_document action.
 * The checkout drops the theme's stylesheets, so the --evm-* tokens scenario-booking.css uses are not there; the theme.json presets in WordPress's global styles are, and these rules read those. The checkout keeps its own white surface in every variation, the dark one too, so colors are mixed against that surface rather than taken from the theme's.
 * Only the picker is themed: the rest of the checkout keeps its own accent.
 */

.em.em-checkout .em-booking-recurrence-picker {
	--em-demo-primary: var(--wp--preset--color--primary, var(--em-checkout-accent));
	--em-demo-on-primary: var(--wp--preset--color--on-primary, #fff);
	--em-demo-primary-text: color-mix(in srgb, var(--em-demo-primary) 75%, var(--em-checkout-text-strong));
	--em-checkout-accent: var(--em-demo-primary);
	--em-checkout-accent-tint: color-mix(in srgb, var(--em-demo-primary) 14%, var(--em-checkout-surface));
	--button-primary-color: var(--em-demo-on-primary);
}

/* dates that can be booked */
.em.em-checkout .em-booking-recurrence-picker .em-calendar .em-cal-body .em-cal-day-date a:not(#em-demo) {
	box-shadow: none;
	color: var(--em-demo-primary-text) !important;
	font-weight: 700;
	transition: background-color 0.15s ease, color 0.15s ease;
}

.em.em-checkout .em-booking-recurrence-picker .em-calendar .em-cal-body .em-cal-day-date a:not(#em-demo):hover {
	background: color-mix(in srgb, var(--em-demo-primary) 28%, var(--em-checkout-surface)) !important;
}

.em.em-checkout .em-booking-recurrence-picker .em-calendar .em-cal-body .em-cal-day-date a:not(#em-demo):focus-visible {
	outline: 2px solid var(--em-demo-primary-text) !important;
	outline-offset: 2px;
}

/* today: a ring, as on the event page's picker, instead of the calendar's underline */
.em.em-checkout .em-booking-recurrence-picker .em-calendar .em-cal-body > :is(.eventless-today, .eventful-today) .em-cal-day-date :is(a, span):not(#em-demo) {
	display: flex;
	align-items: center;
	justify-content: center;
	box-sizing: border-box;
	width: 100%;
	height: 100%;
	padding: 0 !important;
	border-radius: 50%;
	box-shadow: inset 0 0 0 2px var(--em-checkout-text);
	color: var(--em-checkout-text-strong) !important;
	font-size: inherit;
	line-height: 1;
	text-decoration: none !important;
}

/* the chosen date */
.em.em-checkout .em-booking-recurrence-picker .em-calendar .em-cal-body .em-cal-day-date.selected:not(#em-demo),
.em.em-checkout .em-booking-recurrence-picker .em-calendar .em-cal-body .em-cal-day-date.selected a:not(#em-demo) {
	background: var(--em-demo-primary) !important;
	box-shadow: none;
	color: var(--em-demo-on-primary) !important;
}
