/* RésaPlaneur – month calendars of the booking page, the available slots and the pilot area.
   Default values without specificity: a rule of the site's Additional CSS always overrides them. */

:where(.vd-booking, .vd-availability, .vd-pilot, .vd-off-season) {
	--vd-accent: #1d5fa6;
	--vd-accent-text: #fff;
	--vd-border: #c9ced6;
	--vd-muted: #5b6470;
	--vd-open: #e7f0fa;
	--vd-radius: 8px;
}

.vd-month-nav {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-bottom: 0.5em;
}

.vd-month-nav .vd-button {
	min-width: 44px;
	padding: 0.4em 0.8em;
}

.vd-month-title {
	font-weight: 600;
}

.vd-grid {
	display: grid;
	grid-template-columns: repeat(7, 1fr);
	gap: 4px;
}

.vd-weekday {
	text-align: center;
	font-size: 0.8em;
	color: var(--vd-muted);
}

.vd-weekday::first-letter {
	text-transform: uppercase;
}

.vd-date {
	aspect-ratio: 1;
	min-height: 40px;
	border: 1px solid transparent;
	border-radius: var(--vd-radius);
	background: transparent;
	color: var(--vd-muted);
	font: inherit;
}

.vd-date.vd-open {
	background: var(--vd-open);
	border-color: var(--vd-accent);
	color: var(--vd-accent);
	font-weight: 700;
	cursor: pointer;
}

/* Sessions not open for booking yet (RG-24): greyed, dashed, still clickable for their opening date. */
.vd-date.vd-later {
	border: 1px dashed var(--vd-border);
	background: repeating-linear-gradient(-45deg, transparent 0 4px, rgb(0 0 0 / 4%) 4px 8px);
	color: var(--vd-muted);
	cursor: pointer;
}

.vd-date:disabled {
	opacity: 0.45;
}

/* Day chosen (available slots) or shown (pilot area). */
.vd-date[aria-pressed="true"],
.vd-date[aria-current="date"] {
	background: var(--vd-accent);
	border-color: var(--vd-accent);
	color: var(--vd-accent-text);
}

.vd-date.vd-today {
	text-decoration: underline;
	text-underline-offset: 3px;
}

/* Days that are links (pilot area): every day opens its flight sheet. */
a.vd-date {
	display: flex;
	align-items: center;
	justify-content: center;
	text-decoration: none;
}

a.vd-date:hover,
a.vd-date:focus-visible {
	border-color: var(--vd-accent);
}
