@import
	'../../mixins',
	'../../variables';


@if ( $mm_opt_searchfield )
{
	.mm-searchfield
	{
		display: flex;
		height: $mm_navbarSize; //	IE11 fallback
		height: var( --mm-navbar-size );
		padding: 0;
		overflow: hidden;

		input
		{
			border: none !important;
			outline: none !important;
			box-shadow: none !important;
			border-radius: 4px;
			background: $mm_highlightedBackgroundColor;	//	IE11 fallback
			background: var( --mm-color-background-highlight );
			color: $mm_textColor;	//	IE11 fallback
			color: var( --mm-color-text );
			font: inherit;
			font-size: inherit;
			line-height: $mm_navbarSize * 0.8; //	IE11 fallback
			line-height: calc( var( --mm-navbar-size ) * 0.7 );
			display: block;
			box-sizing: border-box;
			width: 100%;
			max-width: 100%;
			height: $mm_navbarSize - ( $mm_padding * 2 ); //	IE11 fallback
			height: calc( var( --mm-navbar-size ) * 0.7 );
			min-height: unset;
			max-height: unset;
			margin: 0;
			padding: 0 $mm_padding;
		}
		input::-ms-clear
		{
			display: none;
		}
	}
	.mm-searchfield__input
	{
		padding: ($mm_navbarSize * 0.15) $mm_padding 0 $mm_padding;
		padding-top: calc( var( --mm-navbar-size ) * 0.15 );
		position: relative;
	}

	.mm-panel__noresultsmsg
	{
		color: $mm_dimmedTextColor;	//	IE11 fallback
		color: var( --mm-color-text-dimmed );
		text-align: center;
		font-size: 150%;
		padding: $mm_btnSize 0;
	}

	@if ( $mm_opt_searchfield_btn )
	{
		.mm-searchfield__btn
		{
			position: absolute;
			right: 0;
			top: 0;
			bottom: 0;
		}
	}

	@if ( $mm_opt_searchfield_searchpanel )
	{
		.mm-panel_search
		{
			left: 0 !important;
			right: 0 !important;
			width: 100% !important;
			border-left: none !important;
		}
		.mm-searchfield__input
		{
			flex: 1;
			box-sizing: border-box;
			width: 100%;
			max-width: 100%;
		}
		.mm-searchfield__cancel
		{
			line-height: $mm_navbarSize; //	IE11 fallback
			line-height: var( --mm-navbar-size );

			text-decoration: none;
			display: block;
			padding-right: $mm_padding;
			margin-right: -100px;

			transition: margin $mm_transitionDuration $mm_transitionFunction;
		}
		.mm-searchfield__cancel-active
		{
			margin-right: 0;
		}
	}

	@if ( $mm_opt_searchfield_panel )
	{
		.mm-panel > .mm-searchfield
		{
			width: 100%;
			position: absolute;
			top: 0;
			left: 0;
		}

		.mm-panel_has-searchfield
		{
			padding-top: $mm_navbarSize; //	IE11 fallback
			padding-top: var( --mm-navbar-size );
		}
		.mm-panel_has-navbar.mm-panel_has-searchfield
		{
			padding-top: $mm_navbarSize * 2; //	IE11 fallback
			padding-top: calc( var( --mm-navbar-size ) * 2 );
			
			> .mm-searchfield
			{
				top: $mm_navbarSize; //	IE11 fallback
				top: var( --mm-navbar-size );
			}
		}
	}

	.mm-listitem_nosubitems 
	{
		> .mm-listitem__btn
		{
			display: none;
		}

		> .mm-listitem__text
		{
			padding-right: $mm_padding;
		}
	}
}
