/*
 * Card lists with a "Rodyti daugiau" (R13; assets/js/show-more.js explains the rule: 4 full rows at the
 * list's own column count, 8 cards on a one-column phone, the same amount more per press, a button only
 * when it would hide more than one row).
 *
 *   .mn-paged     the list element (a query loop's post-template, a catalogue grid): the templates and
 *                 the category converter put the class there, so a new project, sale, article or product
 *                 needs no hand edit
 *   .mn-more      the button block after it (core/buttons): the words are the block's own
 *   .is-later     a card past the first view: out of the layout, still in the HTML
 *
 * The button pill is the Galerija's (galerija.css). Without JavaScript the button stays hidden and every
 * card shows. In the block editor the button is shown, so the client can reach its words (the cards are
 * never hidden there: no script runs).
 */

.mn-paged > .is-later {
	display: none !important;
}

/* two classes: core's own .wp-block-buttons (display: flex) is as specific as one */
.wp-block-buttons.mn-more {
	display: none;
	justify-content: center;
	gap: 0;
	margin: 65px 0 0;
	padding-inline: var(--mn-gutter, 20px);
}

.wp-block-buttons.mn-more.is-active:not([hidden]),
.editor-styles-wrapper .wp-block-buttons.mn-more {
	display: flex;
}

@media (max-width: 1023.98px) {
	.wp-block-buttons.mn-more {
		margin-top: 32px;
	}
}
