/* PhotoBridge v737 — mobile print composer redesign.
   Purpose: replace fragile header-owned controls with one unmistakable fixed action dock,
   keep the real React handlers as the source of truth, and show the price breakdown as a
   normal card at the end of the selected-photo records. */

#pb737-mobile-print-dock{display:none}

@media (max-width:820px){
  body.pb737-mobile-print-active{
    padding-bottom:calc(132px + env(safe-area-inset-bottom,0px))!important;
  }

  /* The composer is now a normal mobile page, not a header extension. */
  html body .photographerMain.simplePrintPilotWorkspaceMode>.photographerRolePageScrollArea>.simplePrintPilot.pb737MobilePrintRedesign{
    box-sizing:border-box!important;
    width:100%!important;
    max-width:100%!important;
    margin:0!important;
    padding:14px 10px 28px!important;
    overflow:visible!important;
    background:#f5f7fb!important;
  }

  html body .simplePrintPilot.pb737MobilePrintRedesign .simplePrintPilotDesktopGrid{
    display:flex!important;
    flex-direction:column!important;
    width:100%!important;
    min-width:0!important;
    gap:14px!important;
    align-items:stretch!important;
  }

  html body .simplePrintPilot.pb737MobilePrintRedesign .simplePrintPilotMain{
    order:1!important;
    width:100%!important;
    min-width:0!important;
    margin:0!important;
    padding:0!important;
    overflow:visible!important;
    display:grid!important;
    gap:10px!important;
  }

  /* Retire every old mobile action copy. v737 uses the independent dock below. */
  html body .simplePrintPilot.pb737MobilePrintRedesign .simplePrintPilotMobileInlineActions,
  html body .simplePrintPilot.pb737MobilePrintRedesign .simplePrintMobileBottomSend,
  html body .photographerMain.simplePrintPilotWorkspaceMode>#simple-print-pilot-mobile-header-slot.simplePrintPilotMobileHeaderHost{
    display:none!important;
    visibility:hidden!important;
    opacity:0!important;
    pointer-events:none!important;
    height:0!important;
    min-height:0!important;
    max-height:0!important;
    margin:0!important;
    padding:0!important;
    overflow:hidden!important;
  }

  /* Selected-size records: clean, obvious cards. */
  html body .simplePrintPilot.pb737MobilePrintRedesign .simplePrintPilotGroups{
    display:grid!important;
    grid-template-columns:minmax(0,1fr)!important;
    gap:10px!important;
    width:100%!important;
    padding:0!important;
    margin:0!important;
  }
  html body .simplePrintPilot.pb737MobilePrintRedesign .simplePrintSizeCard{
    width:100%!important;
    min-width:0!important;
    margin:0!important;
    border:1px solid #e1e7ef!important;
    border-radius:16px!important;
    background:#fff!important;
    box-shadow:0 4px 14px rgba(16,24,40,.055)!important;
    overflow:hidden!important;
  }
  html body .simplePrintPilot.pb737MobilePrintRedesign .simplePrintSizeCardHead{
    min-height:56px!important;
    padding:9px 10px!important;
    background:#fff!important;
  }
  html body .simplePrintPilot.pb737MobilePrintRedesign .simplePrintPhotoGrid{
    padding:8px!important;
    gap:8px!important;
  }
  html body .simplePrintPilot.pb737MobilePrintRedesign .simplePrintPhotoAddCard{
    min-height:118px!important;
    border:1.5px dashed #b8c7e6!important;
    border-radius:13px!important;
    background:#f7f9ff!important;
    color:#315efb!important;
  }

  /* PRICE BREAKDOWN — always part of page flow, immediately after the photo records. */
  html body .simplePrintPilot.pb737MobilePrintRedesign .simplePrintPilotQuote{
    order:2!important;
    display:grid!important;
    visibility:visible!important;
    opacity:1!important;
    position:static!important;
    inset:auto!important;
    width:100%!important;
    min-width:0!important;
    max-width:none!important;
    max-height:none!important;
    margin:0!important;
    padding:14px!important;
    gap:12px!important;
    overflow:visible!important;
    border:1px solid #d8e1ee!important;
    border-radius:18px!important;
    background:#fff!important;
    box-shadow:0 6px 18px rgba(16,24,40,.07)!important;
  }
  html body .simplePrintPilot.pb737MobilePrintRedesign .simplePrintPilotQuote>h3{
    display:flex!important;
    align-items:center!important;
    min-height:32px!important;
    margin:0!important;
    padding:0 0 9px!important;
    border-bottom:1px solid #edf0f5!important;
    color:#172554!important;
    font-size:16px!important;
    font-weight:950!important;
  }
  html body .simplePrintPilot.pb737MobilePrintRedesign .simplePrintPilotQuote>h3:before{
    content:'₮';
    display:grid;
    place-items:center;
    width:28px;
    height:28px;
    margin-left:8px;
    border-radius:9px;
    background:#eef3ff;
    color:#315efb;
    font-size:14px;
    font-weight:950;
  }
  html body .simplePrintPilot.pb737MobilePrintRedesign .simplePrintQuoteRows,
  html body .simplePrintPilot.pb737MobilePrintRedesign .simplePrintPilotQuote.scrollable>.simplePrintQuoteRows{
    display:grid!important;
    gap:7px!important;
    width:100%!important;
    min-height:0!important;
    max-height:none!important;
    overflow:visible!important;
  }
  html body .simplePrintPilot.pb737MobilePrintRedesign .simplePrintQuoteRows>button{
    width:100%!important;
    min-width:0!important;
    padding:10px 11px!important;
    border:1px solid #edf0f5!important;
    border-radius:12px!important;
    background:#fafbfc!important;
  }
  html body .simplePrintPilot.pb737MobilePrintRedesign .simplePrintQuoteTotal{
    margin-top:2px!important;
    padding:12px!important;
    border:1px solid #cbd8ff!important;
    border-radius:14px!important;
    background:#f4f7ff!important;
  }
  html body .simplePrintPilot.pb737MobilePrintRedesign .simplePrintQuoteTotal b{
    font-size:18px!important;
    color:#173b8f!important;
  }
  html body .simplePrintPilot.pb737MobilePrintRedesign .simplePrintPilotDelivery{
    grid-template-columns:1fr 1fr!important;
    gap:8px!important;
  }
  html body .simplePrintPilot.pb737MobilePrintRedesign .simplePrintDelegateBox{
    margin:0!important;
  }
  html body .simplePrintPilot.pb737MobilePrintRedesign .simplePrintPilotQuoteSend{
    display:flex!important;
    position:static!important;
    inset:auto!important;
    width:100%!important;
    margin:0!important;
    padding:2px 0 0!important;
    background:transparent!important;
    gap:8px!important;
  }
  html body .simplePrintPilot.pb737MobilePrintRedesign .simplePrintPilotQuoteSubmit{
    display:flex!important;
    align-items:center!important;
    justify-content:center!important;
    width:100%!important;
    min-height:50px!important;
    border-radius:13px!important;
    font-size:12px!important;
    font-weight:950!important;
    box-shadow:0 6px 16px rgba(49,94,251,.18)!important;
  }

  /* Empty state also looks intentional before the first file is selected. */
  html body .simplePrintPilot.pb737MobilePrintRedesign .simplePrintPilotEmpty{
    margin:0!important;
    padding:30px 18px!important;
    border:1.5px dashed #cbd5e1!important;
    border-radius:16px!important;
    background:#fff!important;
  }

  /* Independent React-safe mobile action dock, outside #root. */
  #pb737-mobile-print-dock{
    position:fixed!important;
    z-index:2147483000!important;
    right:10px!important;
    left:10px!important;
    bottom:calc(9px + env(safe-area-inset-bottom,0px))!important;
    display:grid!important;
    grid-template-columns:1fr!important;
    gap:8px!important;
    padding:10px!important;
    border:1px solid rgba(197,208,224,.95)!important;
    border-radius:18px!important;
    background:rgba(255,255,255,.97)!important;
    box-shadow:0 12px 34px rgba(15,23,42,.2)!important;
    backdrop-filter:blur(14px)!important;
    -webkit-backdrop-filter:blur(14px)!important;
    direction:rtl!important;
  }
  #pb737-mobile-print-dock .pb737DockSummary{
    display:flex!important;
    align-items:center!important;
    justify-content:space-between!important;
    gap:10px!important;
    min-width:0!important;
    padding:0 3px!important;
  }
  #pb737-mobile-print-dock .pb737DockSummary>div{
    display:grid!important;
    gap:1px!important;
    min-width:0!important;
  }
  #pb737-mobile-print-dock .pb737DockSummary span{
    color:#667085!important;
    font-size:9.5px!important;
    font-weight:800!important;
  }
  #pb737-mobile-print-dock .pb737DockSummary strong{
    color:#172554!important;
    font-size:13px!important;
    font-weight:950!important;
    white-space:nowrap!important;
    overflow:hidden!important;
    text-overflow:ellipsis!important;
  }
  #pb737-mobile-print-dock .pb737DockPriceJump{
    flex:none!important;
    min-height:30px!important;
    padding:0 9px!important;
    border:1px solid #dbe3ef!important;
    border-radius:9px!important;
    background:#f8fafc!important;
    color:#475467!important;
    font-size:9.5px!important;
    font-weight:900!important;
  }
  #pb737-mobile-print-dock .pb737DockActions{
    display:grid!important;
    grid-template-columns:minmax(0,1fr) minmax(0,1fr)!important;
    gap:8px!important;
  }
  #pb737-mobile-print-dock .pb737DockActions button{
    min-width:0!important;
    min-height:48px!important;
    height:48px!important;
    margin:0!important;
    padding:0 9px!important;
    border-radius:13px!important;
    font-size:11px!important;
    font-weight:950!important;
    line-height:1.25!important;
    white-space:normal!important;
  }
  #pb737-mobile-print-dock .pb737DockAdd{
    border:1px solid #315efb!important;
    background:#315efb!important;
    color:#fff!important;
    box-shadow:0 5px 14px rgba(49,94,251,.18)!important;
  }
  #pb737-mobile-print-dock .pb737DockSend{
    border:1px solid #172554!important;
    background:#172554!important;
    color:#fff!important;
    box-shadow:0 5px 14px rgba(23,37,84,.16)!important;
  }
  #pb737-mobile-print-dock .pb737DockActions button:disabled{
    border-color:#d9e0ea!important;
    background:#eef2f6!important;
    color:#98a2b3!important;
    box-shadow:none!important;
    opacity:1!important;
  }
}

@media (min-width:821px){
  #pb737-mobile-print-dock{display:none!important}
}


 /* v738: mobile print quote removed from main flow so created order cards stay visible. */
 @media (max-width:820px){
   html body .simplePrintPilot.pb737MobilePrintRedesign .simplePrintPilotQuote{
     display:none!important;
     visibility:hidden!important;
     height:0!important;
     min-height:0!important;
     margin:0!important;
     padding:0!important;
     overflow:hidden!important;
   }
 }

/* v738 mobile action replacement: keep action rail in header position instead of below old controls */
@media (max-width:820px){
  body.pb737-mobile-print-active #pb737-mobile-print-dock{
    position:sticky!important;
    top:0!important;
    z-index:2000!important;
    margin:-14px -10px 12px!important;
    width:calc(100% + 20px)!important;
    border-radius:0 0 14px 14px!important;
  }
  body.pb737-mobile-print-active .simplePrintPilotMobileHeaderHost,
  body.pb737-mobile-print-active .simplePrintPilotMobileHeader,
  body.pb737-mobile-print-active .simplePrintPilotTabs{
    display:none!important;
  }
}
