/* ============================================================
 * Maand-grid: kalender-rooster met multi-day event-stacking.
 * Alle styling onder .mc-scope om Salient-conflicten te beperken.
 * ============================================================ */

.mc-scope .mc-month {
	position: relative;
}

.mc-scope .mc-month__header {
	display: flex;
	align-items: center;
	gap: 12px;
	margin-bottom: 14px;
}
.mc-scope .mc-month__nav {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 32px;
	height: 32px;
	border-radius: 6px;
	background: #fff;
	border: 1px solid #d1d5db;
	color: #111827;
	text-decoration: none;
	font-size: 18px;
	line-height: 1;
}
.mc-scope .mc-month__nav:hover {
	background: #f3f4f6;
}
.mc-scope .mc-month__label {
	flex: 1;
	margin: 0;
	font-size: 22px;
	font-weight: 700;
	color: #111827;
}
.mc-scope .mc-month__today {
	padding: 6px 12px;
	border-radius: 6px;
	background: #fff;
	border: 1px solid #d1d5db;
	color: #111827;
	text-decoration: none;
	font-size: 13px;
	font-weight: 600;
}
.mc-scope .mc-month__today.is-current {
	background: #111827;
	color: #fff;
	border-color: #111827;
}

/* ----- Desktop grid ----- */
.mc-scope .mc-month__grid {
	border: 1px solid #e5e7eb;
	border-radius: 8px;
	overflow: hidden;
	background: #fff;
}
.mc-scope .mc-month__weekdays {
	display: grid;
	grid-template-columns: repeat( 7, 1fr );
	background: #f9fafb;
	border-bottom: 1px solid #e5e7eb;
}
.mc-scope .mc-month__weekday {
	padding: 8px 10px;
	font-size: 12px;
	font-weight: 700;
	color: #6b7280;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	border-right: 1px solid #e5e7eb;
}
.mc-scope .mc-month__weekday:last-child {
	border-right: 0;
}

.mc-scope .mc-month__week {
	display: grid;
	grid-template-columns: repeat( 7, 1fr );
	grid-auto-rows: auto;
	border-bottom: 1px solid #e5e7eb;
	min-height: 110px;
	position: relative;
}
.mc-scope .mc-month__week:last-child {
	border-bottom: 0;
}

.mc-scope .mc-month__day {
	position: relative;
	min-height: 110px;
	padding: 6px 8px;
	border-right: 1px solid #f0f1f3;
	grid-row: 1 / -1;
}
.mc-scope .mc-month__day:nth-child(7n) {
	border-right: 0;
}
.mc-scope .mc-month__day.is-other-month {
	background: #fafbfc;
	color: #9ca3af;
}
.mc-scope .mc-month__day.is-past .mc-month__day-number {
	color: #9ca3af;
}
.mc-scope .mc-month__day.is-today {
	background: #fffbeb;
}
.mc-scope .mc-month__day.is-today .mc-month__day-number {
	color: #111827;
	font-weight: 700;
}

.mc-scope .mc-month__day-number {
	display: inline-block;
	min-width: 24px;
	font-size: 12px;
	font-weight: 600;
	color: #374151;
	margin-bottom: 4px;
}

.mc-scope .mc-month__more {
	position: absolute;
	left: 6px;
	right: 6px;
	bottom: 6px;
	background: transparent;
	border: 0;
	padding: 2px 6px;
	font-size: 11px;
	font-weight: 600;
	color: #1d4f91;
	text-align: left;
	cursor: pointer;
	border-radius: 4px;
}
.mc-scope .mc-month__more:hover {
	background: rgba( 29, 79, 145, 0.08 );
}

/* Events overlap dag-cellen via grid-row 2..N. */
.mc-scope .mc-event {
	margin: 0 2px;
	padding: 4px 8px;
	border: 0;
	border-radius: 4px;
	font-size: 12px;
	font-weight: 600;
	line-height: 1.2;
	cursor: pointer;
	overflow: hidden;
	white-space: nowrap;
	text-overflow: ellipsis;
	min-height: 22px;
	align-self: start;
	z-index: 1;
}
.mc-scope .mc-event:hover {
	filter: brightness( 0.95 );
}
.mc-scope .mc-event__label {
	display: block;
	overflow: hidden;
	text-overflow: ellipsis;
}
.mc-scope .mc-event.is-past {
	opacity: 0.55;
}
.mc-scope .mc-event.is-geannuleerd {
	opacity: 0.4;
	text-decoration: line-through;
}
.mc-scope .mc-event.is-continuation {
	border-top-left-radius: 0;
	border-bottom-left-radius: 0;
}
.mc-scope .mc-event.is-continued {
	border-top-right-radius: 0;
	border-bottom-right-radius: 0;
}

/* Mobile day-list: standaard verborgen */
.mc-scope .mc-month__list {
	display: none;
}

@media ( max-width: 768px ) {
	.mc-scope .mc-month__grid {
		display: none;
	}
	.mc-scope .mc-month__list {
		display: block;
	}
	.mc-scope .mc-month__list-day {
		padding: 12px 14px;
		border-bottom: 1px solid #e5e7eb;
		background: #fff;
	}
	.mc-scope .mc-month__list-day:first-child {
		border-top: 1px solid #e5e7eb;
		border-radius: 8px 8px 0 0;
	}
	.mc-scope .mc-month__list-day:last-child {
		border-radius: 0 0 8px 8px;
	}
	.mc-scope .mc-month__list-day.is-today {
		background: #fffbeb;
	}
	.mc-scope .mc-month__list-day.is-past .mc-month__list-day-name {
		color: #9ca3af;
	}
	.mc-scope .mc-month__list-day-header {
		display: flex;
		align-items: baseline;
		gap: 10px;
		margin-bottom: 6px;
	}
	.mc-scope .mc-month__list-day-number {
		font-size: 22px;
		font-weight: 700;
		color: #111827;
	}
	.mc-scope .mc-month__list-day-name {
		font-size: 13px;
		color: #6b7280;
	}
	.mc-scope .mc-month__list-events {
		list-style: none;
		margin: 0;
		padding: 0;
	}
	.mc-scope .mc-month__list-events li {
		margin-bottom: 4px;
	}
	.mc-scope .mc-event--list {
		width: 100%;
		text-align: left;
		padding: 8px 10px;
		font-size: 14px;
	}
}

/* ----- Popover ----- */
.mc-scope .mc-popover {
	position: fixed;
	background: #fff;
	border: 1px solid #e5e7eb;
	border-left: 6px solid var( --mc-popover-accent, #cccccc );
	border-radius: 8px;
	box-shadow: 0 10px 30px rgba( 0, 0, 0, 0.12 );
	padding: 16px 18px;
	min-width: 280px;
	max-width: 360px;
	z-index: 9999;
}
.mc-scope .mc-popover[hidden] {
	display: none;
}
.mc-scope .mc-popover__close {
	position: absolute;
	top: 8px;
	right: 8px;
	background: transparent;
	border: 0;
	font-size: 20px;
	cursor: pointer;
	color: #6b7280;
	width: 24px;
	height: 24px;
	line-height: 1;
}
.mc-scope .mc-popover__title {
	margin: 0 0 4px;
	font-size: 13px;
	color: #6b7280;
	text-transform: uppercase;
	letter-spacing: 0.04em;
}
.mc-scope .mc-popover__training {
	font-size: 18px;
	font-weight: 700;
	color: #111827;
	display: block;
	margin-bottom: 10px;
	text-decoration: underline;
}
.mc-scope .mc-popover dl {
	display: grid;
	grid-template-columns: 80px 1fr;
	gap: 4px 10px;
	margin: 0 0 14px;
	font-size: 13px;
}
.mc-scope .mc-popover dt {
	color: #6b7280;
}
.mc-scope .mc-popover dd {
	margin: 0;
	color: #111827;
}
.mc-scope .mc-popover__actions {
	display: flex;
	gap: 10px;
	border-top: 1px solid #f0f1f3;
	padding-top: 10px;
}
.mc-scope .mc-popover__actions a {
	flex: 1;
	text-align: center;
	padding: 8px 12px;
	border-radius: 6px;
	font-weight: 600;
	font-size: 13px;
	text-decoration: none;
}
.mc-scope .mc-popover__more-info {
	background: #fff;
	border: 1px solid #d1d5db;
	color: #111827;
}
.mc-scope .mc-popover__cta {
	background: #111827;
	color: #fff;
}
.mc-scope .mc-popover__cta--disabled {
	background: #e5e7eb;
	color: #6b7280;
	cursor: not-allowed;
}

@media ( max-width: 768px ) {
	.mc-scope .mc-popover {
		left: 12px !important;
		right: 12px !important;
		top: auto !important;
		bottom: 12px !important;
		min-width: 0;
		max-width: none;
	}
}
