/*
 * Blog のスマホ開閉メニュー（ドロワー）とフッター（IPC_ALL-3761）
 *
 * Storefront（lpw8: resources/assets_amp/src/scss/components_AMP/_AMP-Header-Footer.scss）の
 * .htv-drawer / .htv-menu-footer / .htv-about-footer / .htv-coppy をプレーン CSS に移植。
 * SCSS 変数: $widthMobi 767px / $widthPC 768px / $widthTab 1024px / $contentWidthPC 1040px / $gutterPC 24px
 *
 * Storefront との違い:
 * - ドロワーの開閉は SWELL の html[data-spmenu="opened"]（チェックボックスではない）
 * - SWELL のハンバーガーは 960px 未満で出るので、ドロワーを隠すのも 960px 以上（Storefront は 768px）
 * - フッターは #footer で囲む。追加 CSS（カスタマイザー、wp-custom-css）の .htv-about-footer が
 *   このファイルより後に出力されるため、詳細度で上回る
 *
 * 読み込み: lib/load/front.php
 */

.htv-sr-only {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

/* --------------------------------------------------------------------------
   ドロワー（parts/header/sp_menu.php）
   画面全体を覆い、上のバーと下のブロックは固定、その間のメニューだけスクロールする。
   -------------------------------------------------------------------------- */
.htv-drawer {
	position: fixed;
	top: 0;
	right: 0;
	bottom: 0;
	left: 0;
	z-index: 1000;
	display: flex;
	flex-direction: column;
	background-color: #e5f4ff;
	transform: translateX(100%);
	visibility: hidden;
	transition: transform 0.25s ease, visibility 0s linear 0.25s;
}

@media (min-width: 960px) {
	.htv-drawer {
		display: none;
	}
}

@media (prefers-reduced-motion: reduce) {
	.htv-drawer {
		transition: none;
	}
}

.htv-drawer,
.htv-drawer a,
.htv-drawer p,
.htv-drawer span,
.htv-drawer li,
.htv-drawer summary {
	font-family: 'Noto Sans JP', 'Noto Sans', sans-serif;
}

.htv-drawer__top {
	display: flex;
	flex-shrink: 0;
	align-items: center;
	justify-content: space-between;
	height: 63px;
	padding: 13px 10px 9px;
	box-shadow: 0 3.1px 15.6px rgba(0, 0, 0, 0.05);
	box-sizing: border-box;
}

.htv-drawer__logo img {
	display: block;
	width: 115px;
	height: auto;
}

/* 35px の × を 2 本の線で描く */
.htv-drawer__close {
	position: relative;
	display: block;
	width: 35px;
	height: 35px;
	margin: 0;
	padding: 0;
	cursor: pointer;
}

.htv-drawer__close::before,
.htv-drawer__close::after {
	content: '';
	position: absolute;
	top: 50%;
	left: 50%;
	width: 26px;
	height: 2px;
	background-color: #0672ad;
	border-radius: 2px;
}

.htv-drawer__close::before {
	transform: translate(-50%, -50%) rotate(45deg);
}

.htv-drawer__close::after {
	transform: translate(-50%, -50%) rotate(-45deg);
}

.htv-drawer__menu {
	flex: 1;
	min-height: 0;
	padding: 10px 20px 20px;
	overflow-y: auto;
	overscroll-behavior: contain;
}

.htv-drawer__group,
.htv-drawer__row {
	display: block;
	padding: 10px 0;
	border-bottom: 1px solid rgba(6, 114, 173, 0.2);
}

.htv-drawer__group:first-child {
	padding-top: 0;
	padding-bottom: 20px;
}

.htv-drawer__label,
.htv-drawer__row {
	margin: 0;
	font-size: 14px;
	line-height: 20px;
	font-weight: 500;
	color: #333;
}

/* Homepage と開閉グループ見出し: 右端に山形 */
.htv-drawer__row,
.htv-drawer__summary {
	position: relative;
	padding-right: 20px;
	text-decoration: none;
}

.htv-drawer__row::after,
.htv-drawer__summary::after {
	content: '';
	position: absolute;
	top: 50%;
	right: 4px;
	width: 7px;
	height: 7px;
	border-top: 2px solid #6b6f76;
	border-right: 2px solid #6b6f76;
	transform: translateY(-50%) rotate(45deg);
}

.htv-drawer__row:hover,
.htv-drawer__row:focus {
	color: #333;
}

.htv-drawer__summary {
	display: block;
	list-style: none;
	cursor: pointer;
}

.htv-drawer__summary::-webkit-details-marker {
	display: none;
}

.htv-drawer__summary::after {
	transform: translateY(-75%) rotate(135deg);
}

.htv-drawer__group[open] .htv-drawer__summary::after {
	transform: translateY(-25%) rotate(-45deg);
}

.htv-drawer__links {
	display: flex;
	flex-direction: column;
	gap: 10px;
	margin: 10px 0 0;
	padding: 0;
	list-style: none;
}

.htv-drawer__link {
	font-size: 14px;
	line-height: 20px;
	font-weight: 400;
	color: #0672ad;
	text-decoration: none;
}

.htv-drawer__link:hover,
.htv-drawer__link:focus {
	color: #0672ad;
	text-decoration: underline;
}

.htv-drawer__external {
	display: inline-flex;
	margin-left: 4px;
	vertical-align: -3px;
}

.htv-drawer__bottom {
	display: flex;
	flex-shrink: 0;
	flex-direction: column;
	gap: 10px;
	padding: 10px 20px max(10px, env(safe-area-inset-bottom));
	border-top: 1px solid rgba(6, 114, 173, 0.2);
}

.htv-drawer__btn {
	display: flex;
	align-items: center;
	justify-content: center;
	min-height: 40px;
	padding: 8px 12px;
	font-size: 14px;
	line-height: 20px;
	font-weight: 700;
	color: #fff;
	text-align: center;
	text-decoration: none;
	background-color: #0672ad;
	border: 1px solid #0672ad;
	border-radius: 4px;
	box-sizing: border-box;
}

.htv-drawer__btn:hover,
.htv-drawer__btn:focus {
	color: #fff;
	opacity: 0.9;
}

.htv-drawer__btn--outline {
	color: #0672ad;
	background-color: #fff;
}

.htv-drawer__btn--outline:hover,
.htv-drawer__btn--outline:focus {
	color: #0672ad;
}

.htv-drawer__book-label {
	margin: 0;
	font-size: 16px;
	line-height: 24px;
	font-weight: 700;
	text-transform: uppercase;
	color: #0672ad;
}

.htv-drawer__book {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 8px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.htv-drawer__book-btn {
	display: flex;
	align-items: center;
	justify-content: center;
	min-height: 48px;
	padding: 6px 4px;
	font-size: 14px;
	line-height: 17px;
	font-weight: 700;
	color: #333;
	text-align: center;
	text-decoration: none;
	background-color: #ffd611;
	border-radius: 4px;
	box-shadow: 0 2px 4px rgba(87, 87, 87, 0.33);
	box-sizing: border-box;
}

.htv-drawer__book-btn:hover,
.htv-drawer__book-btn:focus {
	color: #333;
	opacity: 0.9;
}

.htv-drawer__sns {
	display: flex;
	justify-content: center;
	align-items: center;
	gap: 20px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.htv-drawer__sns a,
.htv-drawer__sns svg,
.htv-drawer__sns img {
	display: block;
}

/* 開いた状態（SWELL の toggleMenu が html[data-spmenu] を切り替える） */
[data-spmenu="opened"] .htv-drawer {
	transform: none;
	visibility: visible;
	transition: transform 0.25s ease;
}

@media (prefers-reduced-motion: reduce) {
	[data-spmenu="opened"] .htv-drawer {
		transition: none;
	}
}

/* 開いている間は背面のページをスクロールさせない */
@media (max-width: 959px) {
	html[data-spmenu="opened"] {
		overflow: hidden;
	}
}

/* --------------------------------------------------------------------------
   フッター（parts/footer/footer_contents.php）
   2026 年版 Storefront フッター（IPC_ALL-3016）。PC は 4 列（1024px 未満は 3 列）、SP は 1 列。
   -------------------------------------------------------------------------- */
#footer .htv-menu-footer {
	background-color: #e5f4ff;
	/* max() 非対応ブラウザ向けに先に固定値 */
	padding: 32px 24px;
	padding: 32px max(24px, calc((100% - 1040px) / 2));
}

@media (max-width: 767px) {
	#footer .htv-menu-footer {
		padding: 27px 25px 33px;
	}
}

#footer .htv-menu-footer-list {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	column-gap: 24px;
	margin: 0;
	padding: 0;
	list-style: none;
}

@media (min-width: 1024px) {
	#footer .htv-menu-footer-list {
		grid-template-columns: repeat(4, minmax(0, 1fr));
	}
}

@media (max-width: 767px) {
	#footer .htv-menu-footer-list {
		display: block;
	}
}

#footer .htv-menu-footer-list li {
	box-sizing: border-box;
	margin: 0;
}

/* PC: ラベルを 50px 行の「›」と上揃え */
#footer .htv-menu-footer-list li a {
	display: block;
	padding: 12px 0 18px 24px;
	position: relative;
	font-size: 14px;
	line-height: 20px;
	color: #0672ad;
	font-weight: 400;
	text-decoration: none;
	overflow-wrap: break-word;
}

@media (max-width: 767px) {
	#footer .htv-menu-footer-list li a {
		padding: 14px 0 14px 27px;
		line-height: 22px;
	}
}

/* デザインの細い「›」: 小さな正方形の上辺と右辺を 45 度回して横に潰す */
#footer .htv-menu-footer-list li a::before {
	content: '';
	display: block;
	position: absolute;
	top: 24px;
	left: -1px;
	width: 5.5px;
	height: 5.5px;
	border-top: 2px solid currentColor;
	border-right: 2px solid currentColor;
	transform: scaleX(0.55) rotate(45deg);
}

@media (max-width: 767px) {
	#footer .htv-menu-footer-list li a::before {
		top: 26px;
		left: -2px;
	}
}

#footer .htv-menu-footer-list li a:hover {
	text-decoration: underline;
}

/* 外部リンクアイコン（IPC_ALL-3245）: 負の右マージンで幅 0 扱いにし、アイコンだけ次の行に落ちないようにする */
#footer .htv-menu-footer-list li a.-external {
	padding-right: 22px;
}

#footer .htv-menu-footer-external {
	display: inline-flex;
	vertical-align: -3px;
	margin-left: 4px;
	margin-right: -22px;
}

#footer .htv-about-footer {
	background-color: #0672ad;
	padding: 28px 24px;
	text-align: center;
}

@media (max-width: 767px) {
	#footer .htv-about-footer {
		padding: 20.5px 10px 32.5px;
	}
}

#footer .htv-about-footer .htv-about-footer__email {
	margin: 0;
	font-size: 16px;
	line-height: 24px;
}

@media (min-width: 768px) {
	#footer .htv-about-footer .htv-about-footer__email {
		font-size: 20px;
	}
}

#footer .htv-about-footer .htv-about-footer__email a {
	text-decoration: none;
	color: #fff;
	font-weight: 700;
	transition: all 0.3s;
}

#footer .htv-about-footer .htv-about-footer__email a:hover {
	text-decoration: underline;
	opacity: 0.9;
}

@media (max-width: 767px) {
	#footer .htv-about-footer .htv-about-footer__email a {
		font-size: 14px;
		line-height: 20px;
		font-weight: 400;
	}
}

#footer .htv-about-footer p:not(.htv-about-footer__email) {
	margin: 20px 0 0;
	font-size: 14px;
	line-height: 24px;
	color: #fff;
	font-weight: 400;
	text-align: center;
}

@media (max-width: 767px) {
	#footer .htv-about-footer p:not(.htv-about-footer__email) {
		margin: 15px 0 0;
		font-size: 12px;
		line-height: 18px;
	}
}

/* PC: 60px のマークを 18.5px 間隔で（CDN の 35px 画像を拡大）。gap は追加 CSS の 4px を打ち消す */
#footer .htv-about-footer ul {
	display: flex;
	justify-content: center;
	align-items: center;
	gap: 0;
	min-height: 58.5px;
	margin: 20px 0 0;
	padding: 0;
	list-style: none;
}

@media (max-width: 767px) {
	#footer .htv-about-footer ul {
		min-height: 0;
		margin: 22px 0 0;
	}
}

#footer .htv-about-footer ul li {
	margin: 0;
}

#footer .htv-about-footer ul li + li {
	margin-left: 18.5px;
}

@media (max-width: 767px) {
	#footer .htv-about-footer ul li + li {
		margin-left: 14px;
	}
}

#footer .htv-about-footer ul li img {
	display: block;
	width: 60px;
	height: auto;
	border-radius: 3px;
}

@media (max-width: 767px) {
	#footer .htv-about-footer ul li img {
		width: 40px;
	}
}

#footer .htv-about-footer span.delivery-addr {
	display: block;
	margin-bottom: 20px;
}

@media (max-width: 767px) {
	#footer .htv-about-footer span.delivery-addr {
		margin-bottom: 16px;
	}
}

/* コピーライト（Storefront の .htv-coppy） */
#footer .l-footer__foot {
	padding: 20px 24px;
	background-color: #fff;
}

@media (max-width: 767px) {
	#footer .l-footer__foot {
		padding: 24px 10px;
	}
}

#footer .l-footer__foot .l-container {
	padding: 0;
}

#footer .l-footer__foot .copyright {
	margin: 0;
	text-align: center;
	font-size: 14px;
	line-height: 20px;
	color: #333;
}

@media (max-width: 767px) {
	#footer .l-footer__foot .copyright {
		font-size: 12px;
		line-height: 18px;
	}
}
