/**
 * 香原料リファレンス - 専用スタイル
 * （共通スタイルは incense-common.css を参照）
 */

/* ========================================
   原料カード一覧
   ======================================== */
.ingredient-list {
	padding: 16px 20px;
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
	gap: 14px;
}

.ing-empty {
	grid-column: 1 / -1;
	padding: 40px 20px;
	text-align: center;
	color: var(--color-text-muted);
	background: #FAF7F5;
	border: 1px dashed #BCAAA4;
	border-radius: var(--radius);
}

/* ========================================
   原料カード
   ======================================== */
.ing-card {
	display: flex;
	flex-direction: column;
	background: var(--color-white);
	border: 1px solid var(--color-border);
	border-radius: var(--radius);
	overflow: hidden;
	cursor: pointer;
	transition: all 0.2s ease;
}

.ing-card:hover {
	border-color: #8D6E63;
	box-shadow: 0 2px 8px rgba(93, 64, 55, 0.08);
}

.ing-card.selected {
	border-color: #5D4037;
	box-shadow: 0 0 0 2px #8D6E63 inset;
}

.ing-card-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 8px;
	padding: 12px 14px;
	background: linear-gradient(135deg, #FAF7F5 0%, #EFEBE9 100%);
	border-bottom: 1px solid var(--color-border);
}

.ing-card.selected .ing-card-header {
	background: linear-gradient(135deg, #EFEBE9 0%, #D7CCC8 100%);
}

.ing-card-name {
	display: flex;
	flex-direction: column;
	gap: 2px;
	min-width: 0;
}

.ing-card-title {
	font-family: var(--font-display);
	font-size: 17px;
	font-weight: 700;
	color: #4E342E;
}

.ing-card-yomi {
	font-size: 11px;
	color: var(--color-text-muted);
}

.ing-card-kind {
	flex-shrink: 0;
	font-size: 11px;
	font-weight: 600;
	padding: 2px 10px;
	border-radius: 12px;
	background: #fff;
	color: #5D4037;
	border: 1px solid #BCAAA4;
}

.ing-card-kind--香木 {
	background: #FFF8E1;
	color: #F57C00;
	border-color: #FFCC80;
}

.ing-card-kind--樹脂 {
	background: #FFEBEE;
	color: #C62828;
	border-color: #EF9A9A;
}

.ing-card-kind--草根 {
	background: #F3E5F5;
	color: #7B1FA2;
	border-color: #CE93D8;
}

.ing-card-kind--スパイス {
	background: #FFF3E0;
	color: #E65100;
	border-color: #FFB74D;
}

.ing-card-kind--ハーブ {
	background: #E8F5E9;
	color: #2E7D32;
	border-color: #A5D6A7;
}

.ing-card-kind--動物性 {
	background: #E3F2FD;
	color: #1565C0;
	border-color: #90CAF9;
}

.ing-card-meta {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	padding: 10px 14px;
	background: #FAF7F5;
}

.ing-card-meta .meta-tag {
	font-size: 11px;
	padding: 2px 8px;
	border-radius: 12px;
	background: #FFF;
	color: #5D4037;
	border: 1px solid #D7CCC8;
}

.ing-card-meta .meta-tag--low,
.ing-card-meta .meta-tag--low_mid {
	background: #E8F5E9;
	color: #2E7D32;
	border-color: #A5D6A7;
}

.ing-card-meta .meta-tag--mid {
	background: #FFF3E0;
	color: #E65100;
	border-color: #FFB74D;
}

.ing-card-meta .meta-tag--high {
	background: #FFEBEE;
	color: #C62828;
	border-color: #EF9A9A;
}

.ing-card-body {
	padding: 12px 14px;
	flex: 1;
	display: flex;
	flex-direction: column;
	gap: 6px;
}

.ing-card-row {
	display: flex;
	gap: 8px;
	font-size: 12px;
	line-height: 1.5;
}

.ing-card-label {
	flex: 0 0 90px;
	color: var(--color-text-muted);
	font-weight: 500;
}

.ing-card-value {
	flex: 1;
	color: var(--color-text);
}

.ing-card-note {
	margin-top: 4px;
	padding: 8px 10px;
	background: #FAF7F5;
	border-left: 2px solid #8D6E63;
	font-size: 12px;
	color: #5D4037;
	line-height: 1.5;
	border-radius: 4px;
}

.ing-card-footer {
	padding: 10px 14px;
	border-top: 1px solid var(--color-border);
}

.btn-compare {
	width: 100%;
	padding: 8px 12px;
	font-size: 13px;
	font-weight: 600;
	color: #5D4037;
	background: #fff;
	border: 1px solid #8D6E63;
	border-radius: 6px;
	cursor: pointer;
	transition: all 0.2s ease;
	font-family: inherit;
}

.btn-compare:hover {
	background: #EFEBE9;
}

.btn-compare.active {
	background: linear-gradient(135deg, #8D6E63 0%, #5D4037 100%);
	color: #fff;
	border-color: #5D4037;
}

/* ========================================
   比較バー（固定）
   ======================================== */
.compare-bar {
	position: sticky;
	bottom: 0;
	background: linear-gradient(135deg, #5D4037 0%, #3E2723 100%);
	color: #fff;
	border-top: 1px solid #4E342E;
	z-index: 50;
}

.compare-bar-inner {
	padding: 12px 20px;
	display: flex;
	align-items: center;
	gap: 10px;
	flex-wrap: wrap;
}

.compare-bar-label {
	font-family: var(--font-display);
	font-size: 13px;
	font-weight: 700;
}

.compare-bar-items {
	flex: 1;
	display: flex;
	gap: 6px;
	flex-wrap: wrap;
	min-width: 0;
}

.compare-bar-chip {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 4px 10px;
	background: rgba(255, 255, 255, 0.2);
	border-radius: 12px;
	font-size: 12px;
	font-weight: 600;
	cursor: pointer;
	transition: background 0.2s;
}

.compare-bar-chip:hover {
	background: rgba(255, 255, 255, 0.3);
}

.compare-bar-chip-remove {
	font-size: 14px;
	font-weight: 700;
	opacity: 0.8;
}

.compare-bar .btn-primary {
	background: #fff;
	color: #5D4037;
	border: none;
	padding: 6px 14px;
	font-size: 13px;
	font-weight: 700;
}

.compare-bar .btn-primary:hover {
	background: #EFEBE9;
}

.compare-bar .btn-secondary {
	background: transparent;
	color: #fff;
	border: 1px solid rgba(255, 255, 255, 0.4);
	padding: 6px 12px;
	font-size: 13px;
}

.compare-bar .btn-secondary:hover {
	background: rgba(255, 255, 255, 0.1);
}

/* ========================================
   比較結果テーブル
   ======================================== */
.compare-result {
	background: #FAF7F5;
	border-top: 2px solid #8D6E63;
	border-bottom: 1px solid var(--color-border);
}

.compare-table th {
	text-align: center;
	font-size: 13px;
}

.compare-table td {
	font-size: 13px;
	vertical-align: top;
}

.compare-table td:first-child {
	background: #FAF7F5;
	font-size: 12px;
}

/* ========================================
   レスポンシブ
   ======================================== */
@media (max-width: 600px) {
	.ingredient-list {
		grid-template-columns: 1fr;
		padding: 12px 16px;
		gap: 10px;
	}

	.ing-card-header {
		padding: 10px 12px;
	}

	.ing-card-title {
		font-size: 16px;
	}

	.compare-bar-inner {
		padding: 10px 14px;
		gap: 8px;
	}

	.compare-bar-label {
		font-size: 12px;
	}

	.compare-bar .btn-primary,
	.compare-bar .btn-secondary {
		padding: 6px 10px;
		font-size: 12px;
	}

	.compare-table {
		font-size: 12px;
	}

	.compare-table th,
	.compare-table td {
		padding: 6px 8px;
	}
}
