/**
 * SWELL Enhanced — テーブル拡張スタイル
 */

/* =========================================================
   ツールバー（全体検索＋列フィルターをまとめる枠）
   ========================================================= */

.se-table-toolbar {
	margin-bottom: 10px;
	padding: 10px 12px;
	background: #f6f7f8;
	border: 1px solid #ddd;
	border-radius: 4px;
	display: flex;
	flex-direction: column;
	gap: 8px;
}

/* =========================================================
   全体検索ボックス
   ========================================================= */

.se-table-search-wrapper {
	margin-bottom: 0;
}

.se-table-search {
	display: block;
	width: 100%;
	max-width: 320px;
	padding: 6px 10px 6px 32px;
	font-size: 14px;
	line-height: 1.5;
	border: 1px solid #ccd0d4;
	border-radius: 4px;
	background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23888' stroke-width='2'%3E%3Ccircle cx='11' cy='11' r='8'/%3E%3Cline x1='21' y1='21' x2='16.65' y2='16.65'/%3E%3C/svg%3E") no-repeat 8px center;
	background-size: 16px;
	box-sizing: border-box;
	transition: border-color 0.15s;
}

.se-table-search:focus {
	border-color: #0073aa;
	outline: none;
	box-shadow: 0 0 0 2px rgba(0, 115, 170, 0.2);
}

/* =========================================================
   列ごとフィルター（テーブル外・上部）
   ========================================================= */

.se-column-filters {
	display: flex;
	flex-wrap: wrap;
	gap: 8px 16px;
}

.se-col-filter-group {
	display: flex;
	flex-direction: column;
	gap: 4px;
	min-width: 80px;
}

.se-col-filter-label {
	font-size: 12px;
	font-weight: bold;
	color: #50575e;
	white-space: nowrap;
}

/* テキスト入力フィルター */
.se-text-filter {
	width: 100%;
	padding: 4px 6px;
	font-size: 13px;
	border: 1px solid #ccd0d4;
	border-radius: 3px;
	box-sizing: border-box;
	background: #fff;
}

.se-text-filter:focus {
	border-color: #0073aa;
	outline: none;
	box-shadow: 0 0 0 2px rgba(0, 115, 170, 0.2);
}

/* プルダウンフィルター */
.se-dropdown-filter {
	width: 100%;
	padding: 4px 6px;
	font-size: 13px;
	border: 1px solid #ccd0d4;
	border-radius: 3px;
	background: #fff;
	cursor: pointer;
	box-sizing: border-box;
}

.se-dropdown-filter:focus {
	border-color: #0073aa;
	outline: none;
	box-shadow: 0 0 0 2px rgba(0, 115, 170, 0.2);
}

/* 範囲フィルター */
.se-range-filter {
	display: flex;
	align-items: center;
	gap: 4px;
}

.se-range-min,
.se-range-max {
	width: 0;
	flex: 1;
	padding: 4px 6px;
	font-size: 13px;
	border: 1px solid #ccd0d4;
	border-radius: 3px;
	box-sizing: border-box;
	background: #fff;
	min-width: 55px;
}

.se-range-min:focus,
.se-range-max:focus {
	border-color: #0073aa;
	outline: none;
	box-shadow: 0 0 0 2px rgba(0, 115, 170, 0.2);
}

.se-range-sep {
	font-size: 12px;
	color: #666;
	white-space: nowrap;
	flex-shrink: 0;
}

/* =========================================================
   ソートヘッダー
   ========================================================= */

.se-sortable {
	cursor: pointer;
	user-select: none;
	white-space: nowrap;
	position: relative;
	padding-right: 20px !important;
}

.se-sortable:hover {
	opacity: 0.8;
}

.se-sort-indicator {
	display: inline-block;
	width: 16px;
	height: 16px;
	position: absolute;
	right: 4px;
	top: 50%;
	transform: translateY(-50%);
	opacity: 0.4;
}

.se-sortable[data-sort-dir="none"] .se-sort-indicator::before {
	content: "⇅";
	font-size: 12px;
}

.se-sort-asc .se-sort-indicator::before {
	content: "▲";
	font-size: 10px;
}
.se-sort-asc .se-sort-indicator {
	opacity: 1;
}

.se-sort-desc .se-sort-indicator::before {
	content: "▼";
	font-size: 10px;
}
.se-sort-desc .se-sort-indicator {
	opacity: 1;
}
