// --------------------------------------------------
// Header: masthead, navigation, search
// --------------------------------------------------

#header {
	font-family: 'SourceSansProRegular';
	margin: 0;
	
	.inner {
		border-bottom: 1px solid #adadad;
		height: 50px;
		padding: 14px 0 0 0;
		width: 100%;
	}
	h1 {
		float: left;
		font-family: 'SourceSansProSemibold', Helvetica;
		font-size: 32px;
		line-height: 0em;
	}
	form.search {
		display: block;
		float: right;

		input {
			background: $white url_ver('../img/search.png') no-repeat 8px 50%;
			background-size: 14px 14px;
			border: 1px solid #ababab;
			color: #333;
			font-family: 'SourceSansProRegular';
			height: 29px;
			padding: 3px 0 0 30px;
			width: 258px;
			
			&[type="submit"] {
				display: none;
			}
		}
	}
	.filter {
		display: none;
		font-family: 'SourceSansProRegular';
		padding-top: 30px;

		select {
			width: 18%;
		}
		.cftf-options,
		.cftf-dates {
			margin-left: 55px;
			margin-bottom: 10px;
			
			.label {
				color: #999;
				display: inline-block;
				float: left;
				height: 25px;
				line-height: 25px;
				padding-top: 3px;
				position: relative;
				width: 100px;
			}
		}
		.cftf-submit {
			padding: 3px 0 0 155px;
			
			input {
				background: $gray;
				border: 0;
				color: $white;
				font-family: 'SourceSansProRegular';
				padding: 7px 13px;
			}
		}
		.chzn-container {
			margin-right: 10px;
			min-width: 180px;
			
			.chzn-drop {
				@include box-shadow(none);
				min-width: 178px;
			}
			.chzn-choices input {
				min-width: 180px;
			}
			.chzn-results .highlighted {
				background: $gray;
			}
		}
		.chzn-container-multi .chzn-choices {
			background: #fff;
			
			.search-choice {
				@include border-radius(0);
			}
		}
		.chzn-container-active .chzn-single,
		.chzn-container-active .chzn-choices {
			border-color: #aaa;
			@include box-shadow(none);
		}
		.cftf-date {
			border: 1px solid #aaa;
			padding: 6px 5px;
			width: 150px;
		}
		.cftf-date-sep {
			color: #999;
			padding: 0 2px;
		}
	}
}

.filter-toggle {
	&,
	&:visited {
		background: #ddd;
		color: #999;
		font-size: 14px;
		margin-right: 7px;
		padding: 7px 13px 5px;
		text-decoration: none;
	}
	&:hover,
	&:active {
		background: #222;
		color: $white;
	}
}
.filters-on #header {
	.filter-toggle {
		&,
		&:visited,
		&:hover,
		&:active {
			background: #222;
			color: $white;
		}
	}
	.search input {
		opacity: 0.3;
	}
	.filter {
		display: block;
	}
}

/* Typeahead search */

.search_selected {
	background-color: $black;
	color: $white;
}

ul.search_results {
	background-color: #fff;
	border: 1px solid #adadad;
	border-top: 0;
	display: none;
	font-family: 'SourceSansProRegular';
	list-style-type: none;
	margin: 0;
	padding: 0;
	position: absolute;
	width: 288px;
	z-index: 100;

	li {
		padding: 10px;
	}
}

/* Date picker */

.ui-datepicker {
	background: $white;
	border: 1px solid #aaa;
	border-top: $gray;
	display: none;
	font-family: 'SourceSansProRegular';
	padding: 6px;
}
.ui-datepicker-header {
	background: $gray;
	color: #fff;
	margin: -6px -6px 5px -6px;
	padding: 6px 5px 4px;
}
.ui-datepicker .ui-datepicker-title {
	text-align: center;
}
.ui-datepicker-prev,
.ui-datepicker-next,
.ui-datepicker-prev:hover,
.ui-datepicker-next:hover {
	color: $white;
	cursor: pointer;
	font-size: 11px;
	padding-top: 1px;
}
.ui-datepicker-prev {
	float: left;
}
.ui-datepicker-next {
	float: right;
}
.ui-datepicker table {
	margin: 0;
}
.ui-datepicker th {
	text-align: center;
}
.ui-datepicker td a {
	color: #666;
	display: block;
	padding: 3px;
	text-align: right;
	text-decoration: none;
}
.ui-datepicker td a:hover {
	text-decoration: underline;
}
.ui-datepicker .ui-datepicker-current-day a {
	background: #eff6ff;
}
.ui-datepicker .ui-datepicker-today a {
	background: #eee;
}

/* 	Main Navigation
	------------------------------------------------------- */

.capsule-server .main-nav .post-new-link {
	display: none;
}
.main-nav {
	background: $gray;
	bottom: 0;
	-moz-box-shadow: inset -1px 0px 0px #000;
	-webkit-box-shadow: inset -1px 0px 0px #000;
	box-shadow: inset -1px 0px 0px #000;
	overflow: hidden;
	padding-top: 30px;
	position: fixed;
	top: 0;
	width: 72px;
	z-index: 100;
	
	ul {
		position: relative;

		/* 	Project Link */
		li {
			position: relative;
			
			a {
				display: block;
				padding: 4px 0 4px 0;
				@include transition;
				&:hover {
					background-color: $gray-dark;
					text-decoration: none;
				}
			}
		}
	}

	a {
		color: #e0e0e0;
		font-family: 'SourceSansProRegular', Helvetica;
		font-size: 1rem;
		line-height: 48px;
		text-shadow: 1px 1px $gray-dark;
		text-decoration: none;
		text-align: center;
		@include transition(all .1s ease-in-out);
		&:hover,
		&:visited {
			color: $white;
		}
		&.icon {
			font-family: $font-icon;
			font-size: 23px;
			-webkit-font-smoothing: subpixel-antialiased; 
		}
		&.projects {
			font-family: $font-sans-semibold;
			font-size: 27px;
			-webkit-font-smoothing: subpixel-antialiased; 
		}	
	}
	.spacer {
		display: block;
		height: 2000px;
		width: 72px;
	}
}
/* hack for webkit */
.sidr-animating .main-nav {
	height: 100%;
	position: relative;
}
.sidr-open .main-nav {
	left: 260px;
}

.sidr-projects-open .projects,
.sidr-tags-open .tags,
.sidr-servers-open .servers {
	background: #111 url_ver('../img/menu-sidr-open') left center no-repeat;
	background-size: 12px 75px;
}


/* 	Page Headers
------------------------------------------------------- */

.page-title {
	color: $gray;
	font-family: 'SourceSansProRegular';
	font-weight: normal;
	margin: 0;
	padding: 26px 0 0 0;
	text-shadow: 1px 1px $white;

	em {
		font-family: 'SourceSansProSemiBold';
		font-style: normal;
		font-weight: bold;
	}
}

/*	Sidr Menu
------------------------------------------------------- */

.sidr {
	/* Default Settings */
	display: none;
	position: absolute;
	position: fixed;
	top: 0;
	height: 100%;
	z-index: 999999;
	width: 260px;
	overflow-x: none;
	overflow-y: auto;
	/* Theme Settings */
	background: $gray;
	color: $white;
	font-family: 'SourceSansProRegular';
	
	.sidr-inner {
		padding: 15px 0;
	}
	&.right {
		left: auto;
		right: -260px;
	}
	&.left {
		left: -260px;
		right: auto;
	}
	h2 {
		padding-left: 15px;
	}
	span.sidr-class-none,
	a,
	a:visited {
		color: $white;
		display: block;
		padding: 7px 0 7px 15px;
		text-decoration: none;
	}
	a:active,
	a:hover {
		background: #111;
		color: #f8f8f8;
	}
	ul {
		list-style: none;
		margin: 0;
		padding: 0;
	}
	li {
		font-size: 14px;
		padding-right: 15px;
	}
}

/*	Sidr Content
------------------------------------------------------- */

#projects, #tags, #servers {
	display: none;
}

/*	Connection Notice
------------------------------------------------------- */

.connection-error {
	display: none;
}
.permissions-error,
.connection-lost .connection-error {
	background: #900;
	color: #fff;
	display: block;
	font-family: 'SourceSansProRegular';
	font-size: 20px;
	opacity: .95;
	padding: 12px 0 10px;
	position: fixed;
	text-align: center;
	top: 0;
	width: 100%;
	z-index: 9999;
}
.permissions-error a,
.permissions-error a:visited {
	color: #fff;
	font-family: 'SourceSansProRegular';
	font-size: 20px;
}
.permissions-error code {
	color: #fff;
	font-size: 18px;
	padding: 0 4px;
}
