/* Customer menu pages opt in through _FormLayout. Ordinary form and review
   branding is independent of this contract. Keep the canvas, surfaces and
   foregrounds together when the visitor's theme changes. */
body.menu-customer-body {
    --form-bg: #f6f7fb;
    --app-surface: #fff;
    --app-surface-muted: #f1f3f8;
    --app-text: #202538;
    --app-text-muted: #525d70;
    --app-border-soft: #dce0eb;
    --menu-link: #5541c8;
    min-height: 100vh;
    color: var(--app-text);
    line-height: 1.6;
}
html.theme-dark body.menu-customer-body {
    --form-bg: #0b1020;
    --app-surface: #151d30;
    --app-surface-muted: #1d273d;
    --app-text: #eef0f8;
    --app-text-muted: #b4bfd2;
    --app-border-soft: #36415a;
    --menu-link: #c4b8ff;
}
.menu-customer-body #main-content {
    max-width: 1248px;
    margin-inline: auto;
    padding: 1rem;
}
.menu-customer-body .menu-public-wrapper {
    padding: 1.5rem 1rem 3rem;
    min-height: 0;
}
.menu-customer-body .menu-header { margin: 0 auto 2rem; max-width: 900px; }
.menu-customer-body .menu-title { font-weight: 700; line-height: 1.3; }
.menu-customer-body .menu-description { color: var(--app-text-muted); }
.menu-customer-body .card,
.menu-customer-body .modal-content,
.menu-customer-body .cart-dropdown {
    background: var(--app-surface);
    color: var(--app-text);
    border: 1px solid var(--app-border-soft);
    border-radius: 1rem;
    box-shadow: 0 4px 18px rgb(20 30 60 / 5%);
    overflow: clip;
}
.menu-customer-body .card-header,
.menu-customer-body .card-footer,
.menu-customer-body .cart-dropdown-footer,
.menu-customer-body .menu-controls-sticky {
    background: var(--app-surface-muted) !important;
    color: var(--app-text) !important;
    border-color: var(--app-border-soft) !important;
    padding: 1rem 1.25rem;
}
.menu-customer-body .card-header h5 { font-size: 1.05rem; font-weight: 650; color: inherit; }
.menu-customer-body .border-primary { border-color: var(--app-border-soft) !important; }
.menu-customer-body .badge.bg-primary { background-color: var(--menu-button, #5a4ae3) !important; color: #fff !important; }
.menu-customer-body .card-body { padding: 1.25rem; }
.menu-customer-body .list-group-item {
    background: var(--app-surface);
    color: var(--app-text);
    border-color: var(--app-border-soft);
}
.menu-customer-body .menu-product-card { border-color: var(--app-border-soft); padding: 1.25rem; }
.menu-customer-body .menu-product-card:hover { background: var(--app-surface-muted); }
.menu-customer-body .menu-public-embed-blend .menu-product-card { background: var(--app-surface); padding: 0; }
.menu-customer-body .menu-item-name { font-size: 1.05rem; font-weight: 650; }
.menu-customer-body .menu-item-description,
.menu-customer-body .dropdown-cart-item .item-meta { color: var(--app-text-muted) !important; }
.menu-customer-body .menu-item-img-placeholder { background: var(--app-surface-muted); color: var(--app-text-muted); }
.menu-customer-body a { color: var(--menu-link); }
.menu-customer-body .btn { border-radius: .55rem; font-weight: 600; }
.menu-customer-body .btn-primary,
.menu-customer-body .btn-success,
.menu-customer-body .btn-accent,
.menu-customer-body #placeOrderBtn {
    background: var(--menu-button, #5a4ae3);
    border: 1px solid var(--menu-button, #5a4ae3);
    color: #fff;
    padding: .55rem 1rem;
}
.menu-customer-body .btn-lg,
.menu-customer-body #placeOrderBtn { padding: .8rem 1.25rem; }
.menu-customer-body .btn-outline-primary,
.menu-customer-body .btn-outline-secondary {
    color: var(--menu-link);
    border-color: var(--menu-link);
    background: transparent;
}
.menu-customer-body .btn-outline-primary:hover,
.menu-customer-body .btn-outline-secondary:hover {
    background: var(--app-surface-muted);
    color: var(--menu-link);
}
.menu-customer-body .btn-outline-primary.active { background: var(--menu-button, #5a4ae3); color: #fff; }
.menu-customer-body :is(a, button, input, select, textarea):focus-visible {
    outline: 3px solid var(--menu-link);
    outline-offset: 3px;
}
.menu-customer-body .form-control,
.menu-customer-body .form-select {
    background: var(--app-surface);
    color: var(--app-text);
    border-color: var(--app-border-soft);
    border-radius: .5rem;
    min-height: 2.75rem;
}
.menu-customer-body .form-control::placeholder { color: var(--app-text-muted); opacity: 1; }
.menu-customer-body .alert {
    border-radius: .75rem;
    padding: 1rem 1.25rem;
    box-shadow: none !important;
}
.menu-customer-body .alert-info,
.menu-customer-body .alert-primary {
    background: #eeeafa;
    color: #403374;
    border-color: #d7ceef;
}
html.theme-dark .menu-customer-body .alert-info,
html.theme-dark .menu-customer-body .alert-primary {
    background: #282341;
    color: #ded5ff;
    border-color: #514573;
}
.menu-customer-body .validation-summary-valid { display: none; }
.menu-customer-body .validation-summary-errors ul { margin-bottom: 0; }
.menu-customer-body .checkout-progress { margin: .5rem 0 2rem; }
.menu-customer-body .progress-steps { gap: .75rem !important; }
.menu-customer-body .checkout-progress .step {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .5rem;
    flex: 1;
    padding: .75rem;
    border-bottom: 2px solid var(--app-border-soft);
    color: var(--app-text-muted);
    text-align: center;
}
.menu-customer-body .checkout-progress .step.active { color: var(--menu-link); border-color: var(--menu-link); font-weight: 650; }
.menu-customer-body .checkout-progress .step.completed { color: var(--app-text); }
.menu-customer-body .checkout-progress .step::after { content: none; }
.menu-customer-body .checkout-progress .step i { display: inline; margin: 0; font-size: 1.1rem; }
.menu-customer-body .cart-dropdown-body { background: var(--app-surface); }
.menu-customer-body .dropdown-qty-group :is(button, .qty-display) { color: var(--app-text); background: var(--app-surface-muted); }
.menu-customer-body .text-muted,
.menu-customer-body .form-text { color: var(--app-text-muted) !important; }
/* Saved branding remains intact. Dark mode adapts foregrounds so a saved dark
   text color cannot disappear into a dark card. Filled buttons retain branding. */
html.theme-dark .menu-customer-body .menu-public-wrapper { color: var(--app-text); }
html.theme-dark .menu-customer-body .menu-public-wrapper .menu-item-name,
html.theme-dark .menu-customer-body .menu-public-wrapper .dropdown-cart-item .item-name { color: var(--app-text); }
html.theme-dark .menu-customer-body .menu-public-wrapper .menu-title,
html.theme-dark .menu-customer-body .menu-public-wrapper .menu-section-title { color: color-mix(in srgb, var(--menu-title, #5a4ae3) 25%, white) !important; }
html.theme-dark .menu-customer-body .menu-public-wrapper .text-primary,
html.theme-dark .menu-customer-body .menu-public-wrapper .menu-item-price,
html.theme-dark .menu-customer-body .menu-public-wrapper .dropdown-cart-item .item-price { color: var(--menu-link) !important; }
@media (max-width: 575.98px) {
    .menu-customer-body #main-content { padding: .5rem; }
    .menu-customer-body .menu-public-wrapper { padding: 1rem .25rem 4rem; }
    .menu-customer-body .checkout-progress .step { flex-direction: column; font-size: .75rem; padding: .5rem .25rem; }
    .menu-customer-body .menu-card-action-row { justify-content: flex-start; }
}
