@charset "UTF-8";

/* ====================================
   フィルタ・ソートコンポーネント
   公開ページ・管理画面共通
   components.css から分離
   ==================================== */

/* フィルタヘッダー全体 */
.stocks-filter-header {
	margin: 1em 0;
	background: light-dark(#f5f5f5, #2a2a2a);
	border: 1px solid light-dark(#ddd, #444);
	border-radius: 4px;
	padding: 1em;
	font-family: 'Noto Sans JP', sans-serif;
}

/* フィルターラッパー（管理画面のみ: 左右2カラム） */
.admin-page .stocks-filter-wrapper {
	display: grid;
	grid-template-columns: 1.5fr 2fr;
	gap: 1.5em;
}

@media (max-width: 767px) {
	.admin-page.stocks-filter-header {
		margin-left: -0.5em;
		margin-right: -0.5em;
		padding: .5em;
	}
	.admin-page .stocks-filter-wrapper{
		gap: .5em;
	}
}

.admin-page .stocks-filter-category {
	grid-column: 1.5;
}

.admin-page .stocks-filter-conditions {
	grid-column: 2;
}

/* 一般公開ページ: 縦並び（デフォルト） */
.stocks-filter-wrapper {
	display: flex;
	flex-direction: column;
	gap: 0;
}

.stocks-filter-category,
.stocks-filter-conditions {
	width: 100%;
}

/* 登録件数表示 */
.stocks-filter-summary {
	margin-bottom: 15px;
	font-size: 14px;
	color: light-dark(#333, #ddd);
}

/* 各フィルタ行 */
.stocks-filter-row {
	display: flex;
	align-items: center;
	gap: 10px;
	margin-bottom: 10px;
	flex-wrap: wrap;
}

.stocks-filter-row:last-child {
	margin-bottom: 0;
}

/* フィルタラベル */
.stocks-filter-item-label {
	font-weight: bold;
	font-size: 13px;
	color: light-dark(#555, #bbb);
	min-width: 70px;
	flex-shrink: 0;
}

/* ラジオボタングループ */
.stocks-filter-radios {
	display: flex;
	gap: 8px;
	flex-wrap: wrap;
	align-items: center;
}

/* カテゴリグループ（管理画面用：縦並び） */
.stocks-filter-categories {
	display: flex;
	flex-direction: column;
	gap: 0;
	width: 100%;
}

/* ラジオボタンラベル */
.stocks-filter-label {
	display: inline-flex;
	align-items: center;
	gap: 3px;
	padding: .3em .6em;
	background: light-dark(#fff, #333);
	border: 1px solid light-dark(#ccc, #555);
	border-radius: 2px;
	font-size: .75rem;
	color: light-dark(#333, #ddd);
	cursor: pointer;
	transition: all 0.2s;
}

/* カテゴリラベル（管理画面用：縦並び時の調整） */
.stocks-filter-categories .stocks-filter-label {
	width: 100%;
	border-radius: 0;
}

.stocks-filter-categories .stocks-filter-label:not(:first-of-type) {
	/* border-top: none; */
	margin-top: -1px;
}

.stocks-filter-label:hover {
	background: light-dark(#f0f0f0, #444);
	border-color: light-dark(#999, #666);
}

.stocks-filter-label input[type="radio"] {
	margin: 0;
	cursor: pointer;
}

.stocks-filter-label input[type="radio"]:checked {
	accent-color: light-dark(#007bff, #4a9eff);
}

/* チェック済みラベルのスタイル */
.stocks-filter-label:has(input[type="radio"]:checked) {
	background: light-dark(#007bff, #0056b3);
	color: #fff;
	border-color: light-dark(#0056b3, #004494);
}

/* カテゴリ階層のインデント */
.category-depth-0 { margin-left: 0; }
.category-depth-1 { margin-left: 1.5em; width: calc(100% - 1.5em) !important; }
.category-depth-2 { margin-left: 3em; width: calc(100% - 3em) !important; }

/* キーワード検索入力 */
.stocks-keyword-input {
	padding: 6px 10px;
	border: 1px solid light-dark(#ccc, #555);
	border-radius: 3px;
	font-size: 13px;
	width: 250px;
	max-width: 100%;
	background: light-dark(#fff, #333);
	color: light-dark(#333, #ddd);
}

.stocks-keyword-input:focus {
	outline: none;
	border-color: light-dark(#007bff, #0056b3);
	box-shadow: 0 0 3px light-dark(rgba(0, 123, 255, 0.3), rgba(0, 86, 179, 0.5));
}

/* ソートセレクトボックス */
.stocks-sort-select {
	padding: 6px 10px;
	border: 1px solid light-dark(#ccc, #555);
	border-radius: 3px;
	font-size: 13px;
	background: light-dark(#fff, #333);
	color: light-dark(#333, #ddd);
	cursor: pointer;
}

.stocks-sort-select:focus {
	outline: none;
	border-color: light-dark(#007bff, #0056b3);
	box-shadow: 0 0 3px light-dark(rgba(0, 123, 255, 0.3), rgba(0, 86, 179, 0.5));
}

/* 価格スライダーコンテナ */
.stocks-price-slider-container,
.price-slider-container {
	display: flex;
	flex-direction: column;
	flex: 1;
	max-width: 480px;
}

/* スライダー本体 */
#price-slider,
#price-slider-public {
	margin: .75em 1em;
}

/* 価格表示 */
.stocks-price-range-display,
.price-range-display {
	display: flex;
	align-items: center;
	gap: 8px;
	font-size: 13px;
	color: light-dark(#333, #ddd);
	font-weight: bold;
}

.stocks-price-range-display span,
.price-range-display span {
	color: light-dark(#007bff, #4a9eff);
}

/* レスポンシブ対応 */
@media (max-width: 767px) {
	/* SP: フィルターラッパーを縦並びに */
	.stocks-filter-wrapper {
		grid-template-columns: 1fr;
		gap: 1em;
	}

	.stocks-filter-category,
	.stocks-filter-conditions {
		grid-column: 1;
	}

	.stocks-filter-row {
		flex-direction: column;
		align-items: flex-start;
		gap: 8px;
	}

	.stocks-filter-item-label {
		min-width: auto;
	}

	.stocks-filter-categories,
	.stocks-filter-radios {
		width: 100%;
	}

	.stocks-keyword-input,
	.stocks-sort-select {
		width: 100%;
	}

	.stocks-price-slider-container,
	.price-slider-container {
		width: 100%;
		min-width: auto;
	}
}
