/* =========================================================
   保険代理店 自社課題セルフチェック（template-selfcheck.php）
   このページでだけ読み込む（functions.php）。配色はサイト共通の青・紺に合わせる
========================================================= */

.vs-selfcheck {
	max-width: 1240px;
	margin: 0 auto;
	padding: 56px 30px 90px;
	color: #34485c;
}

/* 見出し */
.vs-selfcheck__head {
	margin-bottom: 36px;
	text-align: center;
}

.vs-selfcheck__tag {
	display: inline-block;
	margin: 0 0 14px;
	padding: 7px 22px;
	border-radius: 999px;
	background: #1980e9;
	color: #fff;
	font-size: 14px;
	font-weight: 700;
	letter-spacing: 0.04em;
}

.vs-selfcheck__title {
	margin: 0;
	color: #12365f;
	font-size: clamp(26px, 2.6vw, 38px);
	font-weight: 700;
	line-height: 1.4;
}

.vs-selfcheck__lead {
	max-width: 860px;
	margin: 18px auto 0;
	padding: 14px 20px;
	border-left: 4px solid #1980e9;
	border-radius: 6px;
	background: #eef7ff;
	color: #40556e;
	font-size: 14px;
	line-height: 1.8;
	text-align: left;
}

/* 本体：左に設問、右に結果 */
.vs-selfcheck__body {
	display: grid;
	grid-template-columns: minmax(0, 1fr) 380px;
	gap: 28px;
	align-items: start;
}

.vs-selfcheck__questions {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 18px;
}

/* 課題のカード */
.vs-selfcheck__card {
	overflow: hidden;
	border: 1px solid #cfe2f5;
	border-radius: 10px;
	background: #fff;
	box-shadow: 0 6px 16px rgba(33, 91, 142, 0.05);
}

.vs-selfcheck__card--wide {
	grid-column: 1 / -1;
}

.vs-selfcheck__card-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	padding: 14px 16px;
	background: #12365f;
}

.vs-selfcheck__card-head h2 {
	margin: 0;
	color: #fff;
	font-size: 15px;
	font-weight: 700;
	line-height: 1.5;
}

.vs-selfcheck__score {
	flex: 0 0 auto;
	margin: 0;
	padding: 5px 12px;
	border-radius: 999px;
	background: #fff;
	color: #12365f;
	font-size: 13px;
	font-weight: 700;
	white-space: nowrap;
}

.vs-selfcheck__score-num {
	color: #1980e9;
	font-size: 17px;
}

.vs-selfcheck__card.is-high .vs-selfcheck__score-num {
	color: #e05f17;
}

.vs-selfcheck__bar {
	height: 6px;
	margin: 14px 16px 4px;
	border-radius: 999px;
	background: #e3eef9;
}

.vs-selfcheck__bar span {
	display: block;
	width: 0;
	height: 100%;
	border-radius: 999px;
	background: #1980e9;
	transition: width 0.25s ease;
}

.vs-selfcheck__card.is-high .vs-selfcheck__bar span {
	background: #f36d24;
}

/* チェック項目 */
.vs-selfcheck__items {
	margin: 0;
	padding: 6px 16px 14px;
	list-style: none;
}

.vs-selfcheck__card--wide .vs-selfcheck__items {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	column-gap: 20px;
}

.vs-selfcheck__items label {
	display: flex;
	gap: 10px;
	padding: 9px 4px;
	border-bottom: 1px dashed #e3eef9;
	cursor: pointer;
}

.vs-selfcheck__items li:last-child label {
	border-bottom: 0;
}

.vs-selfcheck__check {
	position: absolute;
	opacity: 0;
	pointer-events: none;
}

.vs-selfcheck__box {
	flex: 0 0 auto;
	position: relative;
	width: 20px;
	height: 20px;
	margin-top: 2px;
	border: 2px solid #9fc3e6;
	border-radius: 4px;
	background: #fff;
	transition: background 0.15s ease, border-color 0.15s ease;
}

.vs-selfcheck__check:checked + .vs-selfcheck__box {
	border-color: #1980e9;
	background: #1980e9;
}

.vs-selfcheck__check:checked + .vs-selfcheck__box:after {
	content: "";
	position: absolute;
	top: 2px;
	left: 6px;
	width: 5px;
	height: 10px;
	border: solid #fff;
	border-width: 0 2px 2px 0;
	transform: rotate(45deg);
}

.vs-selfcheck__check:focus-visible + .vs-selfcheck__box {
	outline: 2px solid #f36d24;
	outline-offset: 2px;
}

.vs-selfcheck__text {
	color: #34485c;
	font-size: 14px;
	line-height: 1.7;
}

.vs-selfcheck__check:checked ~ .vs-selfcheck__text {
	color: #12365f;
	font-weight: 700;
}

/* 結果 */
.vs-selfcheck__result {
	position: sticky;
	top: 100px;
	padding: 22px 20px;
	border: 2px solid #1980e9;
	border-radius: 12px;
	background: #f4f9ff;
}

.vs-selfcheck__result-title {
	margin: 0;
	color: #12365f;
	font-size: 22px;
	font-weight: 700;
	text-align: center;
}

.vs-selfcheck__result-sub {
	margin: 4px 0 12px;
	color: #6a7e91;
	font-size: 12px;
	text-align: center;
}

.vs-selfcheck__chart {
	padding: 10px 6px;
	border-radius: 8px;
	background: #fff;
}

.vs-selfcheck__chart svg {
	display: block;
	width: 100%;
	height: auto;
}

.vs-selfcheck__grid {
	fill: none;
	stroke: #d6e7f6;
	stroke-width: 1;
}

.vs-selfcheck__axis {
	stroke: #d6e7f6;
	stroke-width: 1;
}

.vs-selfcheck__tick {
	fill: #9db2c6;
	font-size: 9px;
}

.vs-selfcheck__area {
	fill: rgba(25, 128, 233, 0.22);
	stroke: #1980e9;
	stroke-width: 2;
	stroke-linejoin: round;
	transition: all 0.25s ease;
}

.vs-selfcheck__dot {
	fill: #fff;
	stroke: #1980e9;
	stroke-width: 2;
}

.vs-selfcheck__label {
	fill: #12365f;
	font-size: 12.5px;
	font-weight: 700;
}

.vs-selfcheck__total {
	margin: 12px 0 14px;
	color: #12365f;
	font-size: 14px;
	font-weight: 700;
	text-align: center;
}

.vs-selfcheck__total strong {
	color: #1980e9;
	font-size: 26px;
}

.vs-selfcheck__box-priority,
.vs-selfcheck__box-guide {
	margin-top: 10px;
	padding: 14px 16px;
	border-radius: 8px;
	background: #fff;
}

.vs-selfcheck__box-priority {
	border-left: 4px solid #f36d24;
}

.vs-selfcheck__box-label {
	margin: 0 0 6px;
	color: #1980e9;
	font-size: 13px;
	font-weight: 700;
}

.vs-selfcheck__priority {
	margin: 0;
	color: #12365f;
	font-size: 16px;
	font-weight: 700;
	line-height: 1.6;
}

#vs-selfcheck-guide p {
	margin: 0;
	font-size: 13px;
	line-height: 1.8;
}

#vs-selfcheck-guide .vs-selfcheck__level {
	color: #12365f;
	font-weight: 700;
}

.vs-selfcheck__advice {
	margin-top: 12px;
	padding-top: 12px;
	border-top: 1px dashed #d6e7f6;
}

#vs-selfcheck-guide .vs-selfcheck__advice-title {
	margin-bottom: 4px;
	color: #e05f17;
	font-weight: 700;
}

#vs-selfcheck-guide .vs-selfcheck__solution {
	margin-top: 8px;
	padding: 10px 12px;
	border-radius: 6px;
	background: #eef7ff;
}

.vs-selfcheck__solution span {
	display: block;
	color: #1980e9;
	font-size: 11px;
	font-weight: 700;
}

.vs-selfcheck__solution strong {
	display: block;
	color: #12365f;
	font-size: 14px;
}

.vs-selfcheck__solution a {
	color: #1980e9;
	font-weight: 700;
	white-space: nowrap;
}

/* ボタン */
.vs-selfcheck__actions {
	display: grid;
	gap: 8px;
	margin-top: 14px;
}

.vs-selfcheck__btn {
	height: 44px;
	border-radius: 6px;
	font-size: 14px;
	font-weight: 700;
	cursor: pointer;
}

.vs-selfcheck__btn--print {
	border: 0;
	background: #12365f;
	color: #fff;
}

.vs-selfcheck__btn--reset {
	border: 1px solid #9fc3e6;
	background: #fff;
	color: #12365f;
}

.vs-selfcheck__btn:hover {
	opacity: 0.85;
}

.vs-selfcheck__cta {
	margin-top: 16px;
	padding-top: 14px;
	border-top: 1px solid #d6e7f6;
}

.vs-selfcheck__cta p {
	margin: 0 0 10px;
	color: #40556e;
	font-size: 13px;
	line-height: 1.7;
}

.vs-selfcheck__cta-btn {
	display: flex;
	align-items: center;
	justify-content: center;
	height: 44px;
	margin-top: 8px;
	border-radius: 6px;
	color: #fff;
	font-size: 14px;
	font-weight: 700;
	text-decoration: none;
}

.vs-selfcheck__cta-btn:hover {
	color: #fff;
	opacity: 0.88;
}

.vs-selfcheck__cta-btn--doc {
	background: #1985ec;
}

.vs-selfcheck__cta-btn--demo {
	background: #f36d24;
}

.vs-selfcheck__note {
	margin: 34px 0 0;
	padding-top: 18px;
	border-top: 1px solid #d6e7f6;
	color: #6a7e91;
	font-size: 12px;
	text-align: center;
}

/* スマホ用：画面下の合計点（PCでは非表示） */
.vs-selfcheck__float {
	display: none;
}

/* タブレット・スマホ */
@media screen and (max-width: 1000px) {
	.vs-selfcheck__body {
		grid-template-columns: 1fr;
	}

	.vs-selfcheck__result {
		position: static;
	}

	.vs-selfcheck__float {
		position: fixed;
		right: 12px;
		bottom: 12px;
		left: 12px;
		z-index: 999;
		display: block;
		padding: 12px 16px;
		border-radius: 8px;
		background: #12365f;
		box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
		color: #fff;
		font-size: 14px;
		font-weight: 700;
		text-align: center;
		text-decoration: none;
	}

	.vs-selfcheck__float strong {
		color: #7cc0ff;
		font-size: 18px;
	}
}

@media screen and (max-width: 767px) {
	.vs-selfcheck {
		padding: 36px 16px 90px;
	}

	.vs-selfcheck__questions,
	.vs-selfcheck__card--wide .vs-selfcheck__items {
		grid-template-columns: 1fr;
	}

	.vs-selfcheck__lead {
		font-size: 13px;
	}
}

/* DX支援の帯が画面下に出る幅では、その上に表示する（帯を表示しているときだけ。functions.php の VS_SHOW_FLOATING_BANNER） */
@media screen and (max-width: 450px) {
	.vs-has-floating-banner .vs-selfcheck__float {
		bottom: 72px;
	}
}

/* =========================================================
   印刷（A4縦）：1ページ目に診断結果、続けて設問を2列で出す
   ※A4の幅（約720px）では上のタブレット・スマホ用の指定が効いてしまうため、ここでまとめて上書きする
========================================================= */
@page {
	size: A4 portrait;
	margin: 10mm 10mm 12mm;
}

@media print {
	/* サイト共通の部品は出さない */
	#header,
	#header_message,
	.floating-banner,
	.vs-home-cta,
	.vs-site-footer,
	#return_top,
	#drawer_menu,
	#js-body-start,
	.vs-selfcheck__actions,
	.vs-selfcheck__cta,
	.vs-selfcheck__float,
	.vs-selfcheck__result-sub,
	.grecaptcha-badge,
	#wpadminbar {
		display: none !important;
	}

	html,
	body,
	#container {
		width: auto !important;
		min-width: 0 !important;
		margin: 0 !important;
		padding: 0 !important;
		background: #fff !important;
	}

	.vs-selfcheck,
	.vs-selfcheck * {
		-webkit-print-color-adjust: exact;
		print-color-adjust: exact;
	}

	.vs-selfcheck {
		max-width: none;
		padding: 0;
		font-size: 10px;
	}

	/* 見出し */
	.vs-selfcheck__head {
		margin-bottom: 10px;
	}

	.vs-selfcheck__tag {
		margin-bottom: 6px;
		padding: 3px 12px;
		font-size: 10px;
	}

	.vs-selfcheck__title {
		font-size: 20px;
	}

	.vs-selfcheck__lead {
		max-width: none;
		margin-top: 8px;
		padding: 6px 12px;
		font-size: 10px;
		line-height: 1.6;
	}

	/* 結果を先に、設問を後に */
	.vs-selfcheck__body {
		display: flex !important;
		flex-direction: column;
		gap: 12px;
	}

	.vs-selfcheck__result {
		order: -1;
		position: static !important;
		display: grid;
		grid-template-columns: 76mm minmax(0, 1fr);
		grid-template-areas:
			"title   title"
			"chart   priority"
			"chart   guide"
			"total   guide";
		column-gap: 12px;
		row-gap: 6px;
		padding: 10px 12px;
		break-inside: avoid;
	}

	.vs-selfcheck__result-title {
		grid-area: title;
		font-size: 15px;
		text-align: left;
	}

	.vs-selfcheck__chart {
		grid-area: chart;
		align-self: center;
		padding: 2px;
	}

	.vs-selfcheck__label {
		font-size: 15px;
	}

	.vs-selfcheck__tick {
		font-size: 11px;
	}

	.vs-selfcheck__total {
		grid-area: total;
		margin: 0;
		font-size: 11px;
	}

	.vs-selfcheck__total strong {
		font-size: 18px;
	}

	.vs-selfcheck__box-priority {
		grid-area: priority;
		margin: 0;
		padding: 8px 10px;
	}

	.vs-selfcheck__box-guide {
		grid-area: guide;
		margin: 0;
		padding: 8px 10px;
	}

	.vs-selfcheck__box-label {
		margin-bottom: 3px;
		font-size: 10px;
	}

	.vs-selfcheck__priority {
		font-size: 12px;
	}

	#vs-selfcheck-guide p {
		font-size: 9.5px;
		line-height: 1.6;
	}

	.vs-selfcheck__advice {
		margin-top: 6px;
		padding-top: 6px;
	}

	#vs-selfcheck-guide .vs-selfcheck__solution {
		margin-top: 4px;
		padding: 5px 8px;
	}

	.vs-selfcheck__solution strong {
		font-size: 10.5px;
	}

	.vs-selfcheck__solution a {
		display: none;
	}

	/* 設問：2列（課題⑤は横いっぱい・項目は2列） */
	.vs-selfcheck__questions {
		display: grid !important;
		grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
		gap: 8px;
	}

	.vs-selfcheck__card {
		break-inside: avoid;
		box-shadow: none;
	}

	.vs-selfcheck__card--wide .vs-selfcheck__items {
		display: grid !important;
		grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
	}

	.vs-selfcheck__card-head {
		padding: 6px 10px;
	}

	.vs-selfcheck__card-head h2 {
		font-size: 11px;
	}

	.vs-selfcheck__score {
		padding: 2px 8px;
		font-size: 10px;
	}

	.vs-selfcheck__score-num {
		font-size: 12px;
	}

	.vs-selfcheck__bar {
		height: 4px;
		margin: 6px 10px 2px;
	}

	.vs-selfcheck__items {
		padding: 2px 10px 6px;
	}

	.vs-selfcheck__items label {
		gap: 6px;
		padding: 3px 2px;
	}

	.vs-selfcheck__box {
		width: 12px;
		height: 12px;
		margin-top: 1px;
		border-width: 1.5px;
		border-radius: 2px;
	}

	.vs-selfcheck__check:checked + .vs-selfcheck__box:after {
		top: 0;
		left: 3px;
		width: 3px;
		height: 7px;
		border-width: 0 1.5px 1.5px 0;
	}

	.vs-selfcheck__text {
		font-size: 9.5px;
		line-height: 1.5;
	}

	.vs-selfcheck__note {
		margin-top: 8px;
		padding-top: 6px;
		font-size: 8.5px;
	}

	/* アニメーションは印刷では不要 */
	.vs-selfcheck__area,
	.vs-selfcheck__bar span {
		transition: none;
	}
}
