/* Base look for the container */
.c2-mehranzeigen-block {
	position: relative;
	--c2ma-pad: 1px; /* tiny safety so last line never clips */
}

/* Clamp/expand animates the CONTENT, not the whole block */
.c2-mehranzeigen-block > .c2ma__content {
	transition: max-height .2s ease-in-out;
}

/* (Optional) Gradient fade while clamped: apply to content only
.c2-mehranzeigen-block.c2ma--clamped > .c2ma__content::after {
	content: "";
	position: absolute;
	left: 0; right: 0; bottom: 0;
	height: 3em;
	pointer-events: none;
	background: linear-gradient(to bottom, rgba(255,255,255,0), rgba(255,255,255,1));
}
*/

/* Actions row lives below the clamped content (always visible) */
.c2-mehranzeigen-block > .c2ma__actions {
	display: block;
	margin-top: .4rem;
}

/* If preview HTML exists from older saves, hide it unless we're in manual mode */
.c2-mehranzeigen-block:not(.c2ma--manual) > .c2ma__preview {
	display: none;
}

/* Toggle button */
.c2-mehranzeigen-block .c2ma__toggle {
	display: inline-block;
	padding: .35rem .65rem;
	font: inherit;
	color: inherit;
	background: transparent;
	border: 1px solid currentColor;
	border-radius: 4px;
	cursor: pointer;
}

/* Manual mode visibility */
.c2ma--manual.c2ma--collapsed > .c2ma__preview { display: block; }
.c2ma--manual.c2ma--collapsed > .c2ma__content { display: none;  }
.c2ma--manual.c2ma--expanded  > .c2ma__preview { display: none;  }
.c2ma--manual.c2ma--expanded  > .c2ma__content { display: block; }

/* Clamp: make paragraphs flow as text so line-clamp works reliably across multiple <p> */
.c2-mehranzeigen-block.c2ma--clamped > .c2ma__content > p {
	display: inline;
	margin: 0;
}

.c2-mehranzeigen-block.c2ma--clamped > .c2ma__content > p + p::before {
	content: "\A\A";
	white-space: pre;
}
