/* Kiyobinbo Shortcuts — フォントや基本色はテーマ（Cocoon）を継承 */

.kbs-table-wrap {
	margin: 1em 0 2em;
	overflow-x: auto;
}

.kbs-table {
	width: 100%;
	border-collapse: collapse;
	margin: 0;
	font-size: 0.95em;
}

.kbs-table th,
.kbs-table td {
	padding: 0.7em 0.8em;
	border: none;
	border-bottom: 1px solid #e3e6ea;
	text-align: left;
	vertical-align: middle;
	background: none;
}

.kbs-table thead th {
	font-size: 0.85em;
	font-weight: 600;
	color: #5b6470;
	background: #f5f7f9;
	border-bottom: 2px solid #d5dae0;
	white-space: nowrap;
}

.kbs-table tbody tr:hover td {
	background: #fafbfc;
}

.kbs-col-action { width: 50%; }

.kbs-action {
	display: block;
	font-weight: 600;
}

.kbs-note {
	display: block;
	margin-top: 0.25em;
	font-size: 0.82em;
	color: #6b7480;
	line-height: 1.5;
}

/* キー表示 */
.kbs-table kbd {
	display: inline-block;
	min-width: 1.9em;
	padding: 0.15em 0.5em;
	font-family: inherit;
	font-size: 0.9em;
	font-weight: 600;
	line-height: 1.5;
	text-align: center;
	color: #2b2f36;
	background: #fff;
	border: 1px solid #c3c9d0;
	border-bottom-width: 3px;
	border-radius: 5px;
	white-space: nowrap;
}

.kbs-combo { white-space: nowrap; }

.kbs-plus {
	margin: 0 0.25em;
	color: #8a929c;
	font-size: 0.85em;
}

.kbs-or {
	display: block;
	margin: 0.35em 0;
	font-size: 0.75em;
	color: #8a929c;
}

.kbs-na { color: #a0a7b0; font-size: 0.85em; }

/* OS切り替え：JSが html[data-kbs-os] を付けるまでは両方表示 */
html[data-kbs-os="win"] .kbs-col-mac,
html[data-kbs-os="mac"] .kbs-col-win {
	display: none;
}

/* 1つの OS 専用のソフト（data の platform）: 「キー」の1列だけ。OS の切り替えでは隠さない */
.kbs-col-keys { width: 50%; }

/* ツールバー */
.kbs-toolbar {
	display: flex;
	flex-wrap: wrap;
	gap: 0.75em;
	align-items: center;
	margin: 1em 0 1.5em;
	padding: 0.9em;
	background: #f5f7f9;
	border-radius: 8px;
}

.kbs-os {
	display: inline-flex;
	border: 1px solid #c3c9d0;
	border-radius: 6px;
	overflow: hidden;
}

.kbs-os-btn {
	padding: 0.45em 1em;
	font: inherit;
	font-size: 0.9em;
	font-weight: 600;
	color: #4a525c;
	background: #fff;
	border: none;
	cursor: pointer;
}

.kbs-os-btn + .kbs-os-btn { border-left: 1px solid #c3c9d0; }

.kbs-os-btn.is-active {
	color: #fff;
	background: #2f6fb3;
}

.kbs-os-btn:focus-visible,
.kbs-search:focus-visible {
	outline: 2px solid #2f6fb3;
	outline-offset: 2px;
}

/* 切り替えボタンの代わりの「Windows 11 のショートカット」 */
.kbs-toolbar .kbs-platform {
	flex: 0 0 auto;
	margin: 0;
	padding: 0.2em 0.1em;
	font-size: 0.85em;
	font-weight: 600;
	line-height: 1.5;
	color: #4a525c;
}

.kbs-search-label { flex: 1 1 16em; margin: 0; }

.kbs-search {
	width: 100%;
	padding: 0.5em 0.75em;
	font: inherit;
	font-size: 0.95em;
	border: 1px solid #c3c9d0;
	border-radius: 6px;
	background: #fff;
	box-sizing: border-box;
}

.kbs-empty {
	flex-basis: 100%;
	margin: 0;
	font-size: 0.9em;
	color: #6b7480;
}

.kbs-error {
	padding: 0.75em;
	color: #8a1c1c;
	background: #fdeeee;
	border-radius: 6px;
}

.kbs-visually-hidden {
	position: absolute !important;
	width: 1px; height: 1px;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
}

.kbs-table tr[hidden],
.kbs-table-wrap[hidden],
.kbs-empty[hidden] {
	display: none !important;
}

/* #k-項目id で開いた行を数秒ハイライト（kb-shortcuts.js が .kbs-hl を付け外しする） */
.kbs-table td {
	transition: background-color 0.8s ease;
}

.kbs-table tbody tr.kbs-hl td,
.kbs-table tbody tr.kbs-hl:hover td {
	background: rgba(232, 166, 63, 0.28);
	transition: none;
}

@media (prefers-reduced-motion: reduce) {
	.kbs-table td { transition: none; }
}

/* 検索結果ページの「このキーの一覧を見る」 */
.kbs-row-link {
	display: inline-block;
	margin-top: 0.35em;
	font-size: 0.82em;
}

/* ---------- 検索結果ページ（[kb_search_results]） ---------- */
.kbs-sr-form {
	display: flex;
	flex: 1 1 18em;
	gap: 0.5em;
	margin: 0;
}

.kbs-sr-form .kbs-search-label {
	flex: 1 1 auto;
	min-width: 0;
}

/* Cocoon の input[type="search"] の幅指定より強くする */
.kbs-sr .kbs-sr-form input.kbs-search {
	width: 100%;
	max-width: none;
}

.kbs-sr-submit {
	flex: 0 0 auto;
	padding: 0.45em 1.2em;
	font: inherit;
	font-size: 0.95em;
	font-weight: 600;
	color: #fff;
	background: #2A62A8;
	border: none;
	border-radius: 6px;
	cursor: pointer;
}

.kbs-sr-submit:hover { background: #1E4B82; }

.kbs-sr-submit:focus-visible {
	outline: 2px solid #2f6fb3;
	outline-offset: 2px;
}

.kbs-sr-summary {
	margin: 0 0 1em;
	font-weight: 600;
}

.kbs-sr-summary--empty {
	font-weight: 400;
}

.kbs-sr-request {
	margin: 1em 0 2em;
	font-size: 0.95em;
}

.kbs-sr-pager {
	display: flex;
	flex-wrap: wrap;
	gap: 0.4em;
	margin: 1.5em 0;
}

.kbs-sr-page {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 2.4em;
	height: 2.4em;
	padding: 0 0.7em;
	font-size: 0.95em;
	text-decoration: none;
	border: 1px solid #c3c9d0;
	border-radius: 6px;
}

.kbs-sr-page.is-current {
	color: #fff;
	background: #2A62A8;
	border-color: #2A62A8;
}

/* 検索結果ページでは目次・SNS ボタン・投稿者などを出さない */
body.kbs-search-page .toc,
body.kbs-search-page .sns-share,
body.kbs-search-page .sns-follow,
body.kbs-search-page .author-info,
body.kbs-search-page .date-tags {
	display: none !important;
}

@media (max-width: 600px) {
	.kbs-table th,
	.kbs-table td { padding: 0.6em 0.5em; }
	.kbs-col-action { width: auto; }
}
