/*
 * Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
 */

.ck-content .page-break {
	position: relative;
	clear: both;
	padding: 5px 0;
	display: flex;
	align-items: center;
	justify-content: center;

	&::after {
		content: '';
		position: absolute;
		border-bottom: 2px dashed hsl(0, 0%, 77%);
		width: 100%;
	}
}

.ck-content .page-break__label {
	position: relative;
	z-index: 1;
	padding: .3em .6em;
	display: block;
	text-transform: uppercase;
	border: 1px solid hsl(0, 0%, 77%);
	border-radius: 2px;
	font-size: 0.75em;
	font-weight: bold;
	color: hsl(0, 0%, 20%);
	background: hsl(0, 0%, 100%);
	box-shadow: 2px 2px 1px hsla(0, 0%, 0%, 0.15);

	/* Disable the possibility to select the label text by the user. */
	-webkit-user-select: none;
	user-select: none;
}

/* Do not show the page break element inside the print preview window. */
@media print {
	.ck-content .page-break {
		padding: 0;

		&::after {
			display: none;
		}
	}

	/*
	 * From time to time placing page-break directly after a block element with margin causes appending a new blank page in pagination mode.
	 * Removing margin-bottom from the block element fixes that issue and the margin is not being moved to the next blank page.
	 *
	 * Keep this in sync with the pagination plugins.
	 */
	.ck-content *:has(+ .page-break) {
		margin-bottom: 0;
	}
}
