.eft-allergy-checklist {
	margin: 1.5em 0;
	border: 1px solid #d5d5d5;
	border-radius: 6px;
	background: #fff;
	overflow: hidden;
}

.eft-allergy-checklist *,
.eft-allergy-checklist *::before,
.eft-allergy-checklist *::after {
	box-sizing: border-box;
}

/* 進捗表示 */
.eft-allergy-checklist__summary {
	padding: 12px 16px;
	border-bottom: 1px solid #d5d5d5;
	background: #f5f5f5;
	font-weight: 700;
}

.eft-allergy-checklist__tested-count {
	font-size: 1.15em;
}

/* 見出し行 */
.eft-allergy-checklist__header {
	display: grid;
	grid-template-columns: 90px minmax(0, 1fr) 110px;
	align-items: center;
	gap: 12px;
	padding: 10px 16px;
	border-bottom: 1px solid #d5d5d5;
	background: #eeeeee;
	font-weight: 700;
	text-align: center;
}

.eft-allergy-checklist__name-label {
	text-align: left;
}

/* 各アイテム */
.eft-allergy-checklist__item {
	display: grid;
	grid-template-columns: 90px minmax(0, 1fr) 110px;
	align-items: center;
	gap: 12px;
	min-height: 58px;
	padding: 10px 16px;
	border-bottom: 1px solid #e5e5e5;
	transition:
		background-color 0.15s ease,
		opacity 0.15s ease;
}

.eft-allergy-checklist__item:last-child {
	border-bottom: 0;
}

.eft-allergy-checklist__item:hover {
	background: #fafafa;
}

/* 確認済みの行 */
.eft-allergy-checklist__item.is-tested {
	background: #f4f7f4;
}

.eft-allergy-checklist__item.is-tested:not(.is-allergy) {
	opacity: 0.72;
}

/* アレルギーの行 */
.eft-allergy-checklist__item.is-allergy {
	background: #fff0f0;
	opacity: 1;
}

.eft-allergy-checklist__item.is-allergy
	.eft-allergy-checklist__item-name {
	font-weight: 700;
}

/* チェック欄 */
.eft-allergy-checklist__tested,
.eft-allergy-checklist__allergy {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 6px;
	margin: 0;
	cursor: pointer;
}

.eft-allergy-checklist input[type="checkbox"] {
	width: 20px;
	height: 20px;
	margin: 0;
	cursor: pointer;
	accent-color: currentColor;
}

/* アイテム情報 */
.eft-allergy-checklist__item-info {
	min-width: 0;
}

.eft-allergy-checklist__item-name {
	display: block;
	overflow-wrap: anywhere;
	font-weight: 600;
	line-height: 1.45;
}

.eft-allergy-checklist__category {
	display: inline-block;
	margin-top: 4px;
	padding: 2px 7px;
	border-radius: 3px;
	background: #eeeeee;
	color: #555;
	font-size: 0.78em;
	line-height: 1.4;
}

/* PCではチェック横の文字を非表示 */
.eft-allergy-checklist__mobile-label {
	display: none;
}

/* 操作ボタン */
.eft-allergy-checklist__actions {
	padding: 14px 16px;
	border-top: 1px solid #d5d5d5;
	background: #fafafa;
	text-align: right;
}

.eft-allergy-checklist__reset {
	display: inline-block;
	margin: 0;
	padding: 8px 14px;
	border: 1px solid #999;
	border-radius: 4px;
	background: #fff;
	color: #333;
	font: inherit;
	line-height: 1.4;
	cursor: pointer;
	transition:
		background-color 0.15s ease,
		border-color 0.15s ease;
}

.eft-allergy-checklist__reset:hover {
	border-color: #555;
	background: #eeeeee;
}

.eft-allergy-checklist__reset:focus-visible,
.eft-allergy-checklist input[type="checkbox"]:focus-visible {
	outline: 2px solid currentColor;
	outline-offset: 3px;
}

/* 注意書き */
.eft-allergy-checklist__notice {
	margin: 0;
	padding: 0 16px 14px;
	background: #fafafa;
	color: #666;
	font-size: 0.85em;
	line-height: 1.6;
}

/* スマホ表示 */
@media screen and (max-width: 600px) {
	.eft-allergy-checklist__summary {
		padding: 10px 12px;
	}

	.eft-allergy-checklist__header {
		display: none;
	}

	.eft-allergy-checklist__item {
		grid-template-columns: 1fr 1fr;
		gap: 10px;
		padding: 12px;
	}

	.eft-allergy-checklist__item-info {
		grid-column: 1 / -1;
		grid-row: 1;
	}

	.eft-allergy-checklist__tested {
		grid-column: 1;
		grid-row: 2;
		justify-content: flex-start;
	}

	.eft-allergy-checklist__allergy {
		grid-column: 2;
		grid-row: 2;
		justify-content: flex-end;
	}

	.eft-allergy-checklist__mobile-label {
		display: inline;
		font-size: 0.9em;
	}

	.eft-allergy-checklist__actions {
		padding: 12px;
		text-align: center;
	}

	.eft-allergy-checklist__reset {
		width: 100%;
	}

	.eft-allergy-checklist__notice {
		padding: 0 12px 12px;
	}
}

/* WordPressやOSがダークモードの場合 */
@media (prefers-color-scheme: dark) {
	.eft-allergy-checklist {
		border-color: #555;
		background: #222;
		color: #eee;
	}

	.eft-allergy-checklist__summary,
	.eft-allergy-checklist__header {
		border-color: #555;
		background: #333;
	}

	.eft-allergy-checklist__item {
		border-color: #444;
	}

	.eft-allergy-checklist__item:hover {
		background: #2a2a2a;
	}

	.eft-allergy-checklist__item.is-tested {
		background: #253027;
	}

	.eft-allergy-checklist__item.is-allergy {
		background: #442727;
	}

	.eft-allergy-checklist__category {
		background: #444;
		color: #ddd;
	}

	.eft-allergy-checklist__actions,
	.eft-allergy-checklist__notice {
		border-color: #555;
		background: #2b2b2b;
		color: #ccc;
	}

	.eft-allergy-checklist__reset {
		border-color: #777;
		background: #333;
		color: #eee;
	}

	.eft-allergy-checklist__reset:hover {
		border-color: #aaa;
		background: #444;
	}
}