/*
 * 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
 */

:root {
	--ck-color-minimap-tracker-background: 208, 0%, 51%;
	--ck-color-minimap-iframe-outline: hsl(0deg 0% 75%);
	--ck-color-minimap-iframe-shadow: hsl(0deg 0% 0% / 11%);
	--ck-color-minimap-progress-background: hsl(0,0%,40%);
}

.ck.ck-minimap {
	position: absolute;
	user-select: none;
	background: var(--ck-color-base-background);

	&,
	& iframe {
		width: 100%;
		height: 100%;
	}

	& iframe {
		border: 0;
		pointer-events: none;
		position: relative;
		outline: 1px solid var(--ck-color-minimap-iframe-outline);
		box-shadow: 0 2px 5px var(--ck-color-minimap-iframe-shadow);
		margin: 0;
	}

	& .ck.ck-minimap__position-tracker {
		position: absolute;
		width: 100%;
		top: 0;
		background: hsla( var(--ck-color-minimap-tracker-background), .2 );
		z-index: 1;
		transition: background 100ms ease-in-out;


		@media (prefers-reduced-motion: reduce) {
			transition: none;
		}

		&:hover {
			background:hsla( var(--ck-color-minimap-tracker-background), .3 );
		}

		&.ck-minimap__position-tracker_dragging,
		&.ck-minimap__position-tracker_dragging:hover {
			background:hsla( var(--ck-color-minimap-tracker-background), .4 );

			&::after {
				opacity: 1;
			}
		}

		&::after {
			content: attr(data-progress) "%";
			position: absolute;
			top: 5px;
			right: 5px;
			background: var(--ck-color-minimap-progress-background);
			color: var(--ck-color-base-background);
			border: 1px solid var(--ck-color-base-background);
			padding: 2px 4px;
			font-size: 10px;
			border-radius: 3px;
			opacity: 0;
			transition: opacity 100ms ease-in-out;


			@media (prefers-reduced-motion: reduce) {
				transition: none;
			}
		}
	}
}

