/**
 * 2026 fancy|studio
 *
 * @author    fancy|studio <support@fancystudio.digital>
 * @copyright 2026 fancy|studio
 * @license   Licensed under the license of the plugin that ships this file — see its LICENSE file.
 */
/*! qog-mobile core 1.0.3 — canonical source: director hub shared/mobile. Do not edit in a plugin. */

/* ── The order screen (orderScreen, spec §2.3) ────────────────────────────────────────────────
   Over the whole display: the bar, the grid (its rows the only vertical scroll), the totals. The page
   underneath does not move (html/body overflow hidden in script). A theme's header, drawers and
   cookie bars sit under it: --qog-m-z raises it further when a theme stacks higher. */
.qog-mobile-order {
    position: fixed !important;
    inset: 0;
    z-index: var(--qog-m-z, 9998);
    display: flex !important;
    flex-direction: column;
    width: auto !important;
    max-width: none !important;
    height: auto !important;
    margin: 0 !important;
    padding: 0 !important;
    background: var(--qog-m-bg, #fff);
    overflow: hidden;
}
.qog-mobile-order > *,
.qog-mobile-order .qog-m-box > * {
    flex: none;
}
/* !important where a platform styles these by id (#myGrid { min-height: 400px }) or turns its bar into a
   column on a small screen: the screen's layout wins over both (1.0.1) */
.qog-mobile-order .qog-m-box {
    flex: 1 1 0 !important;
    min-height: 0 !important;
    min-width: 0;
    height: auto !important;
    margin: 0 !important;
    display: flex !important;
    flex-direction: column !important;
}
.qog-mobile-order .qog-m-grid {
    flex: 1 1 0 !important;
    min-height: 0 !important;
    height: auto !important;
}
.qog-mobile-order .qog-m-footer {
    flex: none;
    position: static !important;
    padding-bottom: calc(0.5rem + env(safe-area-inset-bottom, 0px));
}
/* The order view (add-line core, .qog-order-mode) grows with its rows: there the middle scrolls,
   and its totals stay at the screen's bottom, not under a short order */
.qog-mobile-order.qog-order-mode .qog-m-box {
    overflow-y: auto;
}
.qog-mobile-order.qog-order-mode .qog-m-grid {
    flex: none !important;
}
.qog-mobile-order.qog-order-mode .qog-m-footer {
    margin-top: auto;
}
/* Folded into the menu while the screen is up (orderScreen hide) */
.qog-mobile-order .qog-m-hidden {
    display: none !important;
}

/* ── The bar ────────────────────────────────────────────────────────────────────────────── */
.qog-mobile-order .qog-m-bar {
    position: relative;
    z-index: 20;
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    align-items: center !important;
    gap: 0.5rem;
    margin: 0 !important;
    /* In line with the grid's names and the footer's totals: the grid's 1px border and its cells' 7px */
    padding: calc(0.375rem + env(safe-area-inset-top, 0px)) 8px 0.375rem;
    background: var(--qog-m-bg, #fff);
    border-bottom: 1px solid #e0e0e0;
}
.qog-mobile-order .qog-m-bar::before,
.qog-mobile-order .qog-m-bar::after {
    /* A theme's clearfix is a flex item too: it took one more gap at the end */
    display: none !important;
}
.qog-mobile-order .qog-m-bar > * {
    flex: none;
}
.qog-mobile-order .qog-m-bar > .qog-m-grow {
    flex: 1 1 0;
    width: auto !important;
    min-width: 0;
    max-width: none !important;
    margin: 0 !important;
}
.qog-mobile-order .qog-m-back {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 44px;
    margin-left: -8px;
    color: #333;
    font-size: 28px;
    line-height: 1;
    text-decoration: none;
}
/* Own colours and size: Tailwind's preflight and themes reset buttons */
.qog-mobile-order .qog-m-funnel {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 1px solid #c8cdd2;
    border-radius: var(--qog-border-radius, 4px);
    background: #fff;
    color: #333;
    line-height: 1;
    cursor: pointer;
}
.qog-mobile-order.qog-m-filters-open .qog-m-funnel {
    background: #333;
    border-color: #333;
    color: #fff;
}
.qog-m-badge {
    position: absolute;
    top: -6px;
    right: -6px;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    border-radius: 9px;
    background: var(--qog-primary, #2563eb);
    color: #fff;
    font-size: 11px;
    font-weight: 600;
    line-height: 18px;
    text-align: center;
    pointer-events: none;
}
.qog-m-badge[hidden] {
    display: none !important;
}
/* The funnel's panel: under the bar, from edge to edge of the screen, white, over the grid */
.qog-mobile-order .qog-m-panel {
    display: none;
}
.qog-mobile-order.qog-m-filters-open .qog-m-panel {
    display: block;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 30;
    max-height: calc(100svh - 56px - env(safe-area-inset-top, 0px));
    overflow-y: auto;
    padding: 0.5rem 1rem 0.75rem;
    background: var(--qog-m-bg, #fff);
    border-bottom: 1px solid #e0e0e0;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.12);
}
.qog-mobile-order .qog-m-panel > * {
    width: 100% !important;
    max-width: none !important;
    margin-bottom: 0.5rem;
}
/* The menu marked while only the ordered items are shown; on/off items checked */
.qog-mobile-order.qog-m-ordered-only .qog-m-bar [aria-haspopup],
.qog-mobile-order .qog-m-on {
    color: var(--qog-primary, #2563eb);
}
.qog-mobile-order .qog-m-item[aria-checked="true"]::after,
.qog-mobile-order .qog-m-on::after {
    content: "\2713";
    margin-left: 0.5rem;
}

/* ── A grid laid out for a phone (markCompact, spec §2.2) ──────────────────────────────── */
.qog-compact .ag-cell,
.qog-compact .ag-header-cell {
    padding-left: 6px;
    padding-right: 6px;
}
/* The columns under the pins scroll: a shadow on their edge says so */
.qog-compact .ag-pinned-right-cols-container,
.qog-compact .ag-pinned-right-header {
    box-shadow: -6px 0 6px -6px rgba(0, 0, 0, 0.35);
}
/* Below 16px iOS Safari zooms the page into a field on focus */
@media (pointer: coarse) {
    .qog-compact input:not([type="checkbox"]):not([type="radio"]):not([type="range"]),
    .qog-mobile-order input:not([type="checkbox"]):not([type="radio"]):not([type="range"]),
    .qog-mobile-order select,
    .qog-mobile-order textarea {
        font-size: 16px !important;
    }
}

/* ── Overlay scrollbars that are not Apple's (Android Chrome) ───────────────────────────────────
   With overlay scrollbars AG Grid reserves no room for its own scrollbar (.ag-scrollbar-invisible) and
   lays it over the cells. On Apple systems it fades it out (.ag-apple-scrollbar); elsewhere the theme
   paints the strip in the grid's background and lets it take taps: the last 16px of every row were a
   white band over the right-pinned cart buttons, cut and partly untappable (Android 14 emulator,
   1.11.2026). The rows scroll natively there, so the strip only has to stay out of the way. Not a
   media query: the emulator, driven by a mouse, reports hover and a fine pointer and still had it. */
.ag-scrollbar-invisible:not(.ag-apple-scrollbar) .ag-body-vertical-scroll-viewport,
.ag-scrollbar-invisible:not(.ag-apple-scrollbar) .ag-body-horizontal-scroll-viewport,
.ag-scrollbar-invisible:not(.ag-apple-scrollbar) [class*="-scroll-start-spacer"],
.ag-scrollbar-invisible:not(.ag-apple-scrollbar) [class*="-scroll-end-spacer"] {
    background: transparent !important;
    pointer-events: none !important;
}
