/* PhotoBridge v0.17.678 — clean mobile print shell.
   Print mode no longer participates in the legacy pbFixedRoleHeader stack.
   One flex shell, one content scroller, native lab row, full-width primary tabs,
   and a separate guide row. */
@media (max-width:820px){
  html,body{min-height:100%;}

  /* Entire print workspace: header/context stay put, only content scrolls. */
  .photographerMain.photographerPrintWorkspace{
    width:100%!important;
    max-width:none!important;
    height:100dvh!important;
    min-height:100dvh!important;
    max-height:100dvh!important;
    margin:0!important;
    padding:0!important;
    display:flex!important;
    flex-direction:column!important;
    align-items:stretch!important;
    overflow:hidden!important;
    background:#f5f7fb!important;
    box-sizing:border-box!important;
  }

  /* Admin preview/impersonation owns a 42px notice above the app. Keep the
     print shell inside the remaining viewport so body never gets a second scroller. */
  body.pbAdminImpersonating .photographerMain.photographerPrintWorkspace{
    height:calc(100dvh - 42px)!important;
    min-height:calc(100dvh - 42px)!important;
    max-height:calc(100dvh - 42px)!important;
  }

  /* Kill all legacy injected lab bars if stale cached JS ever creates one. */
  #pb673PhotographerLabIdentityBar,
  #pb674PhotographerLabIdentityBar,
  #pb676PhotographerLabIdentityBar{display:none!important;}

  /* Header is the first real row; never fixed and never offset by a fake spacer. */
  .photographerMain.photographerPrintWorkspace>.unifiedRoleHeader.photographerPrintModeHeader,
  body .photographerMain.photographerPrintWorkspace>.workspaceBar.photographerPrintModeHeader{
    position:relative!important;
    inset:auto!important;
    top:auto!important;
    left:auto!important;
    right:auto!important;
    transform:none!important;
    order:0!important;
    flex:0 0 auto!important;
    width:100%!important;
    min-width:0!important;
    max-width:none!important;
    height:auto!important;
    min-height:0!important;
    max-height:none!important;
    margin:0!important;
    padding:0!important;
    display:flex!important;
    flex-direction:column!important;
    align-items:stretch!important;
    gap:0!important;
    overflow:visible!important;
    border:0!important;
    border-radius:0!important;
    border-bottom:1px solid #e2e8f0!important;
    background:#fff!important;
    box-shadow:none!important;
    backdrop-filter:none!important;
    -webkit-backdrop-filter:none!important;
    z-index:240!important;
    box-sizing:border-box!important;
  }

  /* Actual photographer header row. */
  .photographerPrintWorkspace .photographerPrintModeHeader>.photographerHeaderIdentity{
    order:0!important;
    position:relative!important;
    inset:auto!important;
    transform:none!important;
    width:100%!important;
    min-width:0!important;
    min-height:72px!important;
    height:auto!important;
    margin:0!important;
    padding:8px 50px 8px 10px!important;
    display:flex!important;
    align-items:center!important;
    justify-content:space-between!important;
    gap:8px!important;
    overflow:visible!important;
    background:#fff!important;
    box-sizing:border-box!important;
  }
  .photographerPrintWorkspace .photographerPrintModeHeader .workspaceIdentityCopy{
    min-width:0!important;
    flex:1 1 auto!important;
    text-align:right!important;
  }
  .photographerPrintWorkspace .photographerPrintModeHeader .workspaceIdentityCopy>h1{
    max-width:100%!important;
    margin:0!important;
    overflow:hidden!important;
    text-overflow:ellipsis!important;
    white-space:nowrap!important;
    color:#172033!important;
    font-size:13px!important;
    font-weight:950!important;
    line-height:1.35!important;
  }
  .photographerPrintWorkspace .photographerPrintModeHeader .workspaceIdentityCopy>small{
    display:none!important;
  }
  .photographerPrintWorkspace .photographerPrintModeHeader .photographerIdentityDateOnly{
    display:block!important;
    margin-top:5px!important;
    color:#98a2b3!important;
    opacity:1!important;
    font-size:7.5px!important;
    line-height:1.3!important;
  }
  .photographerPrintWorkspace .photographerPrintModeHeader .photographerPrintModeUtilityCluster{
    position:relative!important;
    inset:auto!important;
    transform:none!important;
    flex:0 0 auto!important;
    min-width:0!important;
    margin:0!important;
    display:flex!important;
    align-items:center!important;
    justify-content:flex-start!important;
    gap:5px!important;
  }
  .photographerPrintWorkspace .photographerPrintModeHeader .photographerPrintModeBack,
  .photographerPrintWorkspace .photographerPrintModeHeader .photographerPrintCommonAction{
    position:relative!important;
    inset:auto!important;
    transform:none!important;
    height:36px!important;
    min-height:36px!important;
    margin:0!important;
    padding:0 8px!important;
    border-radius:9px!important;
    font-size:8px!important;
    white-space:nowrap!important;
  }
  .photographerPrintWorkspace .photographerPrintModeHeader .photographerPrintCommonAction em{
    font-size:8px!important;
  }

  /* Settings gear injected by v671 remains inside the physical header. */
  .photographerPrintWorkspace .photographerPrintModeHeader>.photographerPrintSettingsQuickAction{
    display:flex!important;
    position:absolute!important;
    top:15px!important;
    right:8px!important;
    left:auto!important;
    z-index:8!important;
    width:36px!important;
    height:40px!important;
    margin:0!important;
    padding:0!important;
    align-items:center!important;
    justify-content:center!important;
    transform:none!important;
  }
  .photographerPrintWorkspace .photographerPrintModeHeader>.photographerPrintSettingsQuickAction .mobileHeaderSettings{
    width:36px!important;
    min-width:36px!important;
    height:40px!important;
    min-height:40px!important;
    margin:0!important;
  }

  /* Native print nav: lab -> two full tabs -> two guides. */
  .photographerMain.photographerPrintWorkspace .photographerPrintModeHeader .photographerPrintModeNav,
  .photographerMain.photographerPrintWorkspace .photographerPrintModeHeader .photographerPrintModeNav.pb569WorkflowGuideNavReady,
  body .photographerMain.photographerPrintWorkspace .photographerPrintModeHeader .photographerHeaderNav.photographerPrintModeNav,
  body .photographerMain.photographerPrintWorkspace .photographerPrintModeHeader .photographerHeaderNav.photographerPrintModeNav.pb569WorkflowGuideNavReady{
    order:1!important;
    position:relative!important;
    inset:auto!important;
    transform:none!important;
    width:100%!important;
    min-width:0!important;
    max-width:none!important;
    height:auto!important;
    min-height:0!important;
    max-height:none!important;
    margin:0!important;
    padding:0 9px 8px!important;
    display:grid!important;
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
    grid-template-areas:"lab lab" "photo album" "gphoto galbum"!important;
    grid-template-rows:42px 56px 30px!important;
    align-items:stretch!important;
    justify-content:stretch!important;
    gap:7px 8px!important;
    overflow:visible!important;
    background:#f8fafc!important;
    border:0!important;
    border-radius:0!important;
    box-shadow:none!important;
    box-sizing:border-box!important;
    direction:rtl!important;
  }
  .photographerMain.photographerPrintWorkspace .photographerPrintModeHeader .photographerPrintModeNav:not(:has(.photographerPrintAlbumTab)){
    grid-template-areas:"lab lab" "photo photo" "gphoto gphoto"!important;
  }

  /* Lab identity bar is exactly under the photographer header. */
  .photographerPrintWorkspace .photographerPrintModeHeader .photographerPrintTopLab{
    grid-area:lab!important;
    order:0!important;
    position:relative!important;
    inset:auto!important;
    transform:none!important;
    width:calc(100% + 18px)!important;
    min-width:0!important;
    max-width:none!important;
    height:42px!important;
    min-height:42px!important;
    margin:0 -9px!important;
    padding:0 11px!important;
    display:flex!important;
    align-items:center!important;
    justify-content:center!important;
    gap:6px!important;
    overflow:visible!important;
    background:linear-gradient(100deg,#1d4ed8,#4338ca)!important;
    color:#fff!important;
    border:0!important;
    border-radius:0!important;
    box-shadow:none!important;
    box-sizing:border-box!important;
  }
  .photographerPrintWorkspace .photographerPrintTopLab::before{
    content:"لابراتوار"!important;
    flex:0 0 auto!important;
    color:#fff!important;
    opacity:.78!important;
    font-size:8px!important;
    font-weight:850!important;
  }
  .photographerPrintWorkspace .photographerPrintTopLabStatic{
    width:auto!important;
    max-width:76vw!important;
    padding:0!important;
    overflow:hidden!important;
    text-overflow:ellipsis!important;
    white-space:nowrap!important;
    color:#fff!important;
    font-size:12px!important;
    font-weight:950!important;
    line-height:1!important;
  }
  .photographerPrintWorkspace .photographerPrintTopLabSelect,
  .photographerPrintWorkspace .photographerPrintTopLabSelect .pbSelect,
  .photographerPrintWorkspace .photographerPrintTopLabSelect .pbSelectTrigger,
  .photographerPrintWorkspace .photographerPrintTopLabSelect .pbSelectButton{
    min-width:0!important;
    width:auto!important;
    max-width:78vw!important;
    color:#fff!important;
  }
  .photographerPrintWorkspace .photographerPrintTopLabSelect .pbSelectTrigger,
  .photographerPrintWorkspace .photographerPrintTopLabSelect .pbSelectButton{
    height:32px!important;
    min-height:32px!important;
    padding:0 8px!important;
    border:1px solid rgba(255,255,255,.28)!important;
    border-radius:8px!important;
    background:rgba(255,255,255,.10)!important;
    color:#fff!important;
    box-shadow:none!important;
    font-size:10px!important;
    font-weight:950!important;
  }
  .photographerPrintWorkspace .photographerPrintTopLabSelect *{color:#fff!important;}

  /* Full-width primary row. */
  .photographerPrintWorkspace .photographerPrintModeNav>.photographerPrintPhotoTab{
    grid-area:photo!important;
  }
  .photographerPrintWorkspace .photographerPrintModeNav>.photographerPrintAlbumTab{
    grid-area:album!important;
  }
  .photographerPrintWorkspace .photographerPrintModeNav>.rolePrimaryAction{
    position:relative!important;
    inset:auto!important;
    transform:none!important;
    width:100%!important;
    min-width:0!important;
    max-width:none!important;
    height:56px!important;
    min-height:56px!important;
    margin:0!important;
    padding:0 10px!important;
    display:flex!important;
    align-items:center!important;
    justify-content:center!important;
    border-radius:12px!important;
    font-size:12.5px!important;
    line-height:1.2!important;
    font-weight:950!important;
    white-space:nowrap!important;
    box-sizing:border-box!important;
  }

  /* Guides are back, but have their own row and never shrink the main buttons. */
  .photographerPrintWorkspace .photographerPrintModeNav>.pb569WorkflowGuideButton{
    position:relative!important;
    inset:auto!important;
    transform:none!important;
    display:flex!important;
    visibility:visible!important;
    opacity:1!important;
    width:100%!important;
    min-width:0!important;
    max-width:none!important;
    height:30px!important;
    min-height:30px!important;
    margin:0!important;
    padding:0 8px!important;
    flex-direction:row!important;
    align-items:center!important;
    justify-content:center!important;
    gap:5px!important;
    border:1px solid #cad7fa!important;
    border-radius:9px!important;
    background:#f2f6ff!important;
    color:#3157c8!important;
    box-shadow:none!important;
    font-size:8px!important;
    line-height:1!important;
    box-sizing:border-box!important;
  }
  .photographerPrintWorkspace .photographerPrintModeNav>.pb569WorkflowGuideButton.print{grid-area:gphoto!important;}
  .photographerPrintWorkspace .photographerPrintModeNav>.pb569WorkflowGuideButton.album{grid-area:galbum!important;}
  .photographerPrintWorkspace .pb569WorkflowGuideButton .pb569GuideArrow{
    width:auto!important;height:auto!important;margin:0!important;font-size:11px!important;line-height:1!important;
  }
  .photographerPrintWorkspace .pb569WorkflowGuideButton .pb569GuideLabel{
    font-size:8px!important;font-weight:950!important;line-height:1!important;
  }

  /* Context row: new-order action first, statuses beneath it. No repeated lab name. */
  .photographerMain.photographerPrintWorkspace>.photographerLabContextRail{
    order:2!important;
    position:relative!important;
    inset:auto!important;
    transform:none!important;
    flex:0 0 auto!important;
    width:100%!important;
    min-width:0!important;
    max-width:none!important;
    height:auto!important;
    min-height:0!important;
    margin:0!important;
    padding:8px 9px!important;
    overflow:visible!important;
    background:#f4f7fb!important;
    border:0!important;
    border-bottom:1px solid #e4e9f1!important;
    box-sizing:border-box!important;
  }
  .photographerPrintWorkspace>.photographerLabContextRail .photographerSelectedLabControl{
    display:none!important;
  }
  .photographerPrintWorkspace>.photographerLabContextRail:not(.photographerCreateContextMode)>.photographerLabContextMain{
    width:100%!important;
    min-width:0!important;
    display:grid!important;
    grid-template-columns:minmax(0,1fr)!important;
    grid-template-areas:"actions" "status"!important;
    row-gap:7px!important;
    overflow:visible!important;
  }
  .photographerPrintWorkspace>.photographerLabContextRail:not(.photographerCreateContextMode) .photographerLabContextActions{
    grid-area:actions!important;
    position:static!important;
    inset:auto!important;
    transform:none!important;
    width:100%!important;
    min-width:0!important;
    max-width:none!important;
    margin:0!important;
    padding:0!important;
    display:block!important;
    overflow:visible!important;
  }
  .photographerPrintWorkspace>.photographerLabContextRail:not(.photographerCreateContextMode) .photographerLabContextActions>.photographerContextAction,
  .photographerPrintWorkspace>.photographerLabContextRail:not(.photographerCreateContextMode) .photographerAlbumNewOrderSlot,
  .photographerPrintWorkspace>.photographerLabContextRail:not(.photographerCreateContextMode) .photographerAlbumNewOrderSlot>.photographerContextAction{
    position:relative!important;
    inset:auto!important;
    transform:none!important;
    display:flex!important;
    visibility:visible!important;
    opacity:1!important;
    width:100%!important;
    min-width:0!important;
    max-width:none!important;
    height:46px!important;
    min-height:46px!important;
    margin:0!important;
    padding:0 10px!important;
    align-items:center!important;
    justify-content:center!important;
    border-radius:11px!important;
    font-size:11.5px!important;
    font-weight:900!important;
    white-space:nowrap!important;
    box-sizing:border-box!important;
  }
  .photographerPrintWorkspace>.photographerLabContextRail:not(.photographerCreateContextMode) .photographerContextStatusesMobile,
  .photographerPrintWorkspace>.photographerLabContextRail:not(.photographerCreateContextMode) .photographerAlbumHeaderStatusMobile{
    grid-area:status!important;
    position:relative!important;
    inset:auto!important;
    transform:none!important;
    margin:0!important;
  }

  /* Single vertical scroller. */
  .photographerMain.photographerPrintWorkspace>.photographerRolePageScrollArea{
    order:3!important;
    position:relative!important;
    flex:1 1 auto!important;
    min-height:0!important;
    height:auto!important;
    width:100%!important;
    margin:0!important;
    padding:8px 8px calc(92px + env(safe-area-inset-bottom,0px))!important;
    overflow-y:auto!important;
    overflow-x:hidden!important;
    overscroll-behavior-y:contain!important;
    -webkit-overflow-scrolling:touch!important;
    scroll-padding-top:8px!important;
    box-sizing:border-box!important;
  }

  /* Bottom app dock is still fixed and outside document flow. */
  .photographerMain.photographerPrintWorkspace>.photographerBottomAppNav{
    z-index:500!important;
  }
}
