.mpc {
	--mpc-ink: #182c24;
	--mpc-muted: #506158;
	--mpc-accent: #214b38;
	--mpc-border: #dce3da;
	--mpc-surface: #f4f7ef;
	--mpc-danger: #892c23;
	max-width: 960px;
	margin: 24px auto 48px;
	color: var(--mpc-ink);
	background: #fff;
	border: 1px solid var(--mpc-border);
	border-radius: 18px;
	overflow: hidden;
}

.mpc [hidden] {
	display: none !important;
}

.mpc__header,
.mpc__form,
.mpc__results,
.mpc__empty {
	padding-inline: clamp(18px, 4vw, 40px);
}

.mpc__header {
	display: flex;
	align-items: center;
	gap: clamp(12px, 2.5vw, 22px);
	padding-block: 30px 0;
	background: var(--mpc-surface);
}

.mpc__recipe-image {
	flex: 0 0 auto;
}

.mpc .mpc__recipe-image img {
	display: block;
	width: clamp(68px, 14vw, 104px);
	aspect-ratio: 1;
	height: auto;
	border-radius: 10px;
	object-fit: cover;
}

.mpc__header h2,
.mpc__results h3 {
	color: var(--mpc-ink);
	line-height: 1.2;
	margin: 0;
}

.mpc__header h2 {
	font-size: clamp(28px, 4vw, 42px);
	letter-spacing: -0.035em;
}

.mpc__header p {
	color: var(--mpc-muted);
	margin: 9px 0 0;
}

.mpc__form {
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(130px, 0.42fr) auto;
	align-items: end;
	gap: 14px;
	padding-block: 22px 30px;
	background: var(--mpc-surface);
	margin: 0;
}

.mpc__form--single {
	grid-template-columns: minmax(130px, 240px) auto;
	justify-content: start;
}

.mpc__field {
	display: grid;
	gap: 6px;
	margin: 0;
	font-size: 14px;
	font-weight: 600;
	color: var(--mpc-ink);
}

.mpc .mpc__field :is(input, select) {
	width: 100%;
	min-height: 46px;
	border: 1px solid #a9b9ac;
	border-radius: 8px;
	background-color: #fff;
	color: var(--mpc-ink);
	font: inherit;
	margin: 0;
}

.mpc .mpc__button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 46px;
	padding: 10px 17px;
	border: 1px solid transparent;
	border-radius: 8px;
	background: var(--mpc-accent);
	color: #fff;
	font: inherit;
	font-weight: 600;
	text-decoration: none;
	text-transform: none;
	cursor: pointer;
}

.mpc .mpc__button:hover {
	background: #173827;
	color: #fff;
}

.mpc :is(button, input, select, a):focus-visible {
	outline: 2px solid #246d50;
	outline-offset: 3px;
}

.mpc .mpc__button:disabled {
	opacity: 0.58;
	cursor: default;
}

.mpc__status {
	margin: 0;
	padding: 10px clamp(18px, 4vw, 40px);
	color: var(--mpc-muted);
	font-size: 14px;
	background: #f7f9f5;
}

.mpc__status--error,
.mpc__ingredient-error {
	color: var(--mpc-danger);
}

.mpc__results {
	padding-block: 26px;
}

.mpc__table-wrap {
	overflow-x: auto;
	margin-block: 16px 20px;
}

.mpc .mpc__table {
	width: 100%;
	margin: 0;
	color: var(--mpc-ink);
	font-size: 14px;
	border-collapse: collapse;
}

.mpc .mpc__table :is(th, td) {
	padding: 10px 8px;
	border: 0;
	border-bottom: 1px solid var(--mpc-border);
	vertical-align: middle;
	text-align: start;
	white-space: nowrap;
	text-transform: none;
}

.mpc .mpc__table :is(th, td):first-child {
	padding-inline-start: 0;
	white-space: normal;
}

.mpc .mpc__table :is(th, td):last-child {
	text-align: end;
	padding-inline-end: 0;
}

.mpc .mpc__table thead th {
	color: var(--mpc-muted);
	font-size: 13px;
	font-weight: 600;
}

.mpc__product {
	display: flex;
	align-items: center;
	gap: 10px;
	min-width: 110px;
}

.mpc .mpc__product img {
	display: block;
	flex: 0 0 44px;
	width: 44px;
	height: 44px;
	border-radius: 6px;
	object-fit: cover;
}

.mpc__ingredient-error,
.mpc__summary small {
	display: block;
	font-size: 13px;
	font-weight: 400;
}

.mpc__summary {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 14px;
	padding: 14px 16px;
	border-radius: 10px;
	background: var(--mpc-surface);
}

.mpc__summary strong {
	display: block;
	font-size: 24px;
	line-height: 1.35;
}

.mpc__summary small {
	color: var(--mpc-muted);
}

.mpc__mobile-label {
	display: none;
}

.mpc__empty {
	margin: 0;
	padding-block: 22px;
}

@media (max-width: 650px) {
	.mpc__form {
		grid-template-columns: 1fr 1fr;
	}

	.mpc__form > :first-child {
		grid-column: 1 / -1;
	}

	.mpc .mpc__table thead {
		position: absolute;
		width: 1px;
		height: 1px;
		overflow: hidden;
		clip-path: inset(50%);
	}

	.mpc .mpc__table tbody,
	.mpc .mpc__table tr {
		display: block;
	}

	.mpc .mpc__table tr {
		padding: 12px 0;
		border-bottom: 1px solid var(--mpc-border);
	}

	.mpc .mpc__table :is(th, td) {
		display: flex;
		justify-content: space-between;
		gap: 12px;
		padding: 4px 0;
		border: 0;
	}

	.mpc__mobile-label {
		display: inline;
		color: var(--mpc-muted);
	}
}

@media (max-width: 420px) {
	.mpc__form {
		grid-template-columns: 1fr;
	}

	.mpc__form--single {
		justify-content: stretch;
	}

	.mpc__summary {
		align-items: stretch;
		flex-direction: column;
	}
}
