@charset "utf-8";

/* ============================================
   一覧ページの絞り込み検索（キーワード＋タクソノミー）

   parts/archive_filter.php と対。
   ページ内アンカーだったカテゴリのボタン（.menuNav）を
   絞り込みのチェックボックスに変えて使う。
   条件は「この条件で検索する」でまとめて反映する。
   creation: 創作の匠 / 直売所
============================================ */

.aFilter {
	margin-bottom: 50px;
}

.aFilter_form {
	max-width: 900px;
	margin: 0 auto;
	padding: 25px 30px;
	border: 1px solid var(--t-border);
	border-radius: 8px;
	background: #fff;
}

.aFilter_keywordRow {
	display: flex;
	gap: 12px;
	align-items: stretch;
}

.aFilter_keyword {
	flex: 1 1 auto;
	display: block;
}

/* ラベルは読み上げ用。見た目はプレースホルダで足りている */
.aFilter_keyword_label {
	position: absolute;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
	border: 0;
}

.aFilter_keyword input {
	width: 100%;
	height: 46px;
	padding: 0 14px;
	border: 1px solid var(--t-border);
	border-radius: 5px;
	background: #fff;
	font-size: 16px;
	appearance: none;
}

.aFilter_keyword input:focus {
	outline: 2px solid var(--t-green);
	outline-offset: 1px;
}

.aFilter_note {
	margin: 10px 0 0;
	font-size: 14px;
	color: #666;
	line-height: 1.6;
}

/* カテゴリの選択肢（チェックボックス。見た目はピル型ボタン） */
.aFilter_cats {
	margin: 20px 0 0;
	padding: 0;
	border: none;
	border-top: 1px solid var(--t-border);
	padding-top: 20px;
}

.aFilter_cats_ttl {
	padding: 0;
	margin-bottom: 12px;
	font-size: 16px;
	color: var(--t-green);
}

.aFilter_cats_list {
	list-style: none;
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	margin: 0;
	padding: 0;
}

.aFilter_cats_list > li {
	margin: 0;
}

.aFilter_cats_list label {
	display: block;
	position: relative;
	z-index: 1;
	margin: 0;
	cursor: pointer;
}

.aFilter_cats_list label > [type="checkbox"] {
	position: absolute;
	z-index: 1;
	top: 0;
	left: 0;
	opacity: 0;
	margin: 0;
}

.aFilter_cats_list label > b {
	display: block;
	padding: 9px 22px;
	border: 1px solid var(--t-green);
	border-radius: 5px;
	background: #fff;
	color: var(--t-green);
	font-size: 15px;
	font-weight: 600;
	line-height: 1.4;
	transition: background-color .2s, color .2s;
}

.aFilter_cats_list label > [type="checkbox"]:checked + b {
	background: var(--t-green);
	color: #fff;
}

.aFilter_cats_list label > [type="checkbox"]:focus-visible + b {
	outline: 2px solid var(--t-green);
	outline-offset: 2px;
}

/* 該当0件のカテゴリは選んでも結果が出ないので落ち着かせる */
.aFilter_cats_list label.is-empty > b {
	border-color: var(--t-border);
	color: #999;
}

.aFilter_count {
	font-size: 13px;
	margin-left: 2px;
}

.aFilter_submit {
	display: flex;
	align-items: center;
	justify-content: center;
	flex-wrap: wrap;
	gap: 10px 20px;
	margin-top: 22px;
}

.aFilter_form button {
	min-width: 260px;
	height: 50px;
	padding: 0 28px;
	border: none;
	border-radius: 5px;
	background: var(--t-green);
	color: #fff;
	font-size: 16px;
	font-family: inherit;
	cursor: pointer;
	appearance: none;
	transition: background-color .2s;
}

.aFilter_form button:hover {
	background: #0a2f22;
}

.aFilter_clear {
	font-size: 14px;
	text-decoration: underline;
	color: var(--t-green);
}

.aFilter_result {
	margin-top: 20px;
	text-align: center;
	font-size: 16px;
	scroll-margin-top: 130px;
}

.aFilter_result b {
	font-weight: bold;
	color: var(--t-green);
	font-size: 18px;
}

.aFilter_nodata {
	margin: 0 0 50px;
	padding: 28px 20px;
	border-radius: 8px;
	background: var(--t-green-light);
	text-align: center;
	line-height: 1.8;
}

@media screen and (max-width: 767px) {
	.aFilter {
		margin-bottom: 30px;
	}

	.aFilter_form {
		padding: 15px;
	}

	.aFilter_keywordRow {
		flex-wrap: wrap;
	}

	.aFilter_note {
		font-size: 13px;
	}

	.aFilter_cats {
		margin-top: 15px;
		padding-top: 15px;
	}

	.aFilter_cats_list {
		gap: 8px;
	}

	.aFilter_cats_list label > b {
		padding: 8px 16px;
		font-size: 14px;
	}

	.aFilter_submit {
		margin-top: 18px;
	}

	.aFilter_form button {
		width: 100%;
		min-width: 0;
		height: 48px;
	}

	.aFilter_result {
		scroll-margin-top: 100px;
	}
}
