/* Reset button inside the check-in/check-out summary. */
#top #wc-bookings-booking-form .wc-bookings-date-picker .lc-bbr-selection-summary {
	position: relative;
	padding-right: 52px !important;
}

#top #wc-bookings-booking-form .wc-bookings-date-picker .lc-bbr-selection-reset {
	-webkit-appearance: none;
	appearance: none;
	position: absolute;
	top: 8px;
	right: 8px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 32px;
	height: 32px;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: transparent;
	box-shadow: none;
	color: #2b2f2c;
	cursor: pointer;
	line-height: 1;
}

#top #wc-bookings-booking-form .wc-bookings-date-picker .lc-bbr-selection-reset:hover,
#top #wc-bookings-booking-form .wc-bookings-date-picker .lc-bbr-selection-reset:focus-visible {
	background: rgba(255, 255, 255, 0.65);
	color: #c0392b;
}

#top #wc-bookings-booking-form .wc-bookings-date-picker .lc-bbr-selection-reset:focus-visible {
	outline: 2px solid currentColor;
	outline-offset: 2px;
}

#top #wc-bookings-booking-form .wc-bookings-date-picker .lc-bbr-selection-reset:disabled {
	background: transparent;
	color: #2b2f2c;
	cursor: default;
	opacity: 0.35;
}

#top #wc-bookings-booking-form .wc-bookings-date-picker .lc-bbr-selection-reset svg {
	display: block;
	width: 20px;
	height: 20px;
	pointer-events: none;
}

#top #wc-bookings-booking-form .wc-bookings-booking-cost .lc-bbr-instant-booking-cost {
	color: #2b2f2c !important;
}

/*
 * Adjacent-month dates represent the same real dates as their primary-month
 * copies. Normalize their base states here so every interaction rule below
 * (price, tooltip, hover, range preview, selection and blocking) starts from
 * the same presentation used in the primary month.
 */
#top #wc-bookings-booking-form .wc-bookings-date-picker .picker
td.ui-datepicker-other-month,
#top #wc-bookings-booking-form .wc-bookings-date-picker .picker
td.ui-datepicker-other-month > a.ui-state-default,
#top #wc-bookings-booking-form .wc-bookings-date-picker .picker
td.ui-datepicker-other-month > span.ui-state-default {
	opacity: 1 !important;
}

#top #wc-bookings-booking-form .wc-bookings-date-picker .picker
td.ui-datepicker-other-month.bookable:not(.lc-bbr-checkout-only):not(.lc-bbr-range-blocked):not(.lc-bbr-isolated-checkout-only) > a.ui-state-default {
	background: #fbfdfb !important;
	border-color: #239e57 !important;
	color: #2b2f2c !important;
}

@media (hover: hover) and (pointer: fine) {
	#top #wc-bookings-booking-form .wc-bookings-date-picker .picker
	td.ui-datepicker-other-month.bookable:not(.lc-bbr-checkout-only):not(.lc-bbr-range-blocked):not(.lc-bbr-isolated-checkout-only):hover > a.ui-state-default,
	#top #wc-bookings-booking-form .wc-bookings-date-picker .picker
	td.ui-datepicker-other-month.bookable:not(.lc-bbr-checkout-only):not(.lc-bbr-range-blocked):not(.lc-bbr-isolated-checkout-only) > a.ui-state-default:hover,
	#top #wc-bookings-booking-form .wc-bookings-date-picker .picker
	td.ui-datepicker-other-month.bookable:not(.lc-bbr-checkout-only):not(.lc-bbr-range-blocked):not(.lc-bbr-isolated-checkout-only) > a.ui-state-default.ui-state-hover {
		background: #239e57 !important;
		border-color: #239e57 !important;
		color: #fff !important;
	}
}

#top #wc-bookings-booking-form .wc-bookings-date-picker .picker
td.ui-datepicker-other-month.selection-start-date > a.ui-state-default,
#top #wc-bookings-booking-form .wc-bookings-date-picker .picker
td.ui-datepicker-other-month.selection-end-date > a.ui-state-default,
#top #wc-bookings-booking-form .wc-bookings-date-picker .picker
td.ui-datepicker-other-month.ui-datepicker-current-day > a.ui-state-default {
	background: #239e57 !important;
	border-color: #239e57 !important;
	color: #fff !important;
}

#top #wc-bookings-booking-form .wc-bookings-date-picker .picker
td.ui-datepicker-other-month.lc-bbr-minimum-blocked:not(.lc-bbr-checkout-only) > a.ui-state-default {
	background: #c1c1c1 !important;
	border-color: #c1c1c1 !important;
	color: #fff !important;
	cursor: not-allowed !important;
}

#top #wc-bookings-booking-form .wc-bookings-date-picker .picker
td.ui-datepicker-other-month.lc-bbr-unavailable-blocked:not(.lc-bbr-checkout-only) > a.ui-state-default,
#top #wc-bookings-booking-form .wc-bookings-date-picker .picker
td.ui-datepicker-other-month.lc-bbr-isolated-checkout-only > span.ui-state-default,
#top #wc-bookings-booking-form .wc-bookings-date-picker .picker
td.ui-datepicker-other-month.not_bookable > span.ui-state-default,
#top #wc-bookings-booking-form .wc-bookings-date-picker .picker
td.ui-datepicker-other-month.not_bookable_by_rules > span.ui-state-default {
	background: #ff7373 !important;
	border-color: #ff7373 !important;
	color: #fff !important;
	cursor: default !important;
}

/*
 * Keep the endpoints circular and join the days between them with a soft,
 * continuous band only once the end date is selected. The same presentation
 * is used while previewing the second date by hover or touch.
 */
#top #wc-bookings-booking-form .wc-bookings-date-picker .picker.lc-bbr-range-complete
td.bookable-range:not(.selection-start-date):not(.selection-end-date),
#top #wc-bookings-booking-form .wc-bookings-date-picker .picker
td.lc-bbr-preview-range:not(.lc-bbr-preview-start):not(.lc-bbr-preview-end) {
	background-image: linear-gradient(
		rgba(35, 158, 87, 0.65),
		rgba(35, 158, 87, 0.65)
	) !important;
	background-position: center !important;
	background-size: calc(100% + 2px) 38px!important;
	background-repeat: no-repeat !important;
}

#top #wc-bookings-booking-form .wc-bookings-date-picker .picker.lc-bbr-range-complete
td.bookable-range:not(.selection-start-date):not(.selection-end-date) a.ui-state-default,
#top #wc-bookings-booking-form .wc-bookings-date-picker .picker
td.lc-bbr-preview-range:not(.lc-bbr-preview-start):not(.lc-bbr-preview-end) a.ui-state-default {
	background: transparent !important;
	background-image: none !important;
	border-color: transparent !important;
	color: #fff !important;
}

#top #wc-bookings-booking-form .wc-bookings-date-picker .picker.lc-bbr-range-complete
td.selection-start-date:has(+ td.bookable-range),
#top #wc-bookings-booking-form .wc-bookings-date-picker .picker
td.lc-bbr-preview-start:has(+ td.lc-bbr-preview-range),
#top #wc-bookings-booking-form .wc-bookings-date-picker .picker
td.lc-bbr-preview-end:has(+ td.lc-bbr-preview-range) {
	background-image: linear-gradient(
		to right,
		transparent 0 50%,
		rgba(35, 158, 87, 0.65) 50% 100%
	) !important;
	background-position: center !important;
	background-size: calc(100% + 2px) 38px!important;
	background-repeat: no-repeat !important;
}

/* Preview the continuation at the right edge of a calendar row. */
#top #wc-bookings-booking-form .wc-bookings-date-picker .picker
tr:has(+ tr > td:first-child.lc-bbr-preview-range) > td.lc-bbr-preview-start:last-child,
#top #wc-bookings-booking-form .wc-bookings-date-picker .picker
tr:has(+ tr > td:first-child.lc-bbr-preview-range) > td.lc-bbr-preview-end:last-child {
	background-image: linear-gradient(
		to right,
		transparent 0 50%,
		rgba(35, 158, 87, 0.65) 50% 100%
	) !important;
	background-position: center !important;
	background-size: calc(100% + 2px) 38px!important;
	background-repeat: no-repeat !important;
}

#top #wc-bookings-booking-form .wc-bookings-date-picker .picker.lc-bbr-range-complete
td.bookable-range + td.selection-end-date,
#top #wc-bookings-booking-form .wc-bookings-date-picker .picker
td.lc-bbr-preview-range + td.lc-bbr-preview-end,
#top #wc-bookings-booking-form .wc-bookings-date-picker .picker
td.lc-bbr-preview-range + td.lc-bbr-preview-start {
	background-image: linear-gradient(
		to right,
		rgba(35, 158, 87, 0.65) 0 50%,
		transparent 50% 100%
	) !important;
	background-position: center !important;
	background-size: calc(100% + 2px) 38px!important;
	background-repeat: no-repeat !important;
}

/* Preview the continuation at the left edge of a calendar row. */
#top #wc-bookings-booking-form .wc-bookings-date-picker .picker
tr:has(> td.lc-bbr-preview-range:last-child) + tr > td.lc-bbr-preview-end:first-child,
#top #wc-bookings-booking-form .wc-bookings-date-picker .picker
tr:has(> td.lc-bbr-preview-range:last-child) + tr > td.lc-bbr-preview-start:first-child {
	background-image: linear-gradient(
		to right,
		rgba(35, 158, 87, 0.65) 0 50%,
		transparent 50% 100%
	) !important;
	background-position: center !important;
	background-size: calc(100% + 2px) 38px!important;
	background-repeat: no-repeat !important;
}

/*
 * Draw completed-range row-edge joins on their own layer. This keeps them
 * visible beside the endpoint circle without replacing adjacent-month cell
 * backgrounds.
 */
#top #wc-bookings-booking-form .wc-bookings-date-picker .picker.lc-bbr-range-complete
td.selection-start-date:last-child,
#top #wc-bookings-booking-form .wc-bookings-date-picker .picker.lc-bbr-range-complete
td.selection-end-date:first-child {
	position: relative;
}

#top #wc-bookings-booking-form .wc-bookings-date-picker .picker.lc-bbr-range-complete
td.selection-start-date:last-child::before,
#top #wc-bookings-booking-form .wc-bookings-date-picker .picker.lc-bbr-range-complete
td.selection-end-date:first-child::before {
	content: "";
	position: absolute;
	top: 50%;
	z-index: 0;
	display: block;
	width: 50%;
	height: 38px;
	transform: translateY(-50%);
	background: rgba(35, 158, 87, 0.65);
	pointer-events: none;
}

#top #wc-bookings-booking-form .wc-bookings-date-picker .picker.lc-bbr-range-complete
td.selection-start-date:last-child::before {
	left: 50%;
}

#top #wc-bookings-booking-form .wc-bookings-date-picker .picker.lc-bbr-range-complete
td.selection-end-date:first-child::before {
	left: 0;
}

#top #wc-bookings-booking-form .wc-bookings-date-picker .picker.lc-bbr-range-complete
td.selection-start-date:last-child > a.ui-state-default,
#top #wc-bookings-booking-form .wc-bookings-date-picker .picker.lc-bbr-range-complete
td.selection-end-date:first-child > a.ui-state-default {
	position: relative;
	z-index: 1;
}

/*
 * WooCommerce does not add its native split-day styling when a check-out-only
 * date is rendered as an adjacent-month cell. Mirror the normal presentation
 * so the same date looks identical in both month views.
 */
#top #wc-bookings-booking-form .wc-bookings-date-picker .picker
td.ui-datepicker-other-month.lc-bbr-checkout-only:not(.lc-bbr-minimum-blocked):not(.lc-bbr-isolated-checkout-only):not(.selection-start-date):not(.selection-end-date):not(.lc-bbr-pending-checkout) a.ui-state-default {
	background: linear-gradient(135deg, #fbfdfb 50%, #ff7373 50%) !important;
	border-color: #239e57 !important;
	color: #2b2f2c !important;
}

/* In the previous-month view, preview the selectable half on mouse hover. */
@media (hover: hover) and (pointer: fine) {
	#top #wc-bookings-booking-form .wc-bookings-date-picker .picker
	td.ui-datepicker-other-month.lc-bbr-checkout-only:not(.lc-bbr-minimum-blocked):not(.lc-bbr-isolated-checkout-only):hover a.ui-state-default,
	#top #wc-bookings-booking-form .wc-bookings-date-picker .picker
	td.ui-datepicker-other-month.lc-bbr-checkout-only:not(.lc-bbr-minimum-blocked):not(.lc-bbr-isolated-checkout-only) a.ui-state-default:hover,
	#top #wc-bookings-booking-form .wc-bookings-date-picker .picker
	td.ui-datepicker-other-month.lc-bbr-checkout-only:not(.lc-bbr-minimum-blocked):not(.lc-bbr-isolated-checkout-only) a.ui-state-default.ui-state-hover {
		background: linear-gradient(135deg, #239e57 50%, #ff7373 50%) !important;
		border-color: #239e57 !important;
		color: #fff !important;
	}
}

/*
 * A check-out-only day can also be too close to the selected check-in. Keep
 * its unavailable half red while showing the selectable half as blocked.
 */
#top #wc-bookings-booking-form .wc-bookings-date-picker .picker
td.lc-bbr-checkout-only:not(.lc-bbr-isolated-checkout-only) a.ui-state-default {
	cursor: pointer !important;
}

#top #wc-bookings-booking-form .wc-bookings-date-picker .picker
td.lc-bbr-checkout-only.lc-bbr-minimum-blocked:not(.lc-bbr-preview-range) a.ui-state-default {
	background: linear-gradient(135deg, #c1c1c1 50%, #ff7373 50%) !important;
	border-color: #c1c1c1 !important;
	color: #fff !important;
}

#top #wc-bookings-booking-form .wc-bookings-date-picker .picker
td.lc-bbr-checkout-only.lc-bbr-minimum-blocked.lc-bbr-preview-range a.ui-state-default {
	background: linear-gradient(135deg, #239e57 50%, #ff7373 50%) !important;
	border-color: #239e57 !important;
	color: #fff !important;
}

/* A selected check-out-only endpoint keeps its unavailable red half. */
#top #wc-bookings-booking-form .wc-bookings-date-picker .picker
td.lc-bbr-checkout-only.selection-start-date a.ui-state-default,
#top #wc-bookings-booking-form .wc-bookings-date-picker .picker
td.lc-bbr-checkout-only.selection-end-date a.ui-state-default,
#top #wc-bookings-booking-form .wc-bookings-date-picker .picker
td.lc-bbr-checkout-only.lc-bbr-pending-checkout a.ui-state-default,
/* Match the greater specificity of the adjacent-month base rule above. */
#top #wc-bookings-booking-form .wc-bookings-date-picker .picker
td.ui-datepicker-other-month.lc-bbr-checkout-only.selection-start-date a.ui-state-default,
#top #wc-bookings-booking-form .wc-bookings-date-picker .picker
td.ui-datepicker-other-month.lc-bbr-checkout-only.selection-end-date a.ui-state-default,
#top #wc-bookings-booking-form .wc-bookings-date-picker .picker
td.ui-datepicker-other-month.lc-bbr-checkout-only.lc-bbr-pending-checkout a.ui-state-default {
	background: linear-gradient(135deg, #239e57 50%, #ff7373 50%) !important;
	border-color: #239e57 !important;
	color: #fff !important;
}

/*
 * iOS can keep :hover on the same screen position after jQuery UI moves from
 * an adjacent-month day to its real month. Reset only that replacement cell;
 * selected dates and check-out-only split circles are left untouched.
 */
@media (hover: none), (pointer: coarse) {
	#top #wc-bookings-booking-form .wc-bookings-date-picker .picker
	td.lc-bbr-touch-hover-reset a.ui-state-default,
	#top #wc-bookings-booking-form .wc-bookings-date-picker .picker
	td.lc-bbr-touch-hover-reset a.ui-state-default:hover,
	#top #wc-bookings-booking-form .wc-bookings-date-picker .picker
	td.lc-bbr-touch-hover-reset a.ui-state-default.ui-state-hover {
		background: #fbfdfb !important;
		color: #2b2f2c !important;
		border-color: #239e57 !important;
	}
}
