/**
 * Tokens Zazulê/React + shell compartilhado (header, drawer, rodapé pedido, carrinho editor).
 * Carregar antes de frontend.css e editor-shell.css.
 */
:root {
	--zazule-olive: #8a9a3c;
	--zazule-olive-hover: #788534;
	--zazule-teal: #1fbdc6;
	--zazule-teal-soft: rgba(31, 189, 198, 0.14);
	--zazule-heading: #174a4f;
	--zazule-muted: #64748b;
	--zazule-scene-bg: #faf9f6;
	--zazule-border: #e8e4dc;
	--zazule-shadow: 0 8px 28px rgba(20, 20, 30, 0.08);
}

.atomti-cp-app-shell {
	display: flex;
	flex-direction: column;
	min-height: 100vh;
	font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
	color: #333;
	background: #fff;
}

.atomti-cp-app-header {
	position: sticky;
	top: 0;
	z-index: 40;
	border-bottom: 1px solid var(--zazule-border);
	background: rgba(255, 255, 255, 0.92);
	-webkit-backdrop-filter: blur(10px);
	backdrop-filter: blur(10px);
}

.atomti-cp-app-header-inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	max-width: 72rem;
	margin: 0 auto;
	min-height: 4rem;
	padding: 10px 20px;
}

.atomti-cp-header-icon-btn {
	display: grid;
	place-items: center;
	flex-shrink: 0;
	width: 44px;
	height: 44px;
	min-width: 44px;
	padding: 0;
	border: none;
	border-radius: 999px;
	background: transparent;
	color: #333;
	cursor: pointer;
	transition: background 0.15s ease;
}

.atomti-cp-header-icon-btn:hover {
	background: #f4f1ea;
}

.atomti-cp-header-menu-bars {
	display: block;
	width: 18px;
	height: 2px;
	background: currentColor;
	border-radius: 1px;
	box-shadow: 0 6px 0 currentColor, 0 -6px 0 currentColor;
}

.atomti-cp-header-logo-link {
	display: flex;
	align-items: center;
	flex: 1;
	justify-content: center;
	min-width: 0;
}

.atomti-cp-header-logo-img {
	display: block !important;
	height: 32px !important;
	width: auto !important;
	max-width: min(160px, 36vw) !important;
	max-height: 42px !important;
	object-fit: contain !important;
	margin: 0 auto !important;
}

@media (min-width: 640px) {
	.atomti-cp-header-logo-img {
		height: 36px !important;
		max-width: 180px !important;
	}
}

.atomti-cp-header-cart {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	min-height: 44px;
	padding: 0 16px;
	border-radius: 999px;
	background: #f4f1ea;
	color: #333;
	font-size: 0.875rem;
	font-weight: 600;
	text-decoration: none;
	transition: background 0.15s ease;
	max-width: 48vw;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.atomti-cp-header-cart:hover {
	background: #ebe5d8;
}

.atomti-cp-header-cart--toggle {
	border: none;
	cursor: pointer;
	font: inherit;
}

.atomti-cp-header-cart-wrap {
	position: relative;
	flex-shrink: 0;
}

.atomti-cp-cart-dropdown {
	position: absolute;
	right: 0;
	top: calc(100% + 8px);
	min-width: 260px;
	max-width: 92vw;
	padding: 12px 14px;
	background: #fff;
	border: 1px solid var(--zazule-border);
	border-radius: 12px;
	box-shadow: var(--zazule-shadow);
	z-index: 60;
	font-size: 13px;
}

.atomti-cp-cart-dropdown .line {
	display: flex;
	justify-content: space-between;
	gap: 12px;
	margin: 4px 0;
}

.atomti-cp-cart-dropdown .total {
	display: flex;
	justify-content: space-between;
	margin-top: 8px;
	font-weight: 700;
}

.atomti-cp-header-cart-icon {
	display: flex;
	flex-shrink: 0;
}

.atomti-cp-header-cart-text--full {
	display: none;
	white-space: nowrap;
}

@media (min-width: 640px) {
	.atomti-cp-header-cart-text--full {
		display: inline;
	}
	.atomti-cp-header-cart-text--compact {
		display: none;
	}
}

.atomti-cp-header-cart-text--compact {
	display: inline;
}

.atomti-cp-header-cart-amount {
	font-weight: 600;
	white-space: nowrap;
}

/* Drawer */
.atomti-cp-nav-drawer-root {
	position: fixed;
	inset: 0;
	z-index: 45;
	visibility: hidden;
	opacity: 0;
	pointer-events: none;
	transition: opacity 0.2s ease, visibility 0.2s ease;
}

.atomti-cp-nav-drawer-root.is-open {
	visibility: visible;
	opacity: 1;
	pointer-events: auto;
}

.atomti-cp-nav-drawer-backdrop {
	position: absolute;
	inset: 0;
	background: rgba(15, 23, 42, 0.45);
	cursor: pointer;
}

.atomti-cp-nav-drawer {
	position: absolute;
	top: 0;
	left: 0;
	bottom: 0;
	width: min(300px, 92vw);
	max-width: 100%;
	background: #fff;
	box-shadow: 8px 0 32px rgba(15, 23, 42, 0.18);
	display: flex;
	flex-direction: column;
	padding: max(14px, env(safe-area-inset-top)) 16px max(20px, env(safe-area-inset-bottom));
	transform: translateX(-102%);
	transition: transform 0.28s cubic-bezier(0.22, 1, 0.36, 1);
	outline: none;
}

.atomti-cp-nav-drawer-root.is-open .atomti-cp-nav-drawer {
	transform: translateX(0);
}

.atomti-cp-nav-drawer-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	padding-bottom: 12px;
	margin-bottom: 8px;
	border-bottom: 1px solid var(--zazule-border);
}

.atomti-cp-nav-drawer-title {
	font: 700 1rem Inter, system-ui, sans-serif;
	color: var(--zazule-heading);
}

.atomti-cp-nav-drawer-close {
	width: 36px;
	height: 36px;
	border: none;
	border-radius: 10px;
	background: #f4f1ea;
	color: #475569;
	font-size: 1.35rem;
	line-height: 1;
	cursor: pointer;
	transition: background 0.15s ease;
}

.atomti-cp-nav-drawer-close:hover {
	background: #ebe5d8;
}

.atomti-cp-nav-drawer-close:focus-visible,
.atomti-cp-nav-drawer-link:focus-visible,
#atomti-cp-menu-toggle:focus-visible {
	outline: 2px solid var(--zazule-teal);
	outline-offset: 2px;
}

.atomti-cp-nav-drawer-links {
	display: flex;
	flex-direction: column;
	gap: 4px;
}

.atomti-cp-nav-drawer-link {
	display: block;
	padding: 12px 14px;
	border-radius: 12px;
	font: 600 0.9375rem Inter, system-ui, sans-serif;
	color: #333;
	text-decoration: none;
	transition: background 0.15s ease;
}

.atomti-cp-nav-drawer-link:hover {
	background: #f7f4eb;
	color: var(--zazule-heading);
}

/* Rodapé pedido + promo */
.atomti-cp-order-footer {
	max-width: 100%;
	margin: 0 auto;
	padding: 0;
	width: 100%;
}

.atomti-cp-promo-bar {
	margin-bottom: 10px;
}

.atomti-cp-promo-bar-inner {
	display: flex;
	align-items: center;
	gap: 14px;
	padding: 14px 18px;
	background: #fff;
	border: none;
	border-radius: 1rem;
	box-shadow: 0 2px 12px rgba(15,23,42,.06);
}

.atomti-cp-promo-icon {
	flex-shrink: 0;
	color: var(--zazule-teal);
	margin-top: 2px;
}
.atomti-cp-promo-icon svg {
	width: 24px;
	height: 24px;
}

.atomti-cp-promo-message {
	margin: 0 0 8px;
	font: 600 1.05rem/1.4 Inter, system-ui, sans-serif;
	color: #334155;
}

.atomti-cp-promo-progress {
	height: 7px;
	border-radius: 999px;
	background: #e2e8f0;
	overflow: hidden;
}

.atomti-cp-promo-progress-fill {
	height: 100%;
	border-radius: 999px;
	background: var(--zazule-teal);
	transition: width 0.25s ease;
}

.atomti-cp-order-bar {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 14px;
	padding: 12px 18px;
	background: #fff;
	border: none;
	border-radius: 1rem;
	box-shadow: 0 2px 12px rgba(15,23,42,.06);
}

.atomti-cp-order-bar-label {
	display: block;
	font: 700 0.8rem Inter, system-ui, sans-serif;
	letter-spacing: 0.06em;
	color: var(--zazule-muted);
	text-transform: uppercase;
}

.atomti-cp-order-bar-summary {
	margin: 2px 0 0;
	font: 600 1.15rem Inter, system-ui, sans-serif;
	color: var(--zazule-heading);
}

.atomti-cp-order-bar-cta {
	flex-shrink: 0;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 11px 20px;
	border: none;
	border-radius: 999px;
	background: var(--zazule-olive);
	color: #000;
	font: 600 1rem Inter, system-ui, sans-serif;
	text-decoration: none;
	cursor: pointer;
	transition: background 0.15s ease;
}

.atomti-cp-order-bar-cta:hover {
	background: var(--zazule-olive-hover);
	color: #000;
}

.atomti-cp-order-bar-cta--view {
	background: #8a9a3c;
	color: #000;
	border: none;
}

.atomti-cp-order-bar-cta--view:hover {
	background: #7a8a34;
	color: #000;
}

.atomti-cp-order-bar-actions {
	display: flex;
	gap: 8px;
	flex-shrink: 0;
	flex-wrap: wrap;
	justify-content: flex-end;
}

/* Botões primários oliva (Salvar + carrinho) */
.zazule-react-save-row {
	display: flex;
	flex-direction: column;
	gap: 8px;
	max-width: 28rem;
	margin: 10px auto 0;
	padding: 0 12px;
	width: 100%;
}

/* Wrapper par botão primário + salvar-outro dentro da tools-card */
.zazule-save-row {
	display: flex;
	flex-direction: column;
	gap: 8px;
	margin-top: 10px;
}

.zazule-react-save-btn,
.zazule-react-save-another-btn {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	width: 100%;
	padding: 14px 18px;
	border: none;
	border-radius: 14px;
	font: 700 1.125rem Inter, system-ui, sans-serif;
	cursor: pointer;
	transition: background 0.15s ease, opacity 0.15s ease;
}

.zazule-react-save-another-btn {
	background: var(--zazule-olive);
	color: #000;
	padding: 10px 18px;
	font-size: 0.9375rem;
	border-radius: 12px;
}

.zazule-react-save-another-btn:hover:not(:disabled) {
	background: var(--zazule-olive-hover);
}

.zazule-react-cart-btn.zazule-react-save-btn {
	background: var(--zazule-olive);
	color: #000;
	margin-top: 0;
}

.zazule-react-cart-btn.zazule-react-save-btn:hover:not(:disabled) {
	background: var(--zazule-olive-hover);
}

/* Barra inferior: item ativo estilo React */
.zazule-react-bottom-bar .zrb-btn.is-active {
	background: var(--zazule-teal-soft);
	color: var(--zazule-heading);
}

.zazule-react-bottom-bar .zrb-btn.is-active .zrb-icon {
	color: var(--zazule-teal);
}

.zazule-react-bottom-bar .zrb-btn.is-active .zrb-label {
	font-weight: 700;
	color: var(--zazule-heading);
}

/* Carrinho compacto quando o editor está dentro do upload (sem header duplicado) */
.atomti-cp-editor-cart-strip {
	display: none; /* hidden when full atomti-cp-app-header is present */
	justify-content: flex-end;
	max-width: 28rem;
	margin: 0 auto;
	padding: 8px 12px 0;
	width: 100%;
}
/* Show the cart strip only when the editor is standalone (no upload header) */
.atomti-editor-standalone .atomti-cp-editor-cart-strip {
	display: flex;
}
