/* FluuexQR v318 — targeted stability/responsive hardening only. */

/* Orders reference must not hide Hotel & Folios. */
body.fqx-v145-restaurant-admin .fq-orders-ref-shell .nav-id-hotel{display:flex!important}

/* Keep the admin rail usable on shorter desktop screens instead of clipping items. */
@media(min-width:1101px){
  body.fqx-v145-restaurant-admin .dashboard-shell>.sidebar,
  body.fqx-v145-restaurant-admin .fq-orders-ref-shell .sidebar{height:100dvh!important;max-height:100dvh!important;overflow-y:auto!important;overflow-x:hidden!important;overscroll-behavior:contain;scrollbar-width:thin}
}

/* Menu editor: header/footer stay visible; only fields scroll. */
body.fqx-v145-restaurant-admin .fq-menu-ref-v249 .fq249-editor{min-height:0!important;height:min(760px,calc(100dvh - 78px))!important;max-height:calc(100dvh - 78px)!important}
body.fqx-v145-restaurant-admin .fq-menu-ref-v249 .fq249-editor>form{min-height:0!important;display:flex!important;flex-direction:column!important;overflow:hidden!important}
body.fqx-v145-restaurant-admin .fq-menu-ref-v249 .fq249-editor-scroll{min-height:0!important;flex:1 1 auto!important;overflow-y:auto!important;overflow-x:hidden!important;padding-bottom:18px!important}
body.fqx-v145-restaurant-admin .fq-menu-ref-v249 .fq249-editor-footer{position:sticky!important;bottom:0!important;flex:0 0 auto!important;z-index:20!important;background:#fff!important;box-shadow:0 -8px 20px rgba(15,23,42,.08)!important}
@media(max-height:820px) and (min-width:1101px){
  body.fqx-v145-restaurant-admin .fq-menu-ref-v249 .fq249-editor{position:fixed!important;right:12px!important;top:68px!important;width:min(370px,31vw)!important;height:calc(100dvh - 80px)!important;max-height:none!important;z-index:1200!important}
  body.fqx-v145-restaurant-admin .fq-menu-ref-v249 .fq249-workspace{grid-template-columns:minmax(0,1fr) min(370px,31vw)!important}
}
@media(max-width:1100px){body.fqx-v145-restaurant-admin .fq-menu-ref-v249 .fq249-editor{height:100dvh!important;max-height:100dvh!important}}

/* Three-dot menus: never hide behind table/cards. JS moves open menus to the viewport. */
body.fqx-v145-restaurant-admin :is(.fq-v247-row-menu-pop,.fq-v247-more-menu,.fq249-row-more>div,.fq250-more-pop,.fq253-row-menu,.fq254-more-menu,.fq259-pop,.fq260-pop){z-index:2147482000!important;max-width:min(260px,calc(100vw - 24px))!important}
body.fqx-v145-restaurant-admin [data-fqx318-floating-menu="1"]{position:fixed!important;margin:0!important;transform:none!important;max-height:min(420px,calc(100dvh - 24px))!important;overflow:auto!important;box-shadow:0 18px 48px rgba(15,23,42,.22)!important}
body.fqx-v145-restaurant-admin :is(.fq249-menu-card,.fq253-table-card,.fq254-table-card,.fq259-table-card,.fq260-table-card){overflow:visible!important}
@media(min-width:1101px){body.fqx-v145-restaurant-admin .fq256-table-card{overflow:visible!important}}
body.fqx-v145-restaurant-admin :is(.fq256-row-menu>div,.fq257-row-actions details>div){z-index:2147482000!important;max-width:min(260px,calc(100vw - 24px))!important}

/* Notification popover is viewport-owned, so parent overflow/animations cannot collapse it. */
body.fqx-v145-restaurant-admin .fqx308-notify-wrap{z-index:2147482500!important}
body.fqx-v145-restaurant-admin .fqx308-notify-panel,
.fq-rider-notify-row .fqx308-notify-panel{position:fixed!important;right:16px!important;top:72px!important;left:auto!important;width:min(390px,calc(100vw - 28px))!important;max-height:min(620px,calc(100dvh - 92px))!important;z-index:2147483000!important;overflow:hidden!important;transform:none!important}
body.fqx-v145-restaurant-admin .fqx308-notify-list,.fq-rider-notify-row .fqx308-notify-list{max-height:min(430px,calc(100dvh - 250px))!important;overflow:auto!important}
@media(max-width:720px){body.fqx-v145-restaurant-admin .fqx308-notify-panel,.fq-rider-notify-row .fqx308-notify-panel{left:12px!important;right:12px!important;top:68px!important;width:auto!important;max-height:calc(100dvh - 84px)!important}}

/* Room/Table QR cart: predictable mobile/desktop grid, no overflow/crash. */
body.menuqr-cart-open #menuqr-cart-wrap{width:min(860px,100%)!important;margin:0 auto!important;padding:clamp(12px,2.5vw,24px)!important;padding-bottom:calc(110px + env(safe-area-inset-bottom))!important;overflow-x:hidden!important;min-height:100dvh!important;box-sizing:border-box!important}
body.menuqr-cart-open #menuqr-cart-wrap .back-bar{position:sticky!important;top:0!important;z-index:25!important;background:#fff!important;padding:10px 0!important;display:flex!important;align-items:center!important;gap:12px!important}
body.menuqr-cart-open #menuqr-cart-wrap .cart-list{display:grid!important;gap:12px!important;min-width:0!important}
body.menuqr-cart-open #menuqr-cart-wrap .cart-item{display:grid!important;grid-template-columns:64px minmax(0,1fr) auto!important;grid-template-areas:"img name price" "img qty price" "options options options" "note note note"!important;gap:7px 12px!important;align-items:center!important;width:100%!important;min-width:0!important;padding:12px!important;border:1px solid #e8e8e8!important;border-radius:16px!important;background:#fff!important;box-sizing:border-box!important;overflow:hidden!important}
body.menuqr-cart-open #menuqr-cart-wrap .cart-item-img,body.menuqr-cart-open #menuqr-cart-wrap .cart-item-emoji{grid-area:img;width:64px!important;height:64px!important;min-width:64px!important;border-radius:12px!important;object-fit:cover!important;align-self:start!important}
body.menuqr-cart-open #menuqr-cart-wrap .cart-item-name{grid-area:name;min-width:0!important;font-weight:800!important;overflow-wrap:anywhere!important}
body.menuqr-cart-open #menuqr-cart-wrap .qty-ctrl{grid-area:qty;justify-self:start!important;display:inline-flex!important;align-items:center!important;gap:7px!important;min-width:0!important}
body.menuqr-cart-open #menuqr-cart-wrap .qty-btn{width:34px!important;height:34px!important;min-width:34px!important;border-radius:10px!important}
body.menuqr-cart-open #menuqr-cart-wrap .cart-item-price{grid-area:price;align-self:start!important;white-space:nowrap!important;font-weight:800!important}
body.menuqr-cart-open #menuqr-cart-wrap .fq240-cart-options{grid-area:options;min-width:0!important;display:grid!important;gap:9px!important}
body.menuqr-cart-open #menuqr-cart-wrap .fq240-item-note{grid-area:note;min-width:0!important}
body.menuqr-cart-open #menuqr-cart-wrap .fq240-item-note input,body.menuqr-cart-open #menuqr-cart-wrap .fq240-cart-options select{width:100%!important;max-width:100%!important;box-sizing:border-box!important}
body.menuqr-cart-open #menuqr-cart-wrap .cart-footer{position:sticky!important;bottom:0!important;z-index:30!important;background:rgba(255,255,255,.97)!important;backdrop-filter:blur(10px)!important;margin:16px -2px 0!important;padding:14px!important;border:1px solid #e8e8e8!important;border-radius:16px!important;box-shadow:0 -8px 30px rgba(15,23,42,.09)!important}
@media(max-width:560px){body.menuqr-cart-open #menuqr-cart-wrap .cart-item{grid-template-columns:54px minmax(0,1fr) auto!important;grid-template-areas:"img name price" "img qty qty" "options options options" "note note note"!important;padding:10px!important;gap:6px 9px!important}body.menuqr-cart-open #menuqr-cart-wrap .cart-item-img,body.menuqr-cart-open #menuqr-cart-wrap .cart-item-emoji{width:54px!important;height:54px!important;min-width:54px!important}body.menuqr-cart-open #menuqr-cart-wrap .cart-item-price{font-size:13px!important}}

/* General responsive containment for right-side drawers/cards from supplied live-error samples. */
body.fqx-v145-restaurant-admin :is(.page-body,.main-content,.fq-v248-online-page,.fq-v248-settings-page,.fq255-hotel,.fq253-bills-page,.fq-menu-ref-page-v249){min-width:0!important;max-width:100%!important}
body.fqx-v145-restaurant-admin :is(input,select,textarea,button){max-width:100%;box-sizing:border-box}
body.fqx-v145-restaurant-admin :is(.fq250-editor,.fq257-drawer,.fq259-drawer,.fq260-drawer,[role="dialog"]){max-height:calc(100dvh - 20px);overflow:auto}

/* Automatic-hours panel stays compact and simple. */
.fq-v318-hours{grid-template-columns:repeat(2,minmax(0,1fr))!important}.fq-v318-schedule-note{margin:9px 0 0!important;color:#687386!important}
@media(max-width:600px){.fq-v318-hours{grid-template-columns:1fr!important}}

/* Lightweight connectivity indicator; no false promise of live updates while fully offline. */
.fqx318-network-state{position:fixed;left:50%;top:12px;transform:translateX(-50%);z-index:2147483600;padding:7px 11px;border-radius:999px;background:#171717;color:#fff;font:700 11px/1.2 system-ui;box-shadow:0 8px 24px rgba(0,0,0,.18);pointer-events:none}
.fqx318-network-state.is-online{background:#136c3d}.fqx318-network-state[hidden]{display:none!important}

/* Lower paint/animation work on constrained devices without changing layout/workflow. */
@media(prefers-reduced-motion:reduce){body.fqx-v145-restaurant-admin *,#menuqr-customer-app *{scroll-behavior:auto!important;animation-duration:.001ms!important;animation-iteration-count:1!important;transition-duration:.001ms!important}}
