/**
 * booking-fab.css
 * 個別相談 予約導線（Booking Package）のスタイル。
 *
 * - ヘッダー「個別相談」ドロップダウン（.bpk-consult）
 * - フローティング予約ボタン FAB（.bpk-fab）: 福津式・純CSS・画像レス
 *
 * 4相談ボタンの色は各固定ページ（経営／融資／税務／SNS）のデザインに合わせた
 * 確定値。JS は使用しない。
 * 2026-08-01 一般公開に合わせ、テストページ限定から全ページ適用へ移行
 * （enqueue と出力は functions.php の「個別相談 予約導線」セクション）。
 */

/* =====================================================================
 * カラー変数
 * ===================================================================== */
:root {
	--bpk-primary: #164a84;
	--bpk-secondary: #0094c8;
	--bpk-hover: #38b2dd;
	--bpk-keiei: #F14E82; /* 経営相談（固定ページに合わせた確定値 2026-08-01） */
	--bpk-kinyu: #D2AE02; /* 融資相談（旧 金融相談・2026-07-28 指定値） */
	--bpk-zeimu: #0059DC; /* 税務相談（固定ページに合わせた確定値 2026-08-01） */
	--bpk-it: #34960F;    /* SNS相談（旧 IT相談・固定ページに合わせた確定値 2026-08-01） */
	--bpk-radius: 4px;
	--bpk-shadow: 0 4px 14px rgba(0, 0, 0, 0.18);
}

/* =====================================================================
 * ヘッダー「個別相談」ドロップダウン（PC）
 *   既存 common-nav（.site-header-lower-nav__list）末尾に追加された
 *   <li class="bpk-consult"> を装飾。JS 不使用、:hover のみ。
 * ===================================================================== */
.site-header-lower-nav__list .menu-item span {
	margin: 0 !important;
}
.bpk-consult {
	position: relative;
	list-style: none;
}
.bpk-consult__label {
	/* display: flex; */
	align-items: center;
	justify-content: center;
	gap: 0.3em;
	/* height: 100%; */
	/* padding: 0 1em; */
	cursor: pointer;
	white-space: nowrap;
	color: var(--bpk-primary);
	/* font-weight: 700; */
	font-size: 17px;
}
.bpk-consult__label i {
	display: inline-block;
	font-style: normal;
	font-size: 0.9em;
	transition: transform 0.2s;
	transform: translateY(-0.12em);
}
.bpk-consult:hover .bpk-consult__label i {
	transform: rotate(180deg) translateY(0.12em);
}

/* ドロップダウン本体：通常は隠す → 親hoverで表示 */
.site-header-lower-nav__list .menu-item:hover .bpk-consult__sub a {
	opacity: 1;
}

.bpk-consult__sub {
	position: absolute;
	top: 100%;
	left: 50%;
	transform: translateX(-50%) translateY(6px);
	width: 100%;
	margin: 0;
	padding: 1px;
	list-style: none;
	background: #fff;
	border-radius: var(--bpk-radius);
	box-shadow: var(--bpk-shadow);
	opacity: 0;
	visibility: hidden;
	transition: opacity 0.2s, transform 0.2s;
	z-index: 1000;
}
.bpk-consult:hover .bpk-consult__sub,
.bpk-consult:focus-within .bpk-consult__sub {
	opacity: 1;
	visibility: visible;
	transform: translateX(-50%) translateY(0);
}
.bpk-consult__sub li {
	list-style: none;
}
.site-header-lower-nav__list .menu-item  .bpk-consult__sub a {
	display: block;
	padding: var(--wp--preset--spacing--30) var(--wp--preset--spacing--40);
	text-decoration: none;
	font-size: 17px;
	white-space: nowrap;
	transition: background 0.15s, color 0.15s;
}
.bpk-consult__sub a:hover {
	background: var(--bpk-hover);
	color: #fff;
}


/* =====================================================================
 * TB（≤900px）: font-size調整
 * ===================================================================== */
@media screen and (max-width: 900px) {
	.site-header-lower-nav__list .menu-item a,
	.bpk-consult__label {
		font-size: 16px;
	}
}


/* =====================================================================
 * フローティング予約ボタン FAB（PC）
 *   初期は右へ引っ込み、tab（ツマミ）だけ見える → hover でスライドイン。
 * ===================================================================== */
.bpk-fab {
	position: fixed;
	right: 0;
	bottom: 80px;
	z-index: 900;
	width: 210px;
}
.bpk-fab__inner {
	position: relative;
	display: flex;
	align-items: stretch;
	transform: translateX(150px); /* tab の幅ぶんだけ残して隠す */
	transition: transform 0.4s ease;
}
.bpk-fab:hover .bpk-fab__inner,
.bpk-fab:focus-within .bpk-fab__inner {
	transform: translateX(0);
}

/* 左端の縦ツマミ */
.bpk-fab__tab {
	position: relative;
	flex: 0 0 60px;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 14px 0;
	writing-mode: vertical-rl;
	text-orientation: upright;
	letter-spacing: 0.15em;
	font-weight: 700;
	font-size: 15px;
	line-height: 1.4;
	color: #fff;
	background: var(--bpk-secondary);
	border-radius: var(--bpk-radius) 0 0 var(--bpk-radius);
	box-shadow: var(--bpk-shadow);
	text-align: center;
}

/* ツマミ下端の白丸（文字列の後ろに flex アイテムとして並ぶ） */
.bpk-fab__tab::after {
	content: "";
	flex: 0 0 auto;
	width: 22px;
	height: 22px;
	margin-top: 10px;
	border-radius: 50%;
	background: #fff;
}
/* 白丸の中の右向き矢印（絶対配置で ::after の円に重ねる） */
.bpk-fab__tab::before {
	content: "";
	position: absolute;
	left: 50%;
	bottom: 52px;
	z-index: 1;
	width: 6px;
	height: 6px;
	border-style: solid;
	border-width: 2px 2px 0 0;
	border-color: var(--bpk-secondary);
	transform: translate(-60%, 50%) rotate(45deg);
	transition: transform 0.4s ease;
}
/* メニュー展開中は矢印を反転（右向き → 左向き） */
.bpk-fab:hover .bpk-fab__tab::before,
.bpk-fab:focus-within .bpk-fab__tab::before {
	transform: translate(-30%, 50%) rotate(225deg);
}

/* ボタン列 */
.bpk-fab__list {
	flex: 1 1 auto;
	margin: 0;
	padding: 8px;
	list-style: none;
	display: flex;
	flex-direction: column;
	gap: 6px;
	background: #fff;
	border-radius: 0 var(--bpk-radius) var(--bpk-radius) 0;
	box-shadow: var(--bpk-shadow);
}
.bpk-fab__list li {
	list-style: none;
}

.bpk-btn {
	display: flex;
	align-items: center;
	justify-content: center;
	position: relative;
	height: 46px;
	padding: 0 26px 0 14px;
	color: #fff;
	font-weight: 700;
	font-size: 15px;
	text-decoration: none;
	border-radius: var(--bpk-radius);
	transition: opacity 0.15s, transform 0.1s;
}
.bpk-btn:hover {
	opacity: 0.88;
}
.bpk-btn:active {
	transform: translateY(1px);
}
/* 右端の矢印 */
.bpk-btn::after {
	content: "";
	position: absolute;
	right: 12px;
	width: 7px;
	height: 7px;
	border-style: solid;
	border-width: 2px 2px 0 0;
	border-color: #fff;
	transform: rotate(45deg);
}
.bpk-btn--keiei { background: var(--bpk-keiei); }
.bpk-btn--kinyu { background: var(--bpk-kinyu); }
.bpk-btn--zeimu { background: var(--bpk-zeimu); }
.bpk-btn--it    { background: var(--bpk-it); }

/* =====================================================================
 * SP（≤781px）: FAB は画面下部固定の 4 ボタン列、tab は隠す
 * ===================================================================== */
@media screen and (max-width: 781px) {
	.bpk-fab {
		right: 0;
		left: 0;
		bottom: 0;
		width: 100%;
	}
	.bpk-fab__inner {
		transform: none; /* SP はスライド無し・常時表示 */
	}
	.bpk-fab__tab {
		display: none;
	}
	.bpk-fab__list {
		flex-direction: row;
		justify-content: center;
		gap: 0;
		width: 100%;
		max-width: 100%;
		padding: 0;
		border-radius: 0;
		box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.15);
	}
	.bpk-fab__list li {
		flex: 1 1 0;
	}
	.bpk-btn {
		width: 100%;
		height: 50px;
		padding: 0;
		font-size: 13px;
		text-align: center;
		border-radius: 0;
	}
	.bpk-btn::after {
		display: none; /* 狭いので矢印は省略 */
	}

	/* SP は common-nav 自体が非表示（ハンバーガー = sp-nav）。
	   予約導線は画面下部の FAB バーが担うため、ドロップダウン挙動は無効化 */
	.bpk-consult__sub {
		position: static;
		transform: none;
		opacity: 1;
		visibility: visible;
		box-shadow: none;
	}

	.site-footer {
		margin-bottom: 50px;
	}
}
