/*
 * PageLines Inc.
 */

body.navbar_fixed {
	.page-canvas {
		padding-top: 50px;
	}
	.fixed_width #page .page-canvas{
		margin-top: 42px;
		padding-top: 0;
	}

	.section-navbar.fixed-top{
		position: fixed;
		z-index: @zindexFixedNavbar;
	}
	
}

.section-navbar.fixed-top{
	.navbar-edit{
		position: absolute;
		left: -30px;
		top: 6px;
		display: none;
	}
	&:hover{
		.navbar-edit{
			display: block;
		}
	}
}

/*  Basic formatting
 ************************************************************/
.section-navbar {


	margin: 0 auto;
	width: 100%;
	font-family: @altFontFamily;
	font-weight: @altFontWeight;

	.content-pad,
	.pl-section-pad{
		padding-top: 5px;
		padding-bottom: 5px;
		.navbar-content-pad{
			padding: 0 15px;
		}
	}

}
// Dont nest, needs to be minimum specificity
.pldrop ul{
	display: none;
}
.navbar{
	.box-shadow(~"inset 0 1px 0 rgba(255,255,255,.1), 0 1px 3px rgba(0, 0, 0, 0.25)");
	color:rgba(255,255,255,.7);
	&.navbar-content-width{
		.border-radius( 4px );
	}
	&.plnav_hover {
		.sub-menu .dropdown-menu {
			position: absolute;
			top: 0;
			left: 100%;
			margin-top: -1px;
			visibility: hidden;
		}
		.dropdown-menu li:hover .sub-menu {
		  	visibility: visible;
		  	margin-top:-6px;
		}
		.dropdown:hover .dropdown-menu {
			margin-top:0;
		  	display: block;
		}
	}
	.navline {
		float: left;
		position: relative;
		left: 0;
		display: block;
		margin: 0 10px 0 0;
		font-size: .9em;

		> .dropdown > .dropdown-menu{
			&:before {
			  content: '';
			  display: inline-block;
			  border-left: 7px solid transparent;
			  border-right: 7px solid transparent;
			  border-bottom: 7px solid #ccc;
			  border-bottom-color: rgba(0, 0, 0, 0.2);
			  position: absolute;
			  top: -7px;
			  left: 9px;
			}
			&:after {
			  content: '';
			  display: inline-block;
			  border-left: 6px solid transparent;
			  border-right: 6px solid transparent;
			  border-bottom: 6px solid #ffffff;
			  position: absolute;
			  top: -6px;
			  left: 10px;
			}
		}
		.caret{
			border-top-color:  rgba(255,255,255,.5);
		}
		&.pull-right {
			float: right;
			position: relative;
			> li:last-child .dropdown-menu{
				left: auto;
				right: 0;
				&:before{
					left: auto;
					right: 12px;
				}
				&:after{
					left: auto;
					right: 13px;
				}
				.dropdown-submenu > a:after {
				  	border-width: 5px 5px 5px 0;
					border-right-color: darken(@dropdownBackground, 20%);
				}
				.dropdown-menu {
					left: -100%;
					right: auto;
					margin-left: 0;
					margin-right: -1px;
					.border-radius(6px 0 6px 6px);
				}
			}

		}


		> li {
			display: block;
			float: left;

			> a {
				text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);
				&:hover{
					color:rgba(255,255,255,.9);
				}
				float: none;
				display: block;
				padding: 9px 12px 9px;
				line-height: 19px;
				color:#fff; /* IE */
				color:rgba(255,255,255,.8);
				text-decoration: none;
				text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);
				&:hover{
					background-color: transparent;
					color:rgba(255,255,255,.9);
					text-decoration: none;
				}
			}
			&.dropdown.open > a{
				color:#fff;
				background: rgba(0, 0, 0, 0.1);
			}
			&.current-menu-item > a {
			  	background-color: rgba(0,0,0,.1);
				color:#ffffff;
				text-decoration: none;
			}
			&.active > a:hover {
				color:rgba(255,255,255,.9);
				  text-decoration: none;
				  background-color: #222222;
			}
		}
	}

	.searchform{
		float: right;
		margin: 7px 0 5px;
		width: auto;
		max-width: 190px;
		.searchfield{
			background-color:rgba(255,255,255,.35);

			box-shadow: inset 0 1px 2px rgba(255, 255, 255, 0.15), 0 1px 0px rgba(255, 255, 255, 0.15);
			&:focus{
				box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1), 0 1px 0px rgba(255, 255, 255, 0.15);
				background-color:#fff;
				color:#000;

			}
		}
	}
	.plbrand{
		float:left;

		margin: 4px 2% 0 0;
		padding: 0 1%;
		.plbrand-text{
			color:#ffffff;
			font-size: 1.4em;
			line-height: 27px;
		}
		&:hover .plbrand-text{
			color:#EEE;
		}
		&:active .plbrand-text{
			color:#DDD;
		}
		img{
			max-height: 29px;
		}
	}

	&.pl-color-black-trans{
		background: #000;
		border-top: 1px solid rgba(0,0,0,.9);
		.searchform .searchfield{
			border: 1px solid rgba(0,0,0,.7);
		}
	}
	&.pl-color-red{
		#gradient > .vertical(@btnImportantBackground, @btnImportantBackgroundHighlight);
		border-top: 1px solid @btnImportantBackgroundHighlight;
		.searchform .searchfield{
			border: 1px solid @btnImportantBackgroundHighlight;
		}
	}
	&.pl-color-blue{
		border-top: 1px solid @btnPrimaryBackgroundHighlight;
		#gradient > .vertical(@btnPrimaryBackground, @btnPrimaryBackgroundHighlight);
		.searchform .searchfield{
			border: 1px solid @btnPrimaryBackgroundHighlight;
		}
	}
	&.pl-color-orange{
		#gradient > .vertical(@btnWarningBackground, @btnWarningBackgroundHighlight);
		border-top: 1px solid @btnWarningBackgroundHighlight;
		.searchform .searchfield{
			border: 1px solid @btnWarningBackgroundHighlight;
		}
	}

	&.pl-color-base{
		background: @baseColor;
		color: @textColor;
		.searchform .searchfield{
			background-color: @baseContrastSlight;
			border:	1px solid transparent;
			&:focus{
				border-color:darken(@baseContrast, 10);
			}
		}
		.navline{
			> li{
				> a {
					.transition(all 0.1s linear);
					color: fadeout(@textColor, 40%);
					text-shadow: none;

				}
				&:hover > a,
				&.current-menu-item > a,
				&.dropdown.open > a{
					color: @textColor;
					background-color: @baseColor;
					box-shadow: inset 0 -4px 0 @linkColor;
				}

			}
			.caret{
				border-top-color: fadeout(@textColor, 40%);
			}
		}
	}

	&.pl-color-grey{
		#gradient > .vertical(#ffffff, #EEE);
		border-top: 1px solid #dcdcdc;
		color: rgba(0,0,0,.5);
		.searchform .searchfield{
			border: 1px solid #bbb;
			background-color: #ddd;
		}
		.navline{
			> li{
				> a {
					color:rgba(0,0,0,.6);
					text-shadow: 0 1px 0 rgba(255,255,255,1);
					&:hover{
						color:rgba(0,0,0,1);
					}
				}
				&.current-menu-item > a{
					color:rgba(0,0,0,1);
				}
				&.active > a:hover {
					color:rgba(0,0,0,.8);
					background-color: #ddd;
				}
				&.dropdown.open > a{
					text-shadow: 0 1px 0 rgba(255,255,255,1);
					color:#000;
					background: rgba(0, 0, 0, 0.1);
				}
			}
			.caret{
				border-top-color:  rgba(0,0,0,.5);
			}
		}


		.nav-btn-navbar .icon-bar{
			background:rgba(0,0,0,.7);
			box-shadow: 0 1px 0 #fff;
		}
	}
}


// Hide Title on Fixed Crackbar
#navbar.fixed-top {
	.navbar-title {
		display:none;
	}
}

// CrackBar Title Defaults
span.navbar-title {
	display: inline-block;
	color:rgba(255,255,255,0.8);
	margin-top: 8px;
	font-size: 16px;
	font-weight: bold;
	letter-spacing: 0.061em;
}
@media (min-width:767px) {
	span.navbar-title{display:none;}
}

/* Buttons with Dropdowns in Posts */
.hentry .btn-group ul {
	margin:0;
	li {
		list-style:none;
	}
}







/* Nav Toggle Responsive
 ************************************************************/
	.nav-btn-navbar {
		color: inherit;
		display: none;
		float: right;
		position: relative;
		z-index: 50;
		padding: 2px 10px;
		margin: 5px;
		.border-radius(5px);
		#gradient > .vertical(rgba(255,255,255,.1), rgba(0,0,0, .08));
		border: 1px solid rgba(0,0,0,.25);
		border-left: 1px solid rgba(0,0,0,.17);
		border-top: 1px solid rgba(0,0,0,.17);
		box-shadow: inset 1px 1px 0 rgba(255, 255, 255, 0.3);
		&:hover,
		&:active,
		&.active,
		&.disabled,
		&[disabled] {
		  	color: inherit; 
			opacity: .7;
		}
		&:active,
		&.active {
			box-shadow: inset 1px 1px 0 rgba(0, 0, 0, 0.3);
		  	background-color: rgba(0,0,0,.1);
		}
		
	}

.navbar,
.navbar-inner,
.navbar-collapse{
	height:auto;
	overflow: visible;// IE8 FIx
}
.nav-collapse.collapse {
	position: relative;
	height: auto; // this was height:0; but testing height: auto for IE8
	overflow: hidden;
	.transition(height 0.35s ease);
	&.in{
		height: auto;
	}
}



// ************************************************************/
// * Responsive Handling
// ************************************************************/
@media (max-width: 400px) {

.navbar .plbrand img{
	max-width: 210px;
}

}//-- End Media Query --//

@media (max-width: 600px) {

.navbar.navbar-content-width {
	width: 95%;
	margin:0 auto;
}

}//-- End Media Query --//


@media (max-width: @resPortraitTablet){

body.navbar_fixed {
	.page-canvas  {
	  padding-top: 0;
	}
	.fixed_width #page .page-canvas{
		margin-top: 0;
	}
}
.section-navbar{
	&.fixed-top {
		position: static;
		.navbar-inner {
			padding: 5px;
		}
		
	}
}

#site .navbar{
	.brand {
	    padding-left: 10px;
	    padding-right: 10px;
	    margin: 0 0 0 -5px;
	  }
	.searchform{
		float: none;
		padding: 10px;
	}


	.nav-collapse {
		overflow: hidden;
		height: 0;
		clear: both;
	}


	.nav-btn-navbar {
		display: inline-block;
	}

}

} //-- End Media Query --//

@media (min-width: @resPortraitTablet + 1) {

	.nav-collapse.collapse {
		height: auto !important;
		overflow: visible !important;
	}

}

