/**
 * 香原料コスト計算ツール - 専用スタイル
 * （共通スタイルは incense-common.css を参照）
 */

/* ========================================
   モードトグル（拡張）
   ======================================== */
.mode-label {
	cursor: pointer;
}

/* ========================================
   コスト計算行
   ======================================== */
.cost-row {
	padding: 8px 0;
	border-bottom: 1px solid var(--color-border);
}

.cost-row:last-child {
	border-bottom: none;
}

.cost-row-fields {
	display: flex;
	align-items: center;
	gap: 10px;
	flex-wrap: wrap;
}

.ing-field {
	min-width: 0;
}

.ing-field--select {
	flex: 2;
	min-width: 200px;
}

.ing-field--name {
	flex: 1;
	min-width: 140px;
}

.ing-field--weight,
.ing-field--unit-price {
	flex: 0 0 130px;
}

.ing-field--action {
	flex-shrink: 0;
	width: 32px;
	display: flex;
	align-items: center;
	justify-content: center;
}

/* ========================================
   コスト棒グラフ
   ======================================== */
.cost-bar-wrap {
	margin-top: 14px;
}

.cost-bar {
	display: flex;
	width: 100%;
	height: 28px;
	border-radius: 6px;
	overflow: hidden;
	background: #f0f0f0;
	box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.08);
}

.cost-bar-segment {
	height: 100%;
	min-width: 2px;
	transition: opacity 0.2s;
}

.cost-bar-segment:hover {
	opacity: 0.85;
}

.cost-bar-legend {
	margin-top: 12px;
	display: flex;
	flex-direction: column;
	gap: 4px;
}

.cost-bar-legend-item {
	display: flex;
	align-items: center;
	gap: 8px;
	font-size: 13px;
}

.cost-bar-legend-color {
	flex-shrink: 0;
	width: 14px;
	height: 14px;
	border-radius: 3px;
}

.cost-bar-legend-name {
	flex: 1;
	color: var(--color-text);
	font-weight: 500;
}

.cost-bar-legend-value {
	color: var(--color-text-secondary);
	font-size: 12px;
}

/* ========================================
   市販品比較
   ======================================== */
.comparison-box {
	padding: 12px 14px;
	background: #FAF7F5;
	border: 1px solid #D7CCC8;
	border-left: 4px solid #8D6E63;
	border-radius: var(--radius);
	font-size: 13px;
	line-height: 1.7;
	color: #4E342E;
}

.comparison-box strong {
	color: #3E2723;
}

/* ========================================
   詳細テーブル
   ======================================== */
.detail-section {
	border-bottom: 1px solid var(--color-border);
}

.row-base td {
	background: #FAF7F5 !important;
}

.row-total td {
	background: #EFEBE9 !important;
	border-top: 2px solid #8D6E63;
	font-size: 14px;
}

/* ========================================
   レスポンシブ
   ======================================== */
@media (max-width: 600px) {
	.cost-row-fields {
		gap: 8px;
	}

	.ing-field--select,
	.ing-field--name {
		flex: 1 1 100%;
		min-width: 0;
	}

	.ing-field--weight,
	.ing-field--unit-price {
		flex: 1 1 calc(50% - 24px);
		min-width: 0;
	}

	.ing-field--action {
		width: 28px;
	}

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

	.data-table th,
	.data-table td {
		padding: 6px 4px;
	}

	.cost-bar-legend-item {
		flex-wrap: wrap;
	}
}
