.theme-header{
	background: #ffffff;
	position: relative;
	z-index: 999;

	@include clearfix();

	&.has-shadow{
		box-shadow: 0 0 10px 5px rgba(0,0,0,0.1);
	}

	&.top-nav-below{
		.top-nav{
			z-index: 8;
		}
	}
}

// Logo --------------------------------------------------------
.logo-row{
	position: relative;
}

.logo-container{
	overflow: hidden;
}

#logo{
	margin-top: 40px;
	margin-bottom: 40px;
	display: block;
	float: left;

	& img{
		vertical-align: middle;

		&[src*='.svg']{
			width: 100% !important;

			@-moz-document url-prefix(){
				height: 100px;
			}

		}
	}

	a{
		display: inline-block;
	}

	.h1-off{
		position: absolute;
		top: -9000px;
		left:-9000px;
	}

	&.text-logo{
		a{
			color: $brand-color;

			&:hover{
				color: $dark-brand-color;
				opacity: 0.8;
			}
		}
	}
}

// Text Logo
.logo-text{
	@include font-size(50px);
	line-height: 50px;
	font-weight: bold;

	@include breakpoint_max(670px){
		@include font-size(30px);
	}
}

.logo_2x{
	display: none;
}

@media
only screen and (-webkit-min-device-pixel-ratio: 2),
only screen and (   min--moz-device-pixel-ratio: 2),
only screen and (     -o-min-device-pixel-ratio: 2/1),
only screen and (        min-device-pixel-ratio: 2),
only screen and (                min-resolution: 192dpi),
only screen and (                min-resolution: 2dppx){
	.logo_normal{
		display: none;
	}

	.logo_2x{
		display: inline-block;
	}
}

.header-layout-2 {
	#logo{
		float: none;
		text-align: center;

		img{
			margin-right: auto;
			margin-left: auto;
		}
	}

	.logo-container{
		width: 100%;
	}
}


@include breakpoint(max_min_md){
	#theme-header{
		#logo{
			margin: 10px 0 !important;
			text-align: left;
			line-height: 1;

			img{
				width: auto;
				max-width: 190px;
			}
		}
	}
}

@include breakpoint(max_min_xs){
	#theme-header{
		#logo img{
			max-width: 140px;
			max-height: 60px !important;
		}
	}
}


@include breakpoint(max_min_md){
	#theme-header.mobile-header-centered{
		#logo{
			float: none;
			text-align: center;
		}
	}
}

// Header Components--------------------------------------------
.components{
	float: right;

	// component itme
	> li{
		position: relative;
		float: right;
		list-style: none;

		&.social-icons-item{
			margin: 0;
		}

		> a{
			display: block;
			position: relative;
			width: 30px;
			text-align: center;
			line-height: inherit;
			font-size: 14px;
			color: #777777;
		}

		> a:hover,
		&:hover > a{
			color: $brand-color;
			z-index: 2;
		}
	}

	.avatar{
		border-radius: 100%;
		position: relative;
		top: 4px;
		max-width: 20px;
	}

	a.follow-btn{
		width: auto;
		padding-left: 15px;
		padding-right: 15px;
		overflow: hidden;
	}

	.follow-btn [class*=fa-]{
		font-size: 13px;
	}

	.follow-btn .follow-text{
		font-size: 12px;
		margin-left: 8px;
		display: block;
		float: right;
	}


	// Search bar
	.search-bar{
		width: auto;
		border: solid rgba(0,0,0,0.1);
		border-width: 0 1px;
	}

	#search{
		position: relative;
		background: transparent;
	}

	#search-input{
		border: 0;
		margin-bottom: 0;
		line-height: inherit;
		width: 100%;
		background: transparent;
		padding: 0 35px 0 13px;
		border-radius: 0;
		box-sizing: border-box;
		font-size: inherit;

		&:hover{
			background: rgba(0,0,0,0.03);
		}

		&:focus{
		   background: rgba(0,0,0,0.03);
		   box-shadow: none;
		}
	}

	#search-submit{
		position: absolute;
		right: 0;
		top: 0;
		width: 40px;
		line-height: inherit;
		color: #777777;
		background: transparent;
		font-size: 15px;
		padding: 0;
		transition: color 0.15s;

		&:hover{
			color: $brand-color;
		}
	}

	@at-root #search-submit .fa-spinner{
		color: #555;
		cursor: default;
	}

	.top-nav-boxed & li:first-child.weather-menu-item,
	.main-nav-boxed & li:first-child.weather-menu-item,
	.search-bar + .weather-menu-item{
		padding-right: 10px;
	}
}

// Weather in header
.weather-menu-item{
  display: flex;
  align-items: center;
  padding-right: 5px;
  overflow: hidden;

  &:after{  // to make the li.weather-menu-item reserve the line-height of the nav.
  	content: 't'; // t or nay other letter
  	visibility: hidden;
  	width: 0;
  }

	.weather-wrap{
		padding: 0;
		overflow: inherit;
		line-height: 23px;
	}

	.weather-forecast-day{
		display: block;
		float: left;
		width: auto;
		padding: 0 10px;
		line-height: initial;

		.weather-icon{
			font-size: 26px;
			margin-bottom: 0;
		}
	}

	.city-data{
		float: left;
		display: block;
		font-size: 12px;
	}

	.weather-current-temp{
		font-size: 16px;
		font-weight: 400;

		sup {
	    font-size: 9px;
	    top: -2px;
		}
	}

	.theme-notice{
		padding: 0 10px;
	}
}

.tie-weather-widget{
	.components &{
		color: $base-color;
	}

	.main-nav-dark .main-nav &{
		color: #ffffff;
	}

	.top-nav-dark .top-nav &{
		color: $dark-base-color;
	}
}

.icon-basecloud-bg:after{
	.components &{
		color: #ffffff;
	}

	.main-nav-dark .main-nav &{
		color: $darker-bg;
	}

	.top-nav-dark .top-nav &{
		color: $dark-bg;
	}
}

// Header Layout 1 ---------------------------------------------
.header-layout-1{
	#menu-components-wrap{
		display: flex;
		justify-content: flex-end;
	}

	@include breakpoint(max_min_md){
		#main-nav [class*="tie-col-md"]{
			float: left;
			width: auto;
		}
	}

	.main-menu-wrapper{
		display: table;
		width: 100%;
	}

	#logo{
		line-height: 1;
		float: left;
		margin-top: 20px;
		margin-bottom: 20px;
	}

	.header-layout-1-logo{
		display: table-cell;
		vertical-align: middle;
		float: none;
	}

	#mobile-menu-icon{
		right: 0;
	}
}

// Header Layout 2 ---------------------------------------------
.header-layout-2{
	#menu-components-wrap{
		display: flex;
		justify-content: center;
	}
}

// Extended Header Bg ------------------------------------------
.is-header-bg-extended{
	#theme-header,
	#theme-header.header-layout-1 #main-nav:not(.fixed-nav) {
		background: transparent !important;
		display: inline-block !important;
		width: 100% !important;
		box-shadow: none !important;
		transition: background 0.3s;

		&:before {
			content: "";
			position: absolute;
			width: 100%;
			left: 0;
			right: 0;
			top: 0;
			height: 150px;
			background-image: linear-gradient( bottom, transparent, rgba(0, 0, 0, 0.5) );
		}
	}

	@include breakpoint(max_min_md){
		#tie-wrapper #theme-header .logo-container:not(.fixed-nav){
			background: transparent;
			box-shadow: none;
			transition: background 0.3s;
		}
	}

	.has-background	{
		.is-first-section {
			margin-top: -350px !important;

			> * {
				padding-top: 350px !important;
			}
		}
	}
}


// Rainbow Line ------------------------------------------------
.rainbow-line{
	height: 3px;
	width: 100%;
	position: relative;
	z-index: 2;
  background-image: -webkit-linear-gradient( left, #f76570 0%, #f76570 8%, #f3a46b 8%, #f3a46b 16%, #f3a46b 16%, #ffd205 16%, #ffd205 24%, #ffd205 24%, #1bbc9b 24%, #1bbc9b 25%, #1bbc9b 32%, #14b9d5 32%, #14b9d5 40%, #c377e4 40%, #c377e4 48%, #f76570 48%, #f76570 56%, #f3a46b 56%, #f3a46b 64%, #ffd205 64%, #ffd205 72%, #1bbc9b 72%, #1bbc9b 80%, #14b9d5 80%, #14b9d5 80%, #14b9d5 89%, #c377e4 89%, #c377e4 100% );
  background-image: linear-gradient( to right, #f76570 0%, #f76570 8%, #f3a46b 8%, #f3a46b 16%, #f3a46b 16%, #ffd205 16%, #ffd205 24%, #ffd205 24%, #1bbc9b 24%, #1bbc9b 25%, #1bbc9b 32%, #14b9d5 32%, #14b9d5 40%, #c377e4 40%, #c377e4 48%, #f76570 48%, #f76570 56%, #f3a46b 56%, #f3a46b 64%, #ffd205 64%, #ffd205 72%, #1bbc9b 72%, #1bbc9b 80%, #14b9d5 80%, #14b9d5 80%, #14b9d5 89%, #c377e4 89%, #c377e4 100% );
}
