/* Low-specificity defaults shared with the composition editor.
 * Colors, gradients, spacing and borders saved by Gutenberg take priority.
 */
.lexleman-mobile-panel {
	box-sizing: border-box;
	width: 100%;
	max-width: 640px;
	min-height: 100dvh;
	margin: 0 0 0 auto;
}

.lexleman-mobile-toolbar {
	position: sticky;
	top: max(12px, env(safe-area-inset-top));
	z-index: 5;
	/* Keep controls readable over scrolled links; saved toolbar styles still win. */
	background: inherit;
}

.lexleman-mobile-close {
	display: flex;
	align-items: center;
	justify-content: center;
	min-width: 48px;
	min-height: 48px;
	padding: 12px;
	border: 1px solid color-mix(in srgb, currentColor 25%, transparent);
	border-radius: 50%;
	background-color: inherit;
	color: inherit;
}

.lexleman-mobile-navigation {
	width: 100%;
	font-size: 1rem;
}

.lexleman-mobile-navigation .wp-block-navigation__container {
	width: 100%;
	font-size: inherit;
	line-height: inherit;
	align-items: stretch;
	flex-direction: column;
}

.lexleman-mobile-navigation .wp-block-navigation-item__content {
	text-align: left;
	white-space: normal;
	overflow-wrap: anywhere;
}

/* Mobile parts also keep their layout when edited on a desktop screen. */
.lexleman-mobile-mega-grid {
	font-size: inherit;
	max-height: none;
	padding: 0;
	border: 0;
	border-radius: 0;
	background: transparent;
	box-shadow: none;
	overflow: visible;
}

.lexleman-mobile-mega-grid.is-layout-grid {
	grid-template-columns: minmax(0, 1fr);
}

.lexleman-mobile-mega-grid .lexleman-mega-card {
	min-height: 58px;
}
