/**
 * 施肥スケジュール計算ツール スタイル
 */

/* ========================================
   12ヶ月カレンダー
   ======================================== */
.fert-calendar {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 8px;
}

.fert-month {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	padding: 10px 6px;
	border-radius: var(--radius);
	border: 2px solid var(--color-border);
	background: var(--color-bg);
	cursor: pointer;
	transition: all 0.2s ease;
	min-height: 68px;
}

.fert-month:hover {
	border-color: #3A5A25;
}

.fert-month--active {
	border-color: #3A5A25;
	box-shadow: 0 0 0 2px rgba(93, 140, 62, 0.25);
}

.fert-month--ok {
	background: #e8f5e9;
	border-color: #81c784;
}

.fert-month--ok.fert-month--active {
	background: #c8e6c9;
	border-color: #3A5A25;
}

.fert-month--ng {
	background: #ffebee;
	border-color: #ef9a9a;
}

.fert-month--ng.fert-month--active {
	background: #ffcdd2;
	border-color: #c62828;
}

.fert-month__label {
	font-size: 13px;
	font-weight: 700;
	color: var(--color-text);
	margin-bottom: 4px;
}

.fert-month__status {
	font-size: 11px;
	font-weight: 700;
	padding: 2px 8px;
	border-radius: 10px;
}

.fert-month--ok .fert-month__status {
	background: #2e7d32;
	color: #fff;
}

.fert-month--ng .fert-month__status {
	background: #c62828;
	color: #fff;
}

.fert-month__note {
	font-size: 10px;
	color: var(--color-text-secondary);
	margin-top: 3px;
	text-align: center;
	line-height: 1.3;
}

/* ========================================
   置き肥量テーブル
   ======================================== */
.fert-dosage-table-wrap {
	overflow-x: auto;
	-webkit-overflow-scrolling: touch;
}

.fert-dosage-table {
	width: 100%;
	border-collapse: collapse;
	font-size: 13px;
}

.fert-dosage-table th,
.fert-dosage-table td {
	padding: 8px 12px;
	border: 1px solid var(--color-border);
	text-align: center;
}

.fert-dosage-table th {
	background: #f1f8e9;
	color: #33691e;
	font-weight: 700;
	font-size: 12px;
	white-space: nowrap;
}

.fert-dosage-table tbody tr:nth-child(even) {
	background: var(--color-bg);
}

.fert-dosage-table tbody tr.fert-dosage-row--active {
	background: #e8f5e9;
	font-weight: 700;
}

.fert-dosage-table tbody tr.fert-dosage-row--active td {
	border-color: #81c784;
}

/* ========================================
   NPKインジケーター
   ======================================== */
.fert-npk-bar {
	display: flex;
	gap: 6px;
	align-items: center;
	margin-top: 6px;
}

.fert-npk-segment {
	height: 8px;
	border-radius: 4px;
	transition: width 0.3s ease;
}

.fert-npk-segment--n {
	background: #43a047;
}

.fert-npk-segment--p {
	background: #fb8c00;
}

.fert-npk-segment--k {
	background: #1e88e5;
}

.fert-npk-legend {
	display: flex;
	gap: 14px;
	margin-top: 6px;
	font-size: 11px;
	color: var(--color-text-secondary);
}

.fert-npk-legend span::before {
	content: '';
	display: inline-block;
	width: 10px;
	height: 10px;
	border-radius: 2px;
	margin-right: 4px;
	vertical-align: -1px;
}

.fert-npk-legend .npk-n::before {
	background: #43a047;
}

.fert-npk-legend .npk-p::before {
	background: #fb8c00;
}

.fert-npk-legend .npk-k::before {
	background: #1e88e5;
}

/* ========================================
   NG条件リスト
   ======================================== */
.fert-ng-list {
	list-style: none;
	padding: 0;
	margin: 0;
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.fert-ng-item {
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 8px 12px;
	background: #fff3e0;
	border: 1px solid #ffcc80;
	border-radius: var(--radius);
	font-size: 13px;
	color: #e65100;
}

.fert-ng-item::before {
	content: '!';
	flex-shrink: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 20px;
	height: 20px;
	background: #f57c00;
	color: #fff;
	border-radius: 50%;
	font-size: 12px;
	font-weight: 700;
}

/* ========================================
   レスポンシブ
   ======================================== */
@media (max-width: 600px) {
	.fert-calendar {
		grid-template-columns: repeat(3, 1fr);
		gap: 6px;
	}

	.fert-month {
		padding: 8px 4px;
		min-height: 60px;
	}

	.fert-month__label {
		font-size: 12px;
	}

	.fert-month__status {
		font-size: 10px;
		padding: 2px 6px;
	}

	.fert-dosage-table th,
	.fert-dosage-table td {
		padding: 6px 8px;
		font-size: 12px;
	}
}
