/*-----------------------------------------------------------------------------
# Dashicons
-----------------------------------------------------------------------------*/
/**
 * Override core WordPress base Dashicon styles. Don't let it alter height, 
 * width, font-size or line-height. wp-site-blocks is used for specificity.
 * is-root-container is needed for the Editor.
 */
.wp-site-blocks .dashicons,
.wp-site-blocks .dashicons-before,
.is-root-container .dashicons,
.is-root-container .dashicons-before {
// 	display: block;
	display: inherit;
	width: auto;
	height: auto;
	font-family: inherit;
	font-size: inherit;
	font-weight: var(--wp--custom--typography--font-weight--normal);
	line-height: inherit;
// 	text-align: center;
	text-align: inherit;
	text-transform: inherit;
}

.wp-site-blocks .dashicons.has-text-align-center,
.wp-site-blocks .dashicons-before.has-text-align-center,
.is-root-container .dashicons.has-text-align-center,
.is-root-container .dashicons-before.has-text-align-center {
	text-align: center;
}

.wp-site-blocks .dashicons:before,
.wp-site-blocks [class*="dashicons-"]:before, // {
.is-root-container .dashicons:before,
.is-root-container [class*="dashicons-"]:before {
	display: inline-block;
	width: auto;
	height: auto;
	font-family: dashicons;
	font-size: 1em;
	line-height: 1;
	font-weight: inherit;
// 	vertical-align: text-top;
	vertical-align: text-bottom;
}

/* Add some right margin on inline dashicons before the text */
[class*="dashicons-"]:not(.dashicons-after):before {
	margin-right: var(--wp--preset--spacing--20);
}

.dashicons-after {
	display: flex;	
	&:before {
		order: 2;
		margin-left: var(--wp--preset--spacing--20);
	}
}

/* Don't underline dashicons links */
a[class*="dashicons-"],
[class*="dashicons-"] a {
	text-decoration: none;
}

/* Style Dashicons in Nav menus */
.wp-block-navigation-item.dashicons {
	display: flex;
	flex-direction: row;	
}

/* Don't duplicate icons on drop-down menus (submenu containers) */
[class*="dashicons-"].wp-block-navigation-submenu > [class*="dashicons-"].wp-block-navigation__submenu-container:before {
	content: none !important;
}

/* Move the left padding on navigation items to the icon */
.wp-block-navigation .wp-block-navigation__submenu-container [class*="dashicons-"].wp-block-navigation-item {
	&:before {
		padding-left: 1em; 
	}
	
	& a:not(.wp-element-button) {
		padding-left: var(--wp--preset--spacing--20);
	}
}

/* Don't display icons on mobile menu because they can't be placed inline */
.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__responsive-container-content {
	[class*="dashicons-"]:before {
		content: none;
	}
}

/* Nav menus already have transitions and text align, so inherit them */
.wp-block-navigation [class*="dashicons-"] {
	transition: inherit;
	text-align: inherit;
}
