/**
 * Nomas Content Display Manager — front-end styles.
 *
 * Kept intentionally minimal: a few base rules, everything else is left to the
 * theme (Astra, Elementor, …) so no visual conflict is created.
 */

.ncdm-block {
	box-sizing: border-box;
	width: 100%;
	margin: 0 0 1.5em;
}

.ncdm-block::after {
	content: "";
	display: table;
	clear: both;
}

.ncdm-figure {
	margin: 0;
	padding: 0;
	max-width: 100%;
}

.ncdm-media,
.ncdm-figure img,
.ncdm-figure video {
	display: block;
	height: auto;
	max-width: 100%;
	box-sizing: border-box;
}

.ncdm-figure video.ncdm-media {
	width: 100%;
	object-fit: contain;
	background: #000;
}

.ncdm-media-link {
	display: inline-block;
	max-width: 100%;
	line-height: 0;
}

/* Keep HTML blocks responsive without touching the theme's own rules. */
.ncdm-type-html img,
.ncdm-type-html video,
.ncdm-type-html iframe,
.ncdm-type-html table {
	max-width: 100%;
}

.ncdm-type-html iframe {
	width: 100%;
	border: 0;
}

@media (max-width: 782px) {
	.ncdm-block {
		margin-bottom: 1.2em;
	}

	.ncdm-figure video.ncdm-media {
		height: auto;
	}
}
