/**
 * Collapsible category / shop archive description on mobile.
 *
 * On small screens a long term description could fill the whole viewport,
 * pushing the product grid entirely below the fold ("μόνο το κείμενο και
 * καθόλου τα προϊόντα"). On mobile the description is clamped to a few lines
 * with a "Περισσότερα / Λιγότερα" toggle (injected by
 * js/theme.category-description.js). Desktop is unaffected.
 */

/* Toggle button — hidden until the JS decides the text actually overflows,
   and never shown on desktop. */
.nvm-term-description-toggle {
	display: none;
	margin: 0.5em 0 0;
	padding: 0;
	border: 0;
	background: none;
	color: inherit;
	font: inherit;
	font-weight: 700;
	text-decoration: underline;
	cursor: pointer;
}

@media ( max-width: 767px ) {

	.column-content .term-description.nvm-collapsible {
		position: relative;
		overflow: hidden;
		/* ~3 lines of copy. */
		max-height: 4.6em;
		transition: max-height 0.3s ease;
	}

	/* Fade-out hint at the clamped edge. */
	.column-content .term-description.nvm-collapsible::after {
		content: "";
		position: absolute;
		left: 0;
		right: 0;
		bottom: 0;
		height: 1.8em;
		background: linear-gradient( to bottom, rgba( 255, 255, 255, 0 ), #fff );
		pointer-events: none;
	}

	.column-content .term-description.nvm-collapsible.is-expanded {
		max-height: 200em;
	}

	.column-content .term-description.nvm-collapsible.is-expanded::after {
		display: none;
	}
}
