/**
 * レザークラフト革使用量計算ツール - 専用スタイル
 * （共通スタイルは handmade-common.css を参照）
 */

/* ========================================
   パーツリスト ヘッダー
   ======================================== */
.parts-list-header {
	display: grid;
	grid-template-columns: 1.5fr 1fr 1fr 0.7fr 32px;
	gap: 8px;
	padding: 0 12px 6px;
	font-size: 11px;
	color: var(--color-text-muted);
}

.parts-list-header span {
	text-align: center;
}

.parts-list-header span:first-child {
	text-align: left;
}

/* ========================================
   パーツリスト
   ======================================== */
.parts-list {
	display: flex;
	flex-direction: column;
	gap: 10px;
	margin-bottom: 14px;
}

.part-row {
	display: grid;
	grid-template-columns: 1.5fr 1fr 1fr 0.7fr 32px;
	gap: 8px;
	align-items: center;
	padding: 10px 12px;
	background: var(--color-bg);
	border-radius: var(--radius);
}

.part-input {
	width: 100%;
	min-width: 0;
	padding: 8px 10px;
	font-size: 14px;
	font-family: inherit;
	color: var(--color-text);
	background: var(--color-white);
	border: 1px solid var(--color-border);
	border-radius: var(--radius);
}

.part-input:focus {
	outline: none;
	border-color: #b87333;
}

.part-input--num {
	text-align: right;
}

.part-remove-btn {
	width: 32px;
	height: 32px;
	display: flex;
	align-items: center;
	justify-content: center;
	background: var(--color-white);
	border: 1px solid var(--color-border);
	border-radius: var(--radius);
	color: var(--color-text-muted);
	cursor: pointer;
	font-size: 18px;
	line-height: 1;
	transition: all 0.2s ease;
	flex-shrink: 0;
}

.part-remove-btn:hover {
	color: #c62828;
	border-color: #c62828;
	background: #ffeaea;
}

/* ========================================
   パーツ追加ボタン
   ======================================== */
.parts-add-row {
	margin-top: 6px;
}

.btn-add-part {
	width: 100%;
	padding: 12px;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	font-size: 14px;
	font-family: inherit;
	font-weight: 500;
	color: #b87333;
	background: var(--color-white);
	border: 1px dashed #b87333;
	border-radius: var(--radius);
	cursor: pointer;
	transition: all 0.2s ease;
}

.btn-add-part:hover {
	background: #fff7f0;
	border-style: solid;
}

.add-icon {
	font-size: 18px;
	font-weight: 700;
	line-height: 1;
}

/* ========================================
   レスポンシブ（モバイル）
   ======================================== */
@media (max-width: 700px) {
	.parts-list-header {
		display: none;
	}

	.part-row {
		grid-template-columns: 1fr 1fr 1fr 36px;
		grid-template-rows: auto auto;
		gap: 8px;
		padding: 12px;
	}

	/* パーツ名は1行目の左3列 */
	.part-input--name {
		grid-column: 1 / 4;
		grid-row: 1;
	}

	/* 削除ボタンは右側を縦に貫く */
	.part-remove-btn {
		grid-column: 4;
		grid-row: 1 / 3;
		align-self: stretch;
		height: auto;
		min-height: 36px;
	}

	/* 幅・高さ・個数は2行目に均等配置 */
	.part-input--width {
		grid-column: 1;
		grid-row: 2;
	}

	.part-input--height {
		grid-column: 2;
		grid-row: 2;
	}

	.part-input--count {
		grid-column: 3;
		grid-row: 2;
	}
}
