/* C3 Meldingen Popup */
.c3m-overlay {
	--c3m-accent: #2563eb;
	position: fixed;
	inset: 0;
	z-index: 999999;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 16px;
	background: rgba(15, 23, 42, 0.55);
	opacity: 0;
	transition: opacity 0.25s ease;
}
.c3m-overlay.c3m-type-waarschuwing { --c3m-accent: #ea580c; }
.c3m-overlay.c3m-type-storing { --c3m-accent: #dc2626; }
.c3m-overlay.c3m-open { opacity: 1; }

.c3m-dialog {
	position: relative;
	width: 100%;
	max-width: 560px;
	max-height: calc(100vh - 32px);
	max-height: calc(100dvh - 32px);
	overflow-y: auto;
	background-color: var(--c3m-bg, #fff);
	background-image: var(--c3m-bg-image, none);
	background-size: cover;
	background-position: center;
	color: var(--c3m-text, #1e293b);
	border: var(--c3m-border-width, 3px) solid var(--c3m-border-color, var(--c3m-accent));
	border-radius: var(--c3m-radius, 12px);
	box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
	transform: translateY(16px);
	transition: transform 0.25s ease;
	font-size: 16px;
	line-height: 1.55;
}
.c3m-open .c3m-dialog { transform: none; }

.c3m-image {
	display: block;
	width: 100%;
	max-height: 260px;
	object-fit: cover;
}
.c3m-body { padding: 24px; }
.c3m-title {
	margin: 0 0 12px;
	font-size: 1.35em;
	line-height: 1.25;
	color: inherit;
}
/* Reset tegen thema-opmaak (marges, max-width, inspringen) */
.c3m-overlay .c3m-dialog .c3m-content,
.c3m-overlay .c3m-dialog .c3m-content > * {
	margin-left: 0;
	margin-right: 0;
	padding-left: 0;
	padding-right: 0;
	max-width: none;
	width: auto;
	text-indent: 0;
}
.c3m-overlay .c3m-dialog .c3m-content > * { margin-top: 0; margin-bottom: 12px; }
.c3m-overlay .c3m-dialog .c3m-content > *:last-child { margin-bottom: 0; }
.c3m-content img { max-width: 100%; height: auto; }
.c3m-content .alignleft { float: left; margin: 0 16px 8px 0; }
.c3m-content .alignright { float: right; margin: 0 0 8px 16px; }
.c3m-content .aligncenter { display: block; margin-left: auto; margin-right: auto; }
.c3m-content::after { content: ""; display: table; clear: both; }
.c3m-content ul, .c3m-content ol { padding-left: 1.4em; }
.c3m-content a { color: var(--c3m-accent); }

.c3m-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	margin-top: 8px;
}
.c3m-button,
.c3m-cta {
	display: inline-block;
	padding: 12px 22px;
	border: 2px solid transparent;
	border-radius: 8px;
	font: inherit;
	font-weight: 600;
	line-height: 1.3;
	text-align: center;
	text-decoration: none;
	cursor: pointer;
}
.c3m-button { background: var(--c3m-accent); color: #fff; }
.c3m-cta,
.c3m-cta:visited { background: var(--c3m-cta-bg, var(--c3m-accent)); color: var(--c3m-cta-text, #fff); }
.c3m-has-cta .c3m-button { background: transparent; color: inherit; border-color: currentColor; }
.c3m-button:hover,
.c3m-cta:hover { filter: brightness(1.1); }
.c3m-cta:focus-visible,
.c3m-button:focus-visible,
.c3m-close:focus-visible { outline: 3px solid #0f172a; outline-offset: 2px; }

.c3m-close {
	position: absolute;
	top: 10px;
	right: 10px;
	width: 36px;
	height: 36px;
	border: 0;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.9);
	color: #1e293b;
	font-size: 24px;
	line-height: 36px;
	text-align: center;
	cursor: pointer;
	padding: 0;
}

@media (max-width: 480px) {
	.c3m-overlay { align-items: flex-end; padding: 0; }
	.c3m-dialog { max-width: none; border-bottom-width: 0; border-radius: var(--c3m-radius, 12px) var(--c3m-radius, 12px) 0 0; max-height: 90vh; max-height: 90dvh; }
	.c3m-body { padding: 20px; }
	.c3m-actions { flex-direction: column; }
	.c3m-button, .c3m-cta { width: 100%; }
	.c3m-image { max-height: 180px; }
	.c3m-content .alignleft, .c3m-content .alignright { float: none; display: block; margin: 0 auto 8px; }
}

@media (prefers-reduced-motion: reduce) {
	.c3m-overlay, .c3m-dialog { transition: none; }
}
