/* ==========================================================================
   REVIEW BAR — on the order review step, the order buttons stay fixed at the
   bottom of the screen (like Talabat's checkout bar) with the total beside them,
   so nobody mistakes the summary for a placed order. js/cart-page.js puts the
   class .step-review on <body> during that step. Remove this file's <link> to go
   back to buttons at the end of the summary.
   ========================================================================== */

.step-review .review-actions {
    position: fixed;
    inset-inline: 0;
    bottom: 0;
    z-index: 1100;
    margin: 0;
    display: grid;
    grid-template-columns: auto 1fr;
    grid-template-areas:
        "total total"
        "edit  main";
    align-items: center;
    gap: 8px 10px;
    padding: 10px max(16px, calc((100vw - 760px) / 2)) calc(12px + env(safe-area-inset-bottom, 0px));
    background: rgba(255, 255, 255, 0.97);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    border-top: 1px solid var(--color-border);
    box-shadow: 0 -8px 24px rgba(12, 35, 64, 0.14);
}

.step-review .review-actions__total {
    grid-area: total;
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    font-size: 15px;
    font-weight: 800;
    color: var(--color-primary);
}
.step-review .review-actions__total b { font-size: 19px; font-weight: 900; }

.step-review #edit-order-btn { grid-area: edit; padding-inline: 16px; white-space: nowrap; }
.step-review #whatsapp-order-btn,
.step-review #direct-order-btn { grid-area: main; width: 100%; justify-content: center; }

/* room at the end of the page so the bar never covers the last lines of the summary */
.step-review #review-section { padding-bottom: 150px; }

/* the floating cart and back-to-top buttons would sit on top of the bar: hide them on this step */
.step-review .cart-link,
.step-review .to-top { display: none; }

.step-review #whatsapp-order-btn,
.step-review #direct-order-btn { white-space: nowrap; }

/* phones: a slimmer "Edit" button and no little arrow, so the main button's text stays on one line */
@media (max-width: 480px) {
    .step-review .review-actions { gap: 6px 8px; padding-top: 8px; }
    .step-review #edit-order-btn { padding-inline: 12px; font-size: 14px; }
    .step-review #whatsapp-order-btn::after { display: none; }
    .step-review #whatsapp-order-btn,
    .step-review #direct-order-btn { padding-inline: 12px; }
}
@media (max-width: 360px) {
    .step-review #edit-order-btn { padding-inline: 10px; font-size: 13px; }
    .step-review #whatsapp-order-btn,
    .step-review #direct-order-btn { font-size: 15px; }
}

/* once a direct order went through (css/orders.css), the bar goes away and only the receipt shows */
.step-review .order-done .review-actions { display: none; }
