//
// Layout
// --------------------------------------------------

div.row,
ul.row { margin: 0 -@spacing/2; }
.row-merge { margin: 0; }
div[class*="col-xs-"],
div[class*="col-sm-"],
div[class*="col-md-"],
div[class*="col-lg-"],
li[class*="col-xs-"],
li[class*="col-sm-"],
li[class*="col-md-"],
li[class*="col-lg-"] { padding: 0 @spacing/2; }

// Icons grid
.row-icons {
	padding: 10px 0;
	margin: 0;
	[class*="col"] {
		margin-bottom: @spacing;
		padding-left: 48px;
		i:before {
			color: @primaryColor;
		}
		span {
			padding-left: 5px;
		}
	}
}
#fontawesome {
	[class^="icon-"], [class*=" icon-"] {
		font-size: 24px/1em;
		line-height: 24px;
		vertical-align: middle;
		margin: 0 5px 0 0; 
	}
}

#wrapper {
	overflow: hidden; 
	float: left;
	width: 100%;

	// smooth momentum scrolling on iOS
	overflow-y: scroll;
	-webkit-overflow-scrolling: touch;
}

// Content
// -------------------------

body > .container-fluid { 
	padding: 0;
	background: @containerBg;
	&.fixed { 
		margin: 30px auto 30px;
		border-left: 1px solid @containerBorder;
		border-right: 1px solid @containerBorder;
		width: 94%;

		.rounded(5px, 5px, 5px, 5px);
		#wrapper { .rounded(5px, 5px, 0, 0); }
		#content { .rounded(0, 5px, 0, 0); }
		#footer { .rounded(0,0,5px,5px); }
		.navbar.main .wrapper { .rounded(5px, 5px, 0, 0); }
	}
	&.documentation {
		background: #fff;
	}
}

#content { 
	position: relative;
	overflow: hidden;
	margin: 0 auto;
	min-width: 320px;
	min-height: 500px;
	background: @containerBg;
	> .menubar { border-left: none; border-right: none; }
	> p { padding: 0 @spacing 5px; }
	> h1, > h2, > h3, > h4, > h5, > h6 { margin: 0 @spacing @spacing; }

	&.container {
		overflow: visible;
		> .innerL { padding-left: 0 !important; }
		> .innerR { padding-right: 0 !important; }
		> .innerLR { padding-left: 0 !important; padding-right: 0 !important; }
		&, > [data-component] {
			> h1, > h2, > h3, > h4, > h5, > h6 { margin: 0 0 @spacing; }
		}
	}

	> .filter-bar {
		border-right: none;
		border-left: none;
	}
	.heading-buttons { margin-top: @spacing; }
	.heading-arrow {
		text-transform: uppercase;
		border-bottom: 1px solid @contentBorder;
		margin: 0 0 @spacing;
		padding: 0 @spacing;
		font-size: 11pt;
		height: 35px;
		line-height: 30px;
		position: relative;
		&:after {
			content: "";
			display: inline-block;
			width: 0;
			height: 0;
			border-bottom: 8px solid @contentBorder;
			border-right: 8px solid transparent;
			border-left: 8px solid transparent;
			position: absolute;
			bottom: 0;
			left: 15px;
		}
		&.glyphicons { padding: 0 10px 0 40px; i:before { font-size: 17px; left: 15px; } }
		&.margin-bottom-none { margin-bottom: 0; }
	}
	
	> .widget { 
		border-left: 0; 
		border-right: 0;
		.widget-head,
		.widget-body {
			border-left: 0; 
			border-right: 0;
		}
		&:last-child { margin: 0; }
	}
	
	> .table { 
		border-left: none; border-right: none;
		tr td:first-child { border-left: none; }
	}
}

html.sidebar {
	&.sidebar-quick {
		#content { margin: 0 0 0 @sidebarQuickWidth; }
		.menu-right { 
			#content { margin: 0 @sidebarQuickWidth 0 0; } 
		}
	}
	&.sidebar-full {
		#content { margin: 0 0 0 @sidebarFullWidth; }
		.menu-right { 
			#content { margin: 0 @sidebarFullWidth 0 0; } 
		}
	}
}

// Sticky Sidebar & Footer always bottom
// -------------------------
@media (min-width: 768px)
{
	html.no-touch.sticky-sidebar.sidebar {
		body { overflow: hidden; }
		&, body, 
		body > .container-fluid,
		#wrapper {
			min-height: 100%;
			height: 100%; 
		}
		#wrapper { margin-bottom: -40px; }
		#menu { 
			position: fixed;
			bottom: 0;
			z-index: 1000;
		}
		#content { padding-bottom: @footerHeight; }
	}
}

// Sticky Top Menu
// -------------------------

@media (min-width: 768px)
{
	html.no-touch.sticky-top {
		#content { padding-top: @navbarMainHeight; }
		.navbar.main {
			position: fixed;
			top: 0;
			left: 0;
			right: 0;
			z-index: 10000;
		}
		&.sidebar {
			&.sidebar-quick {
				.navbar.main { left: @sidebarQuickWidth; }
				.menu-right {
					.navbar.main { left: 0; right: @sidebarQuickWidth; }
				}
			}
			&.sidebar-full {
				.navbar.main { left: @sidebarFullWidth; }
				.menu-right {
					.navbar.main { left: 0; right: @sidebarFullWidth; }
				}
			}
		}
		.menu-hidden {
			.navbar.main { left: 0 !important; right: 0 !important; }
		}
		&.front {
			#content { padding-top: 100px; margin: 0 !important; }
		}
	}
}

html.fixed {
	&, body {
		min-height: auto; 
		height: auto;
		overflow: visible;
	}
}
body > .container-fluid.fixed {
	min-height: auto;
	height: auto;
	#wrapper {
		position: relative;
		overflow: hidden;
		min-height: auto;
		height: auto;
		margin: 0;
	}
	#menu {
		position: absolute;
		height: 100%;
		min-height: 100%;
		bottom: auto;
	}
}


//  Images
//---------------------

img.center {
	display: block;
	margin: 0 auto;
}

.display-block { display: block; }
.fixed-bottom { position: absolute; left: 0; right: 0; bottom: 0; }

@media (min-width: 768px) {
	#content { overflow: visible; }
}

//  Backgrounds
//--------------------

.bg-gray {	background: #efefef;}
.bg-white {	background: #fff;}
.bg-inverse {	background: @inverseColor;}
.bg-success {	background:@successColor;}
.bg-primary {	background:@primaryColor;}
.bg-info {	background:@infoColor;}
.bg-danger {	background: @dangerColor;}
.bg-warning {	background:@warningColor;}
.bg-lightred {	background:#E15258 ;}
.bg-mustard {	background: #D4D172;}
.bg-purple {	background: #9D8AC7;}
.bg-gray-dark { background: #f2f2f2 !important; }
.bg-info-dark { background: darken(@infoColor, 10%) !important; }
.bg-inverse { background: @inverseColor !important; color: #fff; }
.bg-inverse-faded { background: fade(@inverseColor, 50%) !important; }
.bg-transparent {background: none; background-color: transparent;}