/**
 * WP Custom iCal Booking Form — frontend overrides.
 * Loaded after Flatpickr's stylesheet.
 */

/* Optional admin-defined note under the consent checkboxes. */
.wpib-form-note {
	font-size: 0.9375em;
	line-height: 1.6;
	opacity: 0.85;
}

.wpib-form-note > :last-child {
	margin-bottom: 0;
}

/* Unavailable (blocked) dates: draw a grey "X" across the day cell.
 *
 * `.wpib-too-short` marks check-out days that would break the minimum-stay
 * rule. It deliberately does NOT use Flatpickr's own `disable`, because in
 * range mode a disabled day between the start and a candidate end makes every
 * later day unselectable (`notAllowed`). Blocking pointer events instead keeps
 * the valid days beyond the gap fully selectable.
 */
.flatpickr-day.flatpickr-disabled,
.flatpickr-day.flatpickr-disabled:hover,
.flatpickr-day.wpib-too-short,
.flatpickr-day.wpib-too-short:hover {
	position: relative;
	color: #9aa0a6;
}

.flatpickr-day.wpib-too-short {
	pointer-events: none;
	background: transparent;
	border-color: transparent;
	cursor: default;
}

.flatpickr-day.flatpickr-disabled::after,
.flatpickr-day.wpib-too-short::after {
	content: "";
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	pointer-events: none;
	background-image:
		linear-gradient(
			to top right,
			transparent calc(50% - 0.9px),
			rgba(108, 117, 125, 0.6) calc(50% - 0.9px),
			rgba(108, 117, 125, 0.6) calc(50% + 0.9px),
			transparent calc(50% + 0.9px)
		),
		linear-gradient(
			to bottom right,
			transparent calc(50% - 0.9px),
			rgba(108, 117, 125, 0.6) calc(50% - 0.9px),
			rgba(108, 117, 125, 0.6) calc(50% + 0.9px),
			transparent calc(50% + 0.9px)
		);
}
