/* ---------------------------------------- */
/* Cookie同意バナー */
/* ---------------------------------------- */

.cookie-banner[hidden],
.cookie-modal[hidden] {
	display: none !important;
}

.cookie-banner {
	position: fixed;
	left: 0;
	right: 0;
	bottom: 0;
	z-index: 10000;
	background-color: #ffffff;
	border-top: 3px solid var(--blue, #0068B7);
	box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.08);
	color: #333333;
	animation: cookieBannerIn 0.4s ease-out;
}
@keyframes cookieBannerIn {
	from { transform: translateY(100%); }
	to { transform: translateY(0); }
}
.cookie-banner__inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px 40px;
	max-width: 1200px;
	margin: 0 auto;
	padding: 20px 40px;
}
.cookie-banner__text {
	margin: 0;
	font-size: 14px;
	line-height: 1.8;
}
.cookie-banner__text a {
	color: var(--blue, #0068B7);
	text-decoration: underline;
}
.cookie-banner__text a:hover {
	text-decoration: none;
}
.cookie-banner__btns {
	display: flex;
	gap: 12px;
	flex-shrink: 0;
}

/* ボタン */
.cookie-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 140px;
	height: 44px;
	padding: 0 20px;
	border: 1px solid var(--blue, #0068B7);
	border-radius: 22px;
	font-size: 14px;
	font-weight: 700;
	line-height: 1;
	cursor: pointer;
	transition: opacity 0.3s, background-color 0.3s, color 0.3s;
}
.cookie-btn--primary {
	background-color: var(--blue, #0068B7);
	color: #ffffff;
}
.cookie-btn--primary:hover {
	opacity: 0.8;
}
.cookie-btn--secondary {
	background-color: #ffffff;
	color: var(--blue, #0068B7);
}
.cookie-btn--secondary:hover {
	background-color: #F3F3F3;
}
.cookie-btn:focus-visible,
.cookie-modal__close:focus-visible {
	outline: 2px solid var(--blue, #0068B7);
	outline-offset: 2px;
}

/* バナー表示中はチャットボタンを持ち上げる */
.is-cookie-banner-open .embeddedServiceHelpButton .helpButton {
	bottom: var(--cookie-banner-h, 0px) !important;
	transition: bottom 0.3s;
}
.is-cookie-banner-open .footer-bottom {
	padding-bottom: var(--cookie-banner-h, 0px);
}

@media (max-width: 767px) {
	.cookie-banner__inner {
		flex-direction: column;
		align-items: stretch;
		padding: 16px;
	}
	.cookie-banner__text {
		font-size: 13px;
	}
	.cookie-banner__btns .cookie-btn {
		flex: 1 1 0;
		min-width: 0;
	}
}

/* ---------------------------------------- */
/* Cookie設定モーダル */
/* ---------------------------------------- */

.cookie-modal {
	position: fixed;
	inset: 0;
	z-index: 10001;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 16px;
}
.cookie-modal__overlay {
	position: absolute;
	inset: 0;
	background-color: rgba(0, 30, 52, 0.6);
}
.cookie-modal__dialog {
	position: relative;
	width: 100%;
	max-width: 640px;
	max-height: calc(100vh - 32px);
	overflow-y: auto;
	padding: 40px;
	background-color: #ffffff;
	border-radius: 8px;
	color: #333333;
	outline: none;
}
.cookie-modal__close {
	position: absolute;
	top: 12px;
	right: 12px;
	width: 40px;
	height: 40px;
	border: 0;
	background: transparent;
	cursor: pointer;
}
.cookie-modal__close::before,
.cookie-modal__close::after {
	content: "";
	position: absolute;
	top: 50%;
	left: 50%;
	width: 20px;
	height: 2px;
	background-color: #333333;
}
.cookie-modal__close::before { transform: translate(-50%, -50%) rotate(45deg); }
.cookie-modal__close::after { transform: translate(-50%, -50%) rotate(-45deg); }

.cookie-modal__title {
	margin: 0 0 12px;
	font-size: 20px;
	font-weight: 700;
	color: var(--blue, #0068B7);
}
.cookie-modal__lead {
	margin: 0 0 24px;
	font-size: 14px;
	line-height: 1.8;
}
.cookie-modal__item {
	padding: 16px 0;
	border-top: 1px solid #dddddd;
}
.cookie-modal__item:last-of-type {
	border-bottom: 1px solid #dddddd;
}
.cookie-modal__item-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	margin-bottom: 8px;
}
.cookie-modal__item-title {
	margin: 0;
	font-size: 15px;
	font-weight: 700;
}
.cookie-modal__always {
	font-size: 13px;
	font-weight: 700;
	color: var(--green1, #009A44);
}
.cookie-modal__item-text {
	margin: 0;
	font-size: 13px;
	line-height: 1.7;
	color: #666666;
}
.cookie-modal__btns {
	display: flex;
	justify-content: center;
	gap: 12px;
	margin-top: 28px;
}

/* トグルスイッチ */
.cookie-switch {
	position: relative;
	display: inline-block;
	width: 48px;
	height: 26px;
	flex-shrink: 0;
}
.cookie-switch input {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	margin: 0;
	opacity: 0;
	cursor: pointer;
	z-index: 1;
}
.cookie-switch__slider {
	position: absolute;
	inset: 0;
	background-color: #cccccc;
	border-radius: 13px;
	transition: background-color 0.3s;
}
.cookie-switch__slider::before {
	content: "";
	position: absolute;
	top: 3px;
	left: 3px;
	width: 20px;
	height: 20px;
	background-color: #ffffff;
	border-radius: 50%;
	transition: transform 0.3s;
}
.cookie-switch input:checked + .cookie-switch__slider {
	background-color: var(--blue, #0068B7);
}
.cookie-switch input:checked + .cookie-switch__slider::before {
	transform: translateX(22px);
}
.cookie-switch input:focus-visible + .cookie-switch__slider {
	outline: 2px solid var(--blue, #0068B7);
	outline-offset: 2px;
}

.is-cookie-modal-open,
.is-cookie-modal-open body {
	overflow: hidden;
}

@media (max-width: 767px) {
	.cookie-modal__dialog {
		padding: 32px 20px 24px;
	}
	.cookie-modal__btns {
		flex-direction: column-reverse;
	}
	.cookie-modal__btns .cookie-btn {
		width: 100%;
	}
}

/* プライバシーポリシーのアンカー位置（固定ヘッダー分） */
/* common.js のスムーススクロールは固定ヘッダー分を考慮しないため、
   アンカー自体を見出しより上に配置してずらす */
.anchor-offset {
	position: relative;
	top: -100px;
	height: 0;
	visibility: hidden;
	pointer-events: none;
}
