/* PhotoBridge v794 — gallery/delete/loading/header/print/status/device-guide refinements. */

/* 1) Gallery list: the last card must never disappear behind the mobile bottom navigation. */
@media(max-width:820px){
  .photographerMain .clientGalleryWorkspace{
    padding-bottom:calc(128px + env(safe-area-inset-bottom))!important;
  }
  .photographerMain .clientGalleryCards{
    padding-bottom:18px!important;
  }
  .photographerMain .clientGalleryProductFooter{
    margin-bottom:18px!important;
  }
  .photographerMain .clientGalleryCard:last-child .clientGalleryCardActions{
    margin-bottom:8px!important;
  }
}

/* 2) Polished RTL delete modal. */
.pb794ModalLayer{
  position:fixed!important;inset:0!important;z-index:2147483646!important;display:grid!important;place-items:end center!important;
  padding:12px!important;background:rgba(15,23,42,.58)!important;backdrop-filter:blur(4px)!important;direction:rtl!important;
  font-family:Vazirmatn,Tahoma,Arial,sans-serif!important;opacity:0!important;transition:opacity .18s ease!important
}
.pb794ModalLayer.open{opacity:1!important}
.pb794ModalCard{
  width:min(520px,100%)!important;max-height:min(88dvh,780px)!important;overflow:hidden!important;display:flex!important;flex-direction:column!important;
  border:1px solid rgba(255,255,255,.72)!important;border-radius:22px!important;background:#fff!important;color:#101828!important;
  box-shadow:0 30px 90px rgba(15,23,42,.34)!important;transform:translateY(20px)!important;opacity:.6!important;
  transition:transform .22s cubic-bezier(.22,.8,.24,1),opacity .18s ease!important;text-align:right!important
}
.pb794ModalLayer.open .pb794ModalCard{transform:translateY(0)!important;opacity:1!important}
.pb794ModalHead{display:flex!important;align-items:flex-start!important;justify-content:space-between!important;gap:12px!important;padding:15px 16px 12px!important;border-bottom:1px solid #eaecf0!important;text-align:right!important}
.pb794ModalHead>div{display:grid!important;gap:3px!important;min-width:0!important;text-align:right!important}.pb794ModalHead b{font-size:15px!important;font-weight:950!important;color:#101828!important}.pb794ModalHead small{font-size:10px!important;color:#667085!important;line-height:1.65!important;overflow:hidden!important;text-overflow:ellipsis!important;white-space:nowrap!important}
.pb794ModalClose{flex:0 0 34px!important;width:34px!important;height:34px!important;border:0!important;border-radius:10px!important;background:#f2f4f7!important;color:#344054!important;font-size:21px!important;line-height:1!important;cursor:pointer!important}
.pb794ModalBody{min-height:0!important;overflow:auto!important;padding:14px 16px!important;-webkit-overflow-scrolling:touch!important;text-align:right!important}.pb794ModalBody *{text-align:right!important}
.pb794ModalActions{display:grid!important;grid-template-columns:1fr 1.35fr!important;gap:8px!important;padding:10px 16px max(12px,env(safe-area-inset-bottom))!important;border-top:1px solid #eaecf0!important;background:#fff!important}
.pb794ModalActions button{min-height:44px!important;border-radius:11px!important;border:1px solid #d0d5dd!important;background:#fff!important;color:#344054!important;font:950 10.5px Vazirmatn,Tahoma,Arial,sans-serif!important;cursor:pointer!important;text-align:center!important}.pb794ModalActions button.primary{background:#315efb!important;border-color:#315efb!important;color:#fff!important}.pb794ModalActions button.danger{background:#d92d20!important;border-color:#d92d20!important;color:#fff!important}.pb794ModalActions button:disabled{opacity:.56!important;cursor:wait!important}
.pb794DeleteWarning{display:grid!important;grid-template-columns:36px minmax(0,1fr)!important;gap:10px!important;align-items:start!important;padding:12px!important;border:1px solid #fecdca!important;border-radius:14px!important;background:#fef3f2!important;color:#b42318!important}.pb794DeleteWarning>span{display:grid!important;place-items:center!important;width:36px!important;height:36px!important;border-radius:10px!important;background:#fee4e2!important;font-size:18px!important;font-weight:950!important;text-align:center!important}.pb794DeleteWarning>div{display:grid!important;gap:4px!important}.pb794DeleteWarning b{font-size:11.5px!important;font-weight:950!important}.pb794DeleteWarning p{margin:0!important;font-size:9.5px!important;line-height:1.9!important;color:#912018!important}
.pb794DeleteSummary{display:grid!important;grid-template-columns:1.4fr .7fr 1fr!important;gap:7px!important;margin-top:10px!important}.pb794DeleteSummary>span{display:grid!important;gap:3px!important;padding:9px 10px!important;border:1px solid #e4e7ec!important;border-radius:11px!important;background:#f8fafc!important;min-width:0!important}.pb794DeleteSummary small{font-size:8.5px!important;color:#667085!important}.pb794DeleteSummary b{font-size:10px!important;font-weight:950!important;overflow:hidden!important;text-overflow:ellipsis!important;white-space:nowrap!important}.pb794DeleteMessage{margin:10px 0 0!important;padding:10px 11px!important;border:1px solid #e4e7ec!important;border-radius:11px!important;background:#f8fafc!important;color:#475467!important;font-size:9.5px!important;line-height:1.8!important}.pb794DeleteMessage.busy{border-color:#c7d7fe!important;background:#f5f8ff!important;color:#244ea2!important}.pb794DeleteMessage.success{border-color:#abefc6!important;background:#ecfdf3!important;color:#067647!important}.pb794DeleteMessage.error{border-color:#fecdca!important;background:#fef3f2!important;color:#b42318!important}
.pb794GalleryRemoving{opacity:0!important;transform:scale(.985)!important;transition:opacity .18s ease,transform .18s ease!important}
@media(max-width:540px){.pb794DeleteSummary{grid-template-columns:1fr 1fr!important}.pb794DeleteSummary>span:first-child{grid-column:1/-1!important}.pb794ModalCard{border-radius:20px!important}}

/* 3) Customer gallery loading: skeleton first; controls appear only when each media item is actually ready. */
.publicClientGalleryPage.unlocked .clientGalleryPublicMedia:not(.pb794MediaReady) .clientGalleryPhotoActionsUnder,
.publicClientGalleryPage.unlocked .clientGalleryPublicMedia:not(.pb794MediaReady) .clientGalleryLockedSelection,
.publicClientGalleryPage.unlocked .clientGalleryPublicMedia:not(.pb794MediaReady) .clientGalleryVideoCaption,
.publicClientGalleryPage.unlocked .clientGalleryPublicMedia:not(.pb794MediaReady) .clientGalleryPhotoNote,
.publicClientGalleryPage.unlocked .clientGalleryPublicMedia:not(.pb794MediaReady) .clientGalleryPhotoNoteButton{opacity:0!important;visibility:hidden!important;pointer-events:none!important}
.publicClientGalleryPage.unlocked .clientGalleryPublicMedia{
  transition:opacity .24s ease,transform .24s ease,border-color .2s ease,box-shadow .2s ease!important;
}
.publicClientGalleryPage.unlocked .clientGalleryPublicMedia.pb794MediaPending .clientGalleryPublicMediaView{position:relative!important;min-height:190px!important;background:#eef1f5!important;overflow:hidden!important}
.publicClientGalleryPage.unlocked .clientGalleryPublicMedia.pb794MediaPending .clientGalleryPublicMediaView::before{
  content:""!important;position:absolute!important;inset:0!important;z-index:3!important;background:linear-gradient(100deg,#edf0f4 20%,#f8fafc 40%,#edf0f4 60%)!important;background-size:220% 100%!important;animation:pb794GalleryShimmer 1.1s linear infinite!important
}
.publicClientGalleryPage.unlocked .clientGalleryPublicMedia.pb794MediaPending .clientGalleryPublicMediaView img,
.publicClientGalleryPage.unlocked .clientGalleryPublicMedia.pb794MediaPending .clientGalleryPublicMediaView video{opacity:0!important}
.publicClientGalleryPage.unlocked .clientGalleryPublicMedia.pb794MediaPending .clientGalleryPhotoActionsUnder,
.publicClientGalleryPage.unlocked .clientGalleryPublicMedia.pb794MediaPending .clientGalleryLockedSelection,
.publicClientGalleryPage.unlocked .clientGalleryPublicMedia.pb794MediaPending .clientGalleryVideoCaption,
.publicClientGalleryPage.unlocked .clientGalleryPublicMedia.pb794MediaPending .clientGalleryPhotoNote,
.publicClientGalleryPage.unlocked .clientGalleryPublicMedia.pb794MediaPending .clientGalleryPhotoNoteButton{opacity:0!important;visibility:hidden!important;pointer-events:none!important}
.publicClientGalleryPage.unlocked .clientGalleryPublicMedia.pb794MediaReady .clientGalleryPublicMediaView img,
.publicClientGalleryPage.unlocked .clientGalleryPublicMedia.pb794MediaReady .clientGalleryPublicMediaView video{animation:pb794MediaFade .3s ease both!important}
.publicClientGalleryPage.unlocked .clientGalleryPublicMedia.pb794MediaReady .clientGalleryPhotoActionsUnder,
.publicClientGalleryPage.unlocked .clientGalleryPublicMedia.pb794MediaReady .clientGalleryLockedSelection,
.publicClientGalleryPage.unlocked .clientGalleryPublicMedia.pb794MediaReady .clientGalleryVideoCaption{animation:pb794ControlsFade .24s ease .06s both!important}
@keyframes pb794GalleryShimmer{from{background-position:200% 0}to{background-position:-20% 0}}
@keyframes pb794MediaFade{from{opacity:.2;transform:scale(1.006)}to{opacity:1;transform:none}}
@keyframes pb794ControlsFade{from{opacity:0;transform:translateY(4px)}to{opacity:1;transform:none}}

/* 4) Customer gallery header: display controls physically left, identity/logo physically right, compact vertical rhythm. */
.publicClientGalleryPage.unlocked .clientGalleryPublicHeader{
  direction:ltr!important;display:flex!important;align-items:center!important;justify-content:space-between!important;gap:10px!important;padding:8px 10px!important;min-height:70px!important;height:auto!important
}
.publicClientGalleryPage.unlocked .clientGalleryPublicHeader>div:first-child{
  direction:rtl!important;order:2!important;display:flex!important;align-items:center!important;justify-content:flex-start!important;gap:8px!important;min-width:0!important;flex:1 1 auto!important;text-align:right!important
}
.publicClientGalleryPage.unlocked .clientGalleryPublicHeader>div:first-child>div{display:grid!important;align-content:center!important;gap:1px!important;min-width:0!important;padding:0!important;text-align:right!important}
.publicClientGalleryPage.unlocked .clientGalleryPublicHeader>div:first-child span,
.publicClientGalleryPage.unlocked .clientGalleryPublicHeader>div:first-child h1,
.publicClientGalleryPage.unlocked .clientGalleryPublicHeader>div:first-child p{margin:0!important;padding:0!important;line-height:1.28!important;text-align:right!important}
.publicClientGalleryPage.unlocked .clientGalleryPublicHeader>div:first-child span{font-size:10px!important;font-weight:850!important;color:#475467!important}
.publicClientGalleryPage.unlocked .clientGalleryPublicHeader>div:first-child h1{font-size:17px!important;font-weight:950!important;color:#101828!important}
.publicClientGalleryPage.unlocked .clientGalleryPublicHeader>div:first-child p{font-size:9px!important;color:#667085!important}
.publicClientGalleryPage.unlocked .clientGalleryPublicHeaderRight{
  direction:rtl!important;order:1!important;flex:0 0 auto!important;margin:0!important;display:flex!important;align-items:center!important;justify-content:flex-start!important;gap:6px!important;align-self:center!important
}
@media(max-width:760px){
  .publicClientGalleryPage.unlocked .clientGalleryPublicHeader{min-height:68px!important;padding:7px 8px!important;gap:6px!important}
  .publicClientGalleryPage.unlocked .clientGalleryPublicHeader>div:first-child{gap:6px!important;padding-left:2px!important}
  .publicClientGalleryPage.unlocked .clientGalleryPublicHeader>div:first-child>div{gap:0!important}
  .publicClientGalleryPage.unlocked .clientGalleryPublicHeader>div:first-child span{font-size:8px!important}
  .publicClientGalleryPage.unlocked .clientGalleryPublicHeader>div:first-child h1{font-size:13px!important;max-width:40vw!important;white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important}
  .publicClientGalleryPage.unlocked .clientGalleryPublicHeader>div:first-child p{font-size:7.5px!important;margin-top:1px!important}
  .publicClientGalleryPage.unlocked .clientGalleryPublicHeaderRight{gap:4px!important;max-width:48vw!important;flex-wrap:nowrap!important}
  .publicClientGalleryPage.unlocked .clientGalleryPublicHeaderFacts{display:none!important}
}

/* 5) Print header collision: Back / Archive / Invoice are one non-overlapping left cluster. */
@media(max-width:820px){
  .photographerMain.photographerPrintWorkspace .photographerPrintModeHeader{position:relative!important}
  .photographerMain.photographerPrintWorkspace .photographerPrintModeHeader .photographerPrintModeUtilityCluster{
    position:absolute!important;left:8px!important;right:auto!important;top:8px!important;bottom:auto!important;transform:none!important;
    display:flex!important;align-items:center!important;justify-content:flex-start!important;gap:5px!important;width:auto!important;max-width:none!important;z-index:180!important
  }
  .photographerMain.photographerPrintWorkspace .photographerPrintModeHeader .photographerPrintModeUtilityCluster>.photographerPrintModeBack,
  .photographerMain.photographerPrintWorkspace .photographerPrintModeHeader .photographerPrintModeUtilityCluster>.photographerPrintCommonAction{
    position:static!important;inset:auto!important;transform:none!important;float:none!important;margin:0!important;flex:0 0 31px!important;width:31px!important;min-width:31px!important;max-width:31px!important;height:31px!important;min-height:31px!important;padding:0!important;display:inline-flex!important;align-items:center!important;justify-content:center!important
  }
  .photographerMain.photographerPrintWorkspace .photographerPrintModeHeader .photographerPrintModeUtilityCluster>.photographerPrintCommonAction.finance{
    visibility:visible!important;opacity:1!important;pointer-events:auto!important
  }
  .photographerMain.photographerPrintWorkspace .photographerPrintModeHeader .photographerBackDepth{display:none!important}
  .photographerMain.photographerPrintWorkspace .photographerPrintModeNav .photographerInstagramDesignEntry,
  .photographerMain.photographerPrintWorkspace .photographerPrintModeHeader .photographerInstagramDesignEntry{display:none!important;visibility:hidden!important;pointer-events:none!important}
}

.pb794HideInstagramInPrint{display:none!important;visibility:hidden!important;pointer-events:none!important}

/* 6) Photo and album status bars: exact same geometry; only the label/count content changes. */
.photographerMain.photographerPrintWorkspace .photographerContextStatuses,
.photographerMain.photographerPrintWorkspace .albumHeaderStatuses{
  display:grid!important;grid-template-columns:repeat(4,minmax(0,1fr))!important;gap:6px!important;width:100%!important;min-width:0!important;max-width:none!important;margin:0!important;padding:0!important;align-items:stretch!important
}
.photographerMain.photographerPrintWorkspace .photographerContextStatuses>button,
.photographerMain.photographerPrintWorkspace .albumHeaderStatuses>button{
  box-sizing:border-box!important;width:100%!important;min-width:0!important;height:38px!important;min-height:38px!important;max-height:38px!important;margin:0!important;padding:0 7px!important;border-radius:10px!important;
  display:flex!important;align-items:center!important;justify-content:center!important;gap:5px!important;white-space:nowrap!important;font-size:11.2px!important;font-weight:900!important;line-height:1!important
}
.photographerMain.photographerPrintWorkspace .photographerContextStatuses>button b,
.photographerMain.photographerPrintWorkspace .albumHeaderStatuses>button b{font-size:10.1px!important;font-weight:950!important;line-height:1!important}
.photographerMain.photographerPrintWorkspace .photographerContextStatusesMobile,
.photographerMain.photographerPrintWorkspace .photographerAlbumHeaderStatusMobile,
.photographerMain.photographerPrintWorkspace .photographerContextStatusesDesktop,
.photographerMain.photographerPrintWorkspace .photographerAlbumHeaderStatusDesktop{min-height:38px!important;height:38px!important;align-items:stretch!important}
.photographerMain.photographerPrintWorkspace .ordersWorkspace .customerOrderGrid{min-height:150px!important;align-content:start!important}
.photographerMain.photographerPrintWorkspace .ordersWorkspace .customerOrderGrid>.card:only-child{min-height:128px!important;display:grid!important;place-items:center!important;margin:0!important}
@media(max-width:820px){
  .photographerMain.photographerPrintWorkspace .photographerContextStatuses,
  .photographerMain.photographerPrintWorkspace .albumHeaderStatuses{gap:5px!important}
  .photographerMain.photographerPrintWorkspace .photographerContextStatuses>button,
  .photographerMain.photographerPrintWorkspace .albumHeaderStatuses>button{height:37px!important;min-height:37px!important;max-height:37px!important;padding:0 4px!important;font-size:10.2px!important;border-radius:9px!important}
  .photographerMain.photographerPrintWorkspace .photographerContextStatuses>button b,
  .photographerMain.photographerPrintWorkspace .albumHeaderStatuses>button b{font-size:9.4px!important}
  .photographerMain.photographerPrintWorkspace .photographerContextStatusesMobile,
  .photographerMain.photographerPrintWorkspace .photographerAlbumHeaderStatusMobile{min-height:37px!important;height:37px!important;margin:0!important;padding:0!important}
  .photographerMain.photographerPrintWorkspace .ordersWorkspace .customerOrderGrid{min-height:132px!important}
  .photographerMain.photographerPrintWorkspace .ordersWorkspace .customerOrderGrid>.card:only-child{min-height:112px!important}
}

/* 7) Gallery guide: one button, device is auto-detected and the matching video opens immediately. */
.pb794GalleryGuideButton{max-width:210px!important}
.pb794GuideCard .pb794ModalActions{display:none}
.pb794GuideLoading{min-height:180px!important;display:grid!important;place-items:center!important;align-content:center!important;gap:12px!important;text-align:center!important}.pb794GuideLoading>span{width:34px!important;height:34px!important;border:3px solid #dbe4ff!important;border-top-color:#315efb!important;border-radius:50%!important;animation:pb794Spin .8s linear infinite!important}.pb794GuideLoading>b{font-size:10.5px!important;color:#475467!important;text-align:center!important}
.pb794GuideVideoWrap{display:grid!important;gap:10px!important}.pb794GuideVideoWrap video{display:block!important;width:100%!important;max-height:66dvh!important;border-radius:14px!important;background:#0b1020!important;object-fit:contain!important}.pb794GuideVideoMeta{display:grid!important;gap:4px!important}.pb794GuideVideoMeta b{font-size:12px!important;font-weight:950!important}.pb794GuideVideoMeta small{font-size:9px!important;color:#667085!important;line-height:1.8!important}
.pb794GuideMissing{display:grid!important;grid-template-columns:42px minmax(0,1fr)!important;gap:11px!important;align-items:start!important;padding:14px!important;border:1px solid #dbe4ff!important;border-radius:14px!important;background:#f7f9ff!important}.pb794GuideMissing>span{display:grid!important;place-items:center!important;width:42px!important;height:42px!important;border-radius:12px!important;background:#315efb!important;color:#fff!important;font-size:14px!important;text-align:center!important}.pb794GuideMissing>div{display:grid!important;gap:5px!important}.pb794GuideMissing b{font-size:11px!important;font-weight:950!important}.pb794GuideMissing p{margin:0!important;font-size:9.5px!important;line-height:1.85!important;color:#667085!important}
@keyframes pb794Spin{to{transform:rotate(360deg)}}
@media(max-width:560px){.pb794GalleryGuideButton{width:100%!important;max-width:none!important}.pb794GuideVideoWrap video{max-height:61dvh!important}}

@media(prefers-reduced-motion:reduce){
  .pb794ModalLayer,.pb794ModalCard,.pb794GalleryRemoving,.publicClientGalleryPage.unlocked .clientGalleryPublicMedia,
  .publicClientGalleryPage.unlocked .clientGalleryPublicMediaView::before,.pb794GuideLoading>span{transition:none!important;animation:none!important}
}
