/*
 * 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-dropdown-menu-menu-panel-max-width: 75vw;
}

.ck.ck-balloon-panel.ck-dropdown-menu__nested-menu__panel {
	box-shadow: var(--ck-drop-shadow), 0 0;

	background: var(--ck-color-dropdown-panel-background);
	border: 1px solid var(--ck-color-dropdown-panel-border);
	bottom: 0;
	height: fit-content;
	max-width: var(--ck-dropdown-menu-menu-panel-max-width);
	position: absolute;
	max-height: 314px; /* With the default settings, this is equal to 10 menu items. */
	overflow-y: auto;

	/* Reset balloon styling */
	&::after,
	&::before {
		display: none;
	}

	/* Corner border radius consistent with the button. */
	&.ck-balloon-panel_es,
	&.ck-balloon-panel_se {
		border-top-left-radius: 0;
	}

	&.ck-balloon-panel_ws,
	&.ck-balloon-panel_sw {
		border-top-right-radius: 0;
	}

	&.ck-balloon-panel_en,
	&.ck-balloon-panel_ne {
		border-bottom-left-radius: 0;
	}

	&.ck-balloon-panel_wn,
	&.ck-balloon-panel_nw {
		border-bottom-right-radius: 0;
	}

	&:focus {
		outline: none;
	}
	z-index: calc(var(--ck-z-panel) + 1)
}
