/*
 * Navigation block tweaks
 */

.wp-block-navigation-item > .wp-block-navigation-item__content,
.wp-block-loginout > a {
	border-radius: var(--wp--custom--global-border-radius);
	padding: calc(var(--wp--custom--v-spacing) * .4) !important;
}
.block-editor-block-list__block.wp-block-navigation-item , /* nav item in editor */
.wp-block-navigation__container .wp-block-navigation-item,
.wp-block-loginout > a {
	transition: background-color .2s linear;
	border-radius: var(--wp--custom--global-border-radius);
}
.block-editor-block-list__block.wp-block-navigation-item:hover, /* nav item in editor */
.wp-block-navigation__container .wp-block-navigation-item:hover,
.wp-block-loginout > a:hover {
	background-color: var(--wp--preset--color--secondary) !important;
}
.block-editor-block-list__block.wp-block-navigation-item:hover > a, /* nav item in editor */
.wp-block-navigation__container .wp-block-navigation-item:hover > a,
.wp-block-navigation__container .wp-block-navigation-item:hover > button,
.wp-block-loginout > a:hover {
	text-decoration: underline;
}

.open-on-click .wp-block-navigation__submenu-icon {
	margin-left: 0 !important;
}

/* Submenu */
.wp-block-navigation__submenu-container {
	width: auto !important;
	height: auto !important;
}


/* Submenu items */
.wp-block-navigation__container > .wp-block-navigation-item  .wp-block-navigation__submenu-container {
	box-shadow: 0.8vw 0.8vw 0 rgba(0,0,0,.15);
	border-radius: var(--wp--custom--global-border-radius);
	background-color: var(--wp--preset--color--background);
	border-color: var(--wp--preset--color--foreground);
}
.wp-block-navigation__container > .wp-block-navigation-item .wp-block-navigation__submenu-container .wp-block-navigation-item__label {
	font-size: 0.9em;
}

/* Nav modal */
/*@media screen and (max-width: 599px) {*/

	.wp-block-navigation__responsive-container.has-modal-open .wp-block-navigation-item > .wp-block-navigation__submenu-container {
		display: none;
		visibility: hidden;
		opacity: 0;
		transition: opacity .5s linear;
		box-shadow: none;
		padding: var(--wp--custom--h-spacing)!important;
	}
	.wp-block-navigation__responsive-container.has-modal-open .wp-block-navigation-item > .wp-block-navigation__submenu-container.active {
		display: block;
		visibility: visible;
		opacity: 1;
	}
	.wp-block-navigation__responsive-container.has-modal-open .subarrow {
		position: relative;
		display: inline-block;
		left: 25px;
		height: 25px;
		line-height: 1.2;
		cursor: pointer;
		transform: rotate(0);
		transform-origin: center center;
		transition: transform .2s linear;
	}

	.wp-block-navigation__responsive-container.has-modal-open .subarrow.active {
		transform: rotate(180deg)
	}
/*}*/
