/* Maki & Co — suggestion de commande pour un groupe (popup de la carte et shortcode). */
.maki-sg-form,
.maki-sg-result {
	max-width: 760px;
	margin: 0 auto 32px;
}
.maki-sg-form label {
	display: block;
}
.maki-sg-form input[type="number"] {
	width: 4.5em;
	padding: 6px 8px;
	text-align: center;
}
.maki-sg-row {
	display: flex;
	flex-wrap: wrap;
	gap: 12px 32px;
	align-items: center;
	margin-bottom: 16px;
}
.maki-sg-row label,
.maki-sg-appetite label {
	display: flex;
	align-items: center;
	gap: 8px;
	font-weight: 600;
}
.maki-sg-row .ico-vegetarien {
	color: #129716;
}
.maki-sg-appetite {
	display: flex;
	flex-wrap: wrap;
	gap: 8px 32px;
	align-items: center;
	margin: 0 0 16px;
	padding: 12px 16px;
	border: 1px solid #e3ddd5;
	border-radius: 8px;
}
.maki-sg-appetite legend {
	padding: 0 6px;
	font-weight: 700;
	text-transform: uppercase;
}
.maki-sg-appetite small {
	color: #6b6258;
	font-weight: 400;
}
.maki-sg-form .maki-sg-medium {
	border-color: transparent;
	background: #f3efe9;
	color: #1e1810;
	font-weight: 700;
	pointer-events: none;
}
.maki-sg-appetite .maki-sg-hint {
	flex-basis: 100%;
	margin: 0;
}
.maki-sg-more {
	margin: 0 0 16px;
	padding: 12px 16px;
	border: 1px solid #e3ddd5;
	border-radius: 8px;
}
.maki-sg-more summary {
	font-weight: 700;
	text-transform: uppercase;
	cursor: pointer;
}
.maki-sg-hint {
	margin: 12px 0 8px;
	color: #6b6258;
	font-size: 0.9em;
}

/* Allergènes : mêmes pictogrammes et couleurs que les filtres de la carte. */
.maki-sg-allergens {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
	gap: 8px;
}
.maki-sg-allergens label {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 8px;
	padding: 4px 4px 4px 10px;
	border: 1px solid var(--allergene, #1e1810);
	border-radius: 4px;
	font-size: 14px;
	text-transform: uppercase;
	transition: background-color 0.2s, color 0.2s;
}
.maki-sg-allergen {
	display: flex;
	align-items: center;
	gap: 6px;
}
.maki-sg-allergens .ico {
	color: var(--allergene, #1e1810);
}
.maki-sg-allergens label.is-on {
	background: var(--allergene, #1e1810);
	color: #fff;
}
.maki-sg-allergens label.is-on .ico {
	color: #fff;
}
.maki-sg-allergens input[type="number"] {
	width: 3.5em;
	padding: 4px;
	background: #fff;
	color: #1e1810;
}

.maki-sg-foods {
	display: grid;
	gap: 8px;
}
.maki-sg-food {
	display: flex;
	gap: 8px;
	align-items: center;
}
.maki-sg-food input[type="text"] {
	flex: 1 1 auto;
	min-width: 0;
}
.maki-sg-food label {
	display: flex;
	flex: none;
	align-items: center;
	gap: 6px;
	white-space: nowrap;
}
.maki-sg-food input[type="number"] {
	width: 3.5em;
}
.maki-sg-add-food {
	margin-top: 8px;
	padding: 4px 0;
	border: 0;
	background: none;
	color: #c2551a;
	font-weight: 700;
	cursor: pointer;
}
.maki-sg-add-food:hover,
.maki-sg-add-food:focus {
	background: none;
	color: #1e1810;
	text-decoration: underline;
}

.maki-sg-cats {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
	gap: 6px 16px;
}
.maki-sg-check {
	font-weight: 400;
}

/* Boutons : orange plein, foncé au survol (lisible sur fond clair comme foncé). */
.maki-sg .maki-sg-submit,
.maki-sg-cta .maki-sg-open {
	padding: 12px 22px;
	border: 2px solid #ee712a;
	border-radius: 999px;
	background: #ee712a;
	color: #1e1810;
	font-size: 1em;
	font-weight: 700;
	text-transform: none;
	cursor: pointer;
}
.maki-sg .maki-sg-submit:hover,
.maki-sg .maki-sg-submit:focus-visible {
	border-color: #1e1810;
	background: #1e1810;
	color: #fff;
}
.maki-sg-cta .maki-sg-open:hover,
.maki-sg-cta .maki-sg-open:focus-visible {
	border-color: #fff;
	background: #fff;
	color: #1e1810;
}
.maki-sg-cta .maki-sg-open:focus-visible {
	outline: 3px solid #ee712a;
	outline-offset: 2px;
}

/* Résultat. */
.maki-sg-result h2 {
	margin: 24px 0 8px;
}
.maki-sg-result h3 {
	margin: 20px 0 8px;
	font-size: 1.1em;
}
.maki-sg-result ul {
	margin: 0;
	padding: 0;
	list-style: none;
}
.maki-sg-result li {
	display: grid;
	grid-template-columns: 3em 1fr auto auto;
	gap: 12px;
	padding: 6px 0;
	border-bottom: 1px solid #eee7de;
}
.maki-sg-qty {
	font-weight: 700;
}
.maki-sg-detail {
	color: #6b6258;
}
.maki-sg-price {
	text-align: right;
	white-space: nowrap;
}
.maki-sg-missing {
	color: #a33;
}
.maki-sg-warning {
	margin: 16px 0 0;
	padding: 10px 12px;
	border-left: 4px solid #ee712a;
	background: #fdf3ec;
	font-size: 0.9em;
}
.maki-sg-total {
	margin: 16px 0;
	font-size: 1.1em;
	text-align: right;
}
.maki-sg-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 16px;
	align-items: center;
	justify-content: flex-end;
}
.maki-sg-actions form {
	margin: 0;
}
.maki-sg-again {
	color: #c2551a;
	font-weight: 700;
}
.maki-sg.is-loading {
	opacity: 0.5;
	pointer-events: none;
}

/* Encart de la carte. */
.maki-sg-cta {
	display: flex;
	flex-wrap: wrap;
	gap: 12px 24px;
	align-items: center;
	justify-content: space-between;
	margin: 0 0 24px;
	padding: 16px 20px;
	border-radius: 10px;
	background: #1e1810;
	color: #fff;
}
.maki-sg-cta p {
	flex: 1 1 280px;
	margin: 0;
}

/* Popup. */
.maki-sg-dialog {
	width: min(820px, calc(100vw - 32px));
	max-height: calc(100vh - 32px);
	padding: 0 24px 24px;
	border: 0;
	border-radius: 12px;
	box-shadow: 0 12px 40px rgba(30, 24, 16, 0.35);
}
.maki-sg-dialog::backdrop {
	background: rgba(30, 24, 16, 0.6);
}
.maki-sg-dialog-head {
	position: sticky;
	top: 0;
	z-index: 1;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	margin: 0 -24px 16px;
	padding: 12px 16px 12px 24px;
	background: #1e1810;
	color: #fff;
}
.maki-sg-dialog .maki-sg-dialog-head h2 {
	margin: 0;
	padding: 0;
	color: #fff;
	font-size: 1.4em;
	line-height: 1;
}
.maki-sg-dialog .maki-sg-close {
	display: flex;
	flex: none;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: transparent;
	color: #fff;
	font-size: 28px;
	line-height: 1;
	cursor: pointer;
}
.maki-sg-dialog .maki-sg-close:hover,
.maki-sg-dialog .maki-sg-close:focus-visible {
	background: #ee712a;
	color: #1e1810;
}
.maki-sg-dialog .maki-sg-form,
.maki-sg-dialog .maki-sg-result {
	max-width: none;
	margin-bottom: 16px;
}

@media (max-width: 520px) {
	.maki-sg-result li {
		grid-template-columns: 2.5em 1fr auto;
	}
	.maki-sg-detail {
		display: none;
	}
	.maki-sg-dialog {
		width: 100vw;
		max-width: 100vw;
		height: 100vh;
		max-height: 100vh;
		margin: 0;
		padding: 0 16px 16px;
		border-radius: 0;
	}
	.maki-sg-dialog-head {
		margin: 0 -16px 12px;
		padding: 8px 8px 8px 16px;
	}
}
