/* ------------------------------
　　ヘッダー
------------------------------ */
/* サイト名 */
.site-name {
	@include font-size(24);
	color: $primary-color;
	font-weight: bold;
	.header-stack & {
		margin: 30px 0 20px;
	}
	a {
		color: $primary-color;
		 &:hover,
		 &:focus,
		 &:active,
		 &:visited {
			color: $primary-color;
		}
	}
}
.site-logo {
	display: inline-block;
	width: 22px;
	height: auto;
	margin: 0 10px 0 0;
	vertical-align: middle;
}
.site-name-text {
	display: inline;
	vertical-align: middle;
}
.edit-link {
	display: inline-block;
	vertical-align: middle;
	@include font-size(14);
}

.header-nav {
	position: relative;
	display: none;
}

@media (min-width : $breakpoint-md-min) {
	.site-name {
		@include font-size(24);
		.header-stack & {
			text-align: center;
		}
	}
	.site-logo {
		width: 40px;
	}
	.header {
		display: table;
		width: 100%;
		.header-stack & {
			display: block;
		}
	}
	.header-logo {
		width: 100%;
		vertical-align: middle;
		.header-stack & {
			display: block;
		}
	}
	.header-nav {
		display: none;
		vertical-align: middle;
		.header-stack & {
			display: block;
			width: 100%;
			margin: 0 0 15px 0;
		}
	}
}
@media (min-width : $breakpoint-lg-min) {
	.header-logo {
		display: table-cell;
		width: 40%;
		.header-stack & {
			display: block;
			width: 100%;
		}
	}
	.header-nav {
		display: table-cell;
		width: 60%;
		.header-stack & {
			display: block;
			width: 100%;
			margin: 0 0 15px 0;
		}
	}
}



/* ------------------------------
　　ナビゲーション
------------------------------ */
.header-logo {
	/* 固定したときの高さを保つ */
	padding: $header-height 0 0 0;
}
.site-header {
	position: fixed;
		top: 0;
		right: 0;
	z-index: 9999;
	width: 100%;
	padding: 0 5px;
	background: #FFF;
	border-top: 4px solid $secondary-color;
	border-bottom: 1px solid #CCC;
	@if ($enable-iphonex == true) {
		padding: 0 calc(5px + constant(safe-area-inset-right)) 0 calc(5px + constant(safe-area-inset-left));
	}
	@include box-sizing(border-box);
}
/* モバイル時ナビゲーションボタン */
.nav-menu-btn {
	display: inline-block;
	height: 44px;
	padding: 7px 5px;
	@include font-size(20);
	color: #333;
	@include box-sizing(border-box);
	a & {
		color: #333;
	}
	&:hover {
		color: #333;
		text-decoration: none;
	}
	.acms-icon-sort {
		display: inline-block;
	}
}
.nav-menu-btn-text {
	  display: inline-block;
	margin: 0 0 0 5px;
	color: #333;
	font-weight: bold;
	vertical-align: middle;
	@include font-size(11);
}
/* モバイル時ヘッダー アイコン */
.nav-menu-action {
	display: table;
	float: right;
	margin: 0;
	padding: 0;
}
.nav-menu-action-item {
	display: table-cell;
	width: 44px;
	height: 44px;
	color: $secondary-color;
	text-align: center;
	vertical-align: middle;
	@include font-size(20);
}
.nav-menu-action-link {
	color: $secondary-color;
	 &:hover,
	 &:active,
	 &:visited,
	 &:focus {
		color: $secondary-color;
		text-decoration: none;
	}
}
.navbar {
	display: none;
	width: 100%;

	 &.acms-admin-module-edit-wrapper {
		// ログインしているとき、下階層ナビゲーションを非表示にさせない対応
		z-index: 1;
	}

	ul {
		margin: 0;
		padding: 0;
		list-style: none;
	}
	li {
		a {
			display: block;
			padding: 10px;
			color: #333;
			font-weight: bold;
			@include font-size(16);
			 &:hover,
			 &:focus,
			 &:active {
				color: #FFF;
				text-decoration: none;
				background: $primary-color;
			}
		}
	}
}
@media (min-width : $breakpoint-md-min) {
	.header {
		height: 100px;
	}
	.navbar {
		display: inline-block;
		vertical-align: middle;
		 & > ul {
			float: right;
			padding: 0;
			list-style: none;
			.header-stack & {
				display: table;
				float: none;
				width: 100%;
				table-layout: fixed;
				border-right: 1px solid #EEE;
			}
		}

		li {
			position: relative;
			float: left;
			margin: 0 10px;
			text-align: center;
			vertical-align: middle;
			.header-stack &.navbar-btn {
				padding: 0 10px;
			}
			.header-stack & {
				display: table-cell;
				float: none;
				border-left: 1px solid #EEE;
			}
			ul { /* 二階層目 */
				position: absolute;
					left: 0;
				display: none;
				min-width: 200px;
			}
			li {
				margin: 0;
				.header-stack & {
					display: block;
					border: 0;
				}
			}
			a { /* 一階層目のリンクのみ */
				padding: 0;
				border-top: 4px solid transparent;
				border-bottom: 4px solid transparent;
				@include transition(border .25s ease-out);
				 &:hover,
				 &:focus,
				 &:active {
					color: #333;
					background: transparent;
				}
				.header-stack & {
					display: block;
					padding: 10px;
					@include font-size(16);
				}
			}
			 &.stay {
				a { /* 一階層目のリンクのみ */
					border-bottom: 4px solid $primary-color;
					 &.btn-attention {
						border: 0;
					}
				}
			}
			 &:hover {
				ul { /* 二階層目 */
					z-index: 10000;
					display: block;
					@include animation(0.8s fade-in);
				}
				a { /* 一階層目のリンクのみ */
					border-bottom: 4px solid $primary-color;
					 &.btn-attention {
						border: 0;
					}
				}
				li {
					a {
						border: 0;
					}
				}
			}
			li { /* 二階層目以降 */
				display: block;
				float: none;
				text-align: left;
				background: $primary-color;
				border: 0;
				border-top: 1px solid $primary-color-hover;
				 &:first-child {
					border: 0;
				}
				a {
					margin: 0;
					padding: 10px 15px;
					color: #FFF;
					border: 0;
					 &:hover {
						color: #FFF;
						background: $primary-color-hover;
						border: 0;
					}
				}
			}
		}

		a {
			 &.btn-attention { /* ボタン（色付き） */
				background: $btn-attention-default-color;
				@include btn-base();
				@include btn-small();
				border: 0;
				 &:hover {
					@include btn-color($btn-attention-start-color, $btn-attention-end-color, #FFF);
					border: 0;
				}
				 &:active,
				 &:focus {
					background: $btn-attention-active-color;
				}
			}
		}
	}
}

@media (min-width : $breakpoint-md-min) {
	.header-logo {
		padding: 0;
	}
	.navbar {
		ul {
			li {
				a {
					@include font-size(14);
				}
			}
		}
	}
}
@media (min-width : $breakpoint-xl-min) {
	.navbar {
		ul {
			li {
				a {
					@include font-size(16);
				}
			}
		}
	}
}


/* ------------------------------
　　サイドメニュー
------------------------------ */
.navbar-side {
	position: absolute;
	top: 0;
	right: 0;
	@include font-size(11);
	text-align: right;
}
.navbar-side-list {
	display: inline-block;
	margin: 0;
	padding: 0;
	overflow: hidden;
	list-style: none;
	background: #333;
	border-radius: 0 0 4px 4px;
}
.navbar-side-item {
	position: relative;
	display: inline-block;
	color: #FFF;

	&:before {
		position: absolute;
		top: 5px;
		bottom: 0;
		left: 0;
		display: block;
		height: 1em;
		border-left: 1px dotted #FFF;
		content: "";
	}

	&:first-child:before {
		content: none;
	}
}
.navbar-side-link {
	display: inline-block;
	padding: 4px 14px 4px 10px;
	color: #FFF;

	[class*="acms-icon"] {
		margin: -2px 5px 0 0;
	}

	&:hover,
	&:visited,
	&:active,
	&:focus {
		color: #FFF;
	}

	&:hover [class*="acms-icon"] {
		text-decoration: none;
	}
}


/* ------------------------------
　　モバイルメニュー
------------------------------ */
/* トグルメニューアイコン */
.icon-toggle-menu {
	position: relative;
	display: inline-block;
	width: 18px;
	height: 2px;
	margin: 6px 0;
	vertical-align: middle;
	background-color: #333;
	border-radius: 1px;
	transition: .1s all;

	&:before,
	&:after {
		position: absolute;
		display: block;
		width: 18px;
		height: 2px;
		background-color: #333;
		border-radius: 1px;
		transition: .3s all;
		content: "";
	}

	&:before {
		top: -6px;
	}

	&:after {
		bottom: -6px;
	}

	[aria-expanded=true] & {
		background: transparent;
	}

	[aria-expanded=true] &:before {
		width: 22px;
		transform: translate(-2px,6px) rotate(45deg);
	}
	[aria-expanded=true] &:after {
		width: 22px;
		transform: translate(-2px,-6px) rotate(-45deg);
	}
}

/* ナビゲーションバー */
@media (max-width : $breakpoint-md-max) {

	.is-locked {
		overflow: hidden;
	}

	.mobile-nav {
		position: fixed;
		top: 0;
		left: 0;
		z-index: 1000;
		display: none;
		box-sizing: border-box;
		width: 100%;
		height: 100%;
		padding-top: $header-height;
		background-color: #fff;
		opacity: 0;
		transition-timing-function: cubic-bezier(.25,.46,.45,.94);
		transition-duration: .3s;
		transition-property: all;

		&.is-active {
			display: block;
		}

		&.is-opened {
			opacity: 1;
		}
	}

	.mobile-nav-inner {
		display: flex;
		align-items: start;
		justify-content: center;
		box-sizing: border-box;
		width: 100%;
		height: 100%;
		padding: 30px 0;
		overflow-y: scroll;
		-webkit-overflow-scrolling: touch;
	}

	.mobile-navbar-list {
		margin: 0;
		padding: 0;
		line-height: 2.4;
		text-align: center;
		list-style: none;
		@include font-size(18);

		a:not(.btn-attention),
		a:not(.btn-attention):hover,
		a:not(.btn-attention):visited,
		a:not(.btn-attention):active,
		a:not(.btn-attention):focus {
			color: #333;
		}

		// 下階層は表示しない
		.mobile-navbar-list {
			display: none;
		}

	}

	.mobile-nav-side {
		margin:  20px 0;
		text-align: center;
	}

	.mobile-nav-side-list {
		margin: 0;
		padding: 0;
		list-style: none;
	}
	.mobile-nav-side-item {
		display: block;
		margin: 0 0 10px 0;
	}
	.mobile-nav-side-link {
		color: #333;

		&:hover,
		&:visited,
		&:active,
		&:focus {
			color: #333;
		}
	}

	.mobile-navbar-footer {
		margin: 15px 0 0 0;
	}

}
