/* OneRestau Menu — FO Shell carte screen. Scoped to .sgp-rcm-carte. */

.sgp-rcm-carte {
	display: flex;
	flex-direction: column;
	gap: 16px;
	min-width: 0;
	overflow-x: hidden;
	color: var(--sgp-rc-text-dark, #122033);
}

.sgp-rcm-carte__header {
	display: flex;
	flex-wrap: wrap;
	gap: 16px;
	align-items: flex-end;
	justify-content: space-between;
}

.sgp-rcm-carte__kicker {
	margin: 0 0 4px;
	font-size: 12px;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: rgba(248, 250, 252, 0.65);
}

.sgp-rcm-carte__title {
	margin: 0;
	font-size: 1.5rem;
	color: var(--sgp-rc-text-light, #f8fafc);
}

.sgp-rcm-carte__sub {
	margin: 6px 0 0;
	color: rgba(248, 250, 252, 0.78);
}

.sgp-rcm-carte__metrics {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

.sgp-rcm-carte__metric {
	min-width: 88px;
	padding: 10px 12px;
	border-radius: 12px;
	background: var(--sgp-rc-card-bg, #f8fafc);
}

.sgp-rcm-carte__metric strong {
	display: block;
	font-size: 1.25rem;
}

.sgp-rcm-carte__metric span {
	font-size: 12px;
}

.sgp-rcm-carte__toolbar {
	display: grid;
	grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) minmax(0, 1fr);
	gap: 10px;
}

.sgp-rcm-carte__field {
	display: flex;
	flex-direction: column;
	gap: 6px;
	min-width: 0;
}

.sgp-rcm-carte__field-label {
	font-size: 12px;
	color: rgba(248, 250, 252, 0.7);
}

.sgp-rcm-carte__field input,
.sgp-rcm-carte__field select {
	width: 100%;
	min-height: 44px;
	padding: 8px 12px;
	border: 1px solid rgba(248, 250, 252, 0.16);
	border-radius: 10px;
	background: #102f3a;
	color: #f8fafc;
	box-sizing: border-box;
	outline: none;
	box-shadow: none;
}

.sgp-rcm-carte__field input[type="search"] {
	-webkit-appearance: none;
	appearance: none;
}

.sgp-rcm-carte__field input:focus,
.sgp-rcm-carte__field select:focus {
	outline: none;
	border-color: rgba(12, 194, 30, 0.45);
}

.sgp-rcm-carte__field input:focus-visible,
.sgp-rcm-carte__field select:focus-visible {
	outline: none;
	border-color: var(--sgp-rc-accent, #0cc21e);
	box-shadow: inset 0 0 0 2px var(--sgp-rc-accent, #0cc21e);
}

.sgp-rcm-carte__alert {
	margin: 0;
	padding: 10px 12px;
	border-radius: 10px;
	background: #fef2f2;
	color: #991b1b;
	opacity: 1;
	transition: opacity var(--sgp-fo-motion-exit, 250ms) var(--sgp-fo-ease-standard, ease-out);
}

.sgp-rcm-carte__alert.is-leaving {
	opacity: 0;
}

.sgp-rcm-carte__empty {
	margin: 0;
	padding: 16px;
	border-radius: 12px;
	background: var(--sgp-rc-card-bg, #f8fafc);
}

.sgp-rcm-carte__groups {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 22px;
	min-width: 0;
}

.sgp-rcm-carte__group {
	min-width: 0;
}

.sgp-rcm-carte__group-title {
	margin: 0 0 12px;
	padding: 0 0 8px;
	border-bottom: 1px solid rgba(248, 250, 252, 0.16);
	font-size: 1.05rem;
	font-weight: 650;
	letter-spacing: 0.03em;
	color: var(--sgp-rc-text-light, #f8fafc);
}

.sgp-rcm-carte__list {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 10px;
}

.sgp-rcm-carte__item {
	display: grid;
	grid-template-columns: 72px minmax(0, 1.6fr) minmax(88px, 0.6fr) minmax(140px, 0.9fr) minmax(160px, 0.8fr);
	gap: 12px;
	align-items: center;
	padding: 12px;
	border-radius: 14px;
	background: var(--sgp-rc-card-bg, #f8fafc);
	min-width: 0;
}

.sgp-rcm-carte__item.is-unavailable {
	opacity: 0.92;
}

.sgp-rcm-carte__item.is-filter-exit,
.sgp-rcm-carte__item.is-filter-enter,
.sgp-rcm-carte__group.is-filter-exit,
.sgp-rcm-carte__group.is-filter-enter {
	transition: opacity var(--sgp-fo-motion-fast, 160ms) var(--sgp-fo-ease-standard, ease-out);
}

.sgp-rcm-carte__item.is-filter-pre-enter,
.sgp-rcm-carte__item.is-filter-exit,
.sgp-rcm-carte__group.is-filter-pre-enter,
.sgp-rcm-carte__group.is-filter-exit {
	opacity: 0;
	pointer-events: none;
}

.sgp-rcm-carte__item.is-filter-pre-enter,
.sgp-rcm-carte__group.is-filter-pre-enter {
	transition: none;
}

.sgp-rcm-carte__item.is-filter-enter {
	opacity: 1;
}

.sgp-rcm-carte__item.is-unavailable.is-filter-enter {
	opacity: 0.92;
}

.sgp-rcm-carte__media,
.sgp-rcm-carte__media img,
.sgp-rcm-carte__media-placeholder {
	width: 72px;
	height: 72px;
	border-radius: 10px;
	object-fit: cover;
	background: #dbe4ea;
}

.sgp-rcm-carte__name {
	margin: 0;
	font-size: 1rem;
	overflow-wrap: anywhere;
}

.sgp-rcm-carte__cats,
.sgp-rcm-carte__desc {
	margin: 4px 0 0;
	font-size: 13px;
	color: #4b5c6b;
}

.sgp-rcm-carte__price {
	font-weight: 600;
}

.sgp-rcm-carte__badge {
	display: inline-block;
	padding: 6px 10px;
	border-radius: 999px;
	background: #dcfce7;
	color: #166534;
	font-size: 13px;
	transition:
		background-color var(--sgp-fo-motion-fast, 160ms) var(--sgp-fo-ease-standard, ease-out),
		color var(--sgp-fo-motion-fast, 160ms) var(--sgp-fo-ease-standard, ease-out),
		border-color var(--sgp-fo-motion-fast, 160ms) var(--sgp-fo-ease-standard, ease-out);
}

.sgp-rcm-carte__item.is-unavailable .sgp-rcm-carte__badge {
	background: #fee2e2;
	color: #991b1b;
}

.sgp-rcm-carte__action {
	display: flex;
	flex-direction: column;
	gap: 8px;
	min-width: 0;
}

.sgp-rcm-carte__btn {
	width: 100%;
	min-height: 44px;
	padding: 8px 12px;
	border: 0;
	border-radius: 10px;
	background: var(--sgp-rc-primary, #22bbee);
	color: #fff;
	font-weight: 600;
	cursor: pointer;
}

.sgp-rcm-carte__btn--secondary {
	background: #fff;
	color: var(--sgp-rc-primary, #22bbee);
	border: 1px solid var(--sgp-rc-primary, #22bbee);
}

.sgp-rcm-carte__btn--ghost {
	background: transparent;
	color: var(--sgp-rc-primary, #22bbee);
	border: 1px solid #c5d0d6;
}

.sgp-rcm-carte__btn:focus,
.sgp-rcm-carte__btn:focus-visible,
.sgp-rcm-carte__editor input:focus,
.sgp-rcm-carte__editor textarea:focus {
	outline: none;
}

.sgp-rcm-carte__btn:focus-visible,
.sgp-rcm-carte__editor input:focus-visible,
.sgp-rcm-carte__editor textarea:focus-visible {
	outline: none;
	box-shadow: inset 0 0 0 2px var(--sgp-rc-accent, #0cc21e);
	border-color: var(--sgp-rc-accent, #0cc21e);
}

.sgp-rcm-carte__btn:disabled {
	opacity: 0.55;
	cursor: not-allowed;
}

.sgp-rcm-carte__editor {
	grid-column: 1 / -1;
	min-width: 0;
	padding-top: 12px;
	border-top: 1px solid #dbe4ea;
	opacity: 1;
}

.sgp-rcm-carte__editor.is-editor-enter,
.sgp-rcm-carte__editor.is-editor-exit {
	transition: opacity var(--sgp-fo-motion-normal, 200ms) var(--sgp-fo-ease-standard, ease-out);
}

.sgp-rcm-carte__editor.is-editor-pre-enter {
	opacity: 0;
	transition: none;
}

.sgp-rcm-carte__editor.is-editor-exit {
	opacity: 0;
	pointer-events: none;
}

.sgp-rcm-carte__editor-grid {
	display: grid;
	grid-template-columns: minmax(0, 1.4fr) minmax(140px, 0.6fr);
	gap: 10px;
}

.sgp-rcm-carte__editor-field {
	display: flex;
	flex-direction: column;
	gap: 6px;
	min-width: 0;
}

.sgp-rcm-carte__editor-label {
	font-size: 12px;
	font-weight: 600;
	line-height: 1.3;
	color: #4b5c6b;
}

.sgp-rcm-carte__editor-price {
	display: flex;
	align-items: center;
	gap: 8px;
	min-width: 0;
}

.sgp-rcm-carte__editor-price input {
	flex: 1 1 auto;
	min-width: 0;
}

.sgp-rcm-carte__editor-currency {
	flex: 0 0 auto;
	font-size: 14px;
	font-weight: 650;
	color: #4b5c6b;
}

.sgp-rcm-carte__editor-field--full,
.sgp-rcm-carte__promo {
	grid-column: 1 / -1;
}

.sgp-rcm-carte__editor input,
.sgp-rcm-carte__editor textarea {
	width: 100%;
	min-height: 44px;
	padding: 8px 12px;
	border: 1px solid #c5d0d6;
	border-radius: 10px;
	background: #fff;
	color: #122033;
	box-sizing: border-box;
	font: inherit;
}

.sgp-rcm-carte__editor-price input {
	flex: 1 1 auto;
	width: auto;
	min-width: 0;
}

.sgp-rcm-carte__editor textarea {
	min-height: 88px;
	resize: vertical;
}

.sgp-rcm-carte__promo {
	margin: 0;
	padding: 8px 10px;
	border-radius: 10px;
	background: #fef3c7;
	color: #92400e;
	font-size: 13px;
}

.sgp-rcm-carte__desc-html {
	margin: 0;
	padding: 8px 10px;
	border-radius: 10px;
	background: #fef3c7;
	color: #92400e;
	font-size: 13px;
}

.sgp-rcm-carte__editor-status {
	margin: 10px 0 0;
	font-size: 13px;
	color: #4b5c6b;
}

.sgp-rcm-carte__editor-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin-top: 12px;
}

.sgp-rcm-carte__editor-actions .sgp-rcm-carte__btn {
	width: auto;
	min-width: 140px;
	flex: 1 1 140px;
}

.sgp-rcm-carte__alert.is-success {
	background: #dcfce7;
	color: #166534;
}

.sgp-rcm-carte__notice {
	color: var(--sgp-rc-text-light, #f8fafc);
}

@media (prefers-reduced-motion: reduce) {
	.sgp-rcm-carte__alert,
	.sgp-rcm-carte__badge,
	.sgp-rcm-carte__item.is-filter-exit,
	.sgp-rcm-carte__item.is-filter-enter,
	.sgp-rcm-carte__group.is-filter-exit,
	.sgp-rcm-carte__group.is-filter-enter,
	.sgp-rcm-carte__editor.is-editor-enter,
	.sgp-rcm-carte__editor.is-editor-exit {
		transition-duration: 0ms;
	}
}

@media (max-width: 1024px) {
	.sgp-rcm-carte__toolbar {
		grid-template-columns: 1fr 1fr;
	}

	.sgp-rcm-carte__item {
		grid-template-columns: 64px minmax(0, 1fr) auto;
		grid-template-areas:
			"media body price"
			"media body state"
			"action action action"
			"editor editor editor";
	}

	.sgp-rcm-carte__media { grid-area: media; }
	.sgp-rcm-carte__body { grid-area: body; }
	.sgp-rcm-carte__price { grid-area: price; }
	.sgp-rcm-carte__state { grid-area: state; }
	.sgp-rcm-carte__action { grid-area: action; }
	.sgp-rcm-carte__editor { grid-area: editor; }
}

@media (max-width: 768px) {
	.sgp-rcm-carte__toolbar {
		grid-template-columns: 1fr;
	}

	.sgp-rcm-carte__groups {
		gap: 28px;
	}

	.sgp-rcm-carte__group-title {
		margin-bottom: 14px;
	}

	.sgp-rcm-carte__item {
		grid-template-columns: 64px minmax(0, 1fr);
		grid-template-areas:
			"media body"
			"price price"
			"state state"
			"action action"
			"editor editor";
	}

	.sgp-rcm-carte__editor-grid {
		grid-template-columns: 1fr;
	}

	.sgp-rcm-carte__editor-actions .sgp-rcm-carte__btn {
		width: 100%;
		flex: 1 1 100%;
	}
}

/* display:grid on items would otherwise override the UA [hidden] { display:none }. */
.sgp-rcm-carte__item[hidden],
.sgp-rcm-carte__group[hidden],
.sgp-rcm-carte__empty[hidden],
.sgp-rcm-carte__alert[hidden],
.sgp-rcm-carte__editor[hidden],
.sgp-rcm-carte__promo[hidden],
.sgp-rcm-carte__desc-html[hidden],
.sgp-rcm-carte__desc[hidden],
.sgp-rcm-carte__editor-status[hidden],
[data-sgp-rcm-desc-plain][hidden],
[data-sgp-rcm-desc-html][hidden] {
	display: none !important;
}
