$header-full-width-background: true !default;
$header-background-color: null !default;
$header-logo-size: null !default;
$show-site-title: null !default;

@mixin header-background {
	body.has-header-background & {
		background: url(/assets/header:background) top center no-repeat;
		background-size: cover;
	}
	background-color: $header-background-color;
}

@if ($header-full-width-background) {
	.site-header {
		@include header-background();
	}
} @else {
	#header {
		@include header-background();
	}
}

@mixin display-site-title($display) {
	@if $display == false {
		text-indent: -10000px;
	}
}

#logo {
	& a {
		$no-logo-site-title: if($show-site-title == false, false, true);
		@include display-site-title($no-logo-site-title);
		display: inline-block;
	}

	&.has-logo a {
		background: transparent url(/assets/header:logo) center left no-repeat;
		background-size: contain;
		@if $header-logo-size {
			$logo-width: nth($header-logo-size, 1);
			$logo-height: null !default;
			@if length($header-logo-size) > 1 {
				$logo-height: nth($header-logo-size, 2);
			}
			display: inline-flex;
			background-image: none;
			background-position: bottom left;
			&::before {
				content: "";
				display: block;
				background: transparent url(/assets/header:logo) no-repeat;
				background-size: inherit;
				background-position: inherit;
				flex: 0 0 auto;
				width: $logo-width;
				height: $logo-height;
				margin-right: 1em;
			}
		} @else {
			min-width: 160px;
		}

		$has-logo-site-title: if($show-site-title, true, false);
		@include display-site-title($has-logo-site-title);
		@if $has-logo-site-title {
			align-items: last baseline;
		}
	}
}
