/* PhotoBridge v790 — final mobile finance header/scroll + customer gallery interaction fixes. */

/* ---------- Finance opened from Print ---------- */
@media(max-width:820px){
  html body #root .photographerMain[data-pb790-finance="1"]>.photographerPrintModeHeader{
    margin-bottom:118px!important;overflow:visible!important;z-index:1200!important
  }
  html body #root .photographerMain[data-pb790-finance="1"] .photographerPrintModeNav.pb790FinanceNav{
    position:absolute!important;top:100%!important;left:50%!important;right:auto!important;transform:translateX(-50%)!important;
    width:100vw!important;min-width:100vw!important;max-width:100vw!important;height:118px!important;min-height:118px!important;max-height:118px!important;
    display:block!important;margin:0!important;padding:0!important;overflow:visible!important;background:#f5f7fb!important;border-bottom:1px solid #dfe5ee!important;box-shadow:0 3px 10px rgba(15,23,42,.05)!important
  }
  html body #root .photographerMain[data-pb790-finance="1"] .photographerPrintModeNav.pb790FinanceNav>.photographerPrintPhotoTab,
  html body #root .photographerMain[data-pb790-finance="1"] .photographerPrintModeNav.pb790FinanceNav>.photographerPrintAlbumTab,
  html body #root .photographerMain[data-pb790-finance="1"] .photographerPrintModeNav.pb790FinanceNav>.photographerPrintTopLab,
  html body #root .photographerMain[data-pb790-finance="1"] .photographerPrintModeNav.pb790FinanceNav>.pb569WorkflowGuideButton,
  html body #root .photographerMain[data-pb790-finance="1"] #pb761-mode-actions{display:none!important}

  #pb790-finance-chrome{display:grid!important;grid-template-rows:48px 58px!important;gap:6px!important;width:100%!important;height:118px!important;padding:6px 10px 8px!important;box-sizing:border-box!important;direction:rtl!important;background:#f5f7fb!important}
  #pb790-finance-chrome .pb790FinanceTitle{display:flex!important;align-items:center!important;justify-content:center!important;border:1px solid #dde3ec!important;border-radius:12px!important;background:#fff!important;color:#101828!important;font-size:16px!important;font-weight:950!important;line-height:1.2!important;box-shadow:0 1px 4px rgba(15,23,42,.04)!important}
  #pb790-finance-chrome .pb790FinanceTabs{display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr))!important;gap:6px!important;min-width:0!important}
  #pb790-finance-chrome .pb790FinanceTabs button{min-width:0!important;width:100%!important;height:50px!important;padding:0 5px!important;border:1px solid #d7deea!important;border-radius:11px!important;background:#fff!important;color:#475467!important;font-size:11px!important;font-weight:900!important;white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important}
  #pb790-finance-chrome .pb790FinanceTabs button.active{background:#315efb!important;border-color:#315efb!important;color:#fff!important;box-shadow:0 4px 12px rgba(49,94,251,.18)!important}

  html body #root .photographerMain[data-pb790-finance="1"]>.photographerLabContextRail{height:0!important;min-height:0!important;max-height:0!important;margin:0!important;padding:0!important;border:0!important;overflow:hidden!important;visibility:hidden!important;pointer-events:none!important}
  html body #root .photographerMain[data-pb790-finance="1"]>.photographerRolePageScrollArea[data-pb790-finance="1"]{
    position:fixed!important;top:var(--pb790-finance-top,244px)!important;right:0!important;left:0!important;bottom:var(--pb790-finance-bottom,78px)!important;
    width:100%!important;height:auto!important;min-height:0!important;max-height:none!important;margin:0!important;padding:8px 8px 24px!important;box-sizing:border-box!important;
    overflow-y:auto!important;overflow-x:hidden!important;-webkit-overflow-scrolling:touch!important;overscroll-behavior-y:contain!important;touch-action:pan-y!important;scroll-behavior:auto!important;z-index:5!important;background:#f5f7fb!important
  }
  html body #root .photographerMain[data-pb790-finance="1"] .financeWorkspace[data-pb790-finance="1"]{height:auto!important;min-height:calc(100% + 2px)!important;max-height:none!important;margin:0!important;padding:0 0 calc(22px + env(safe-area-inset-bottom))!important;overflow:visible!important;touch-action:pan-y!important}
  html body #root .photographerMain[data-pb790-finance="1"] .financeWorkspace>.financeTopline,
  html body #root .photographerMain[data-pb790-finance="1"] .financeWorkspace>.financeNavDock{display:none!important}
  html body #root .photographerMain[data-pb790-finance="1"] .financeWorkspace .financeSummary{margin-top:0!important}
  html body #root .photographerMain[data-pb790-finance="1"] .financeWorkspace .tableCard,
  html body #root .photographerMain[data-pb790-finance="1"] .financeWorkspace .financeInvoiceList,
  html body #root .photographerMain[data-pb790-finance="1"] .financeWorkspace .financePaymentList,
  html body #root .photographerMain[data-pb790-finance="1"] .financeWorkspace .financeStatementWrap{max-height:none!important;overflow:visible!important}
}

/* ---------- Gallery manager / tariffs ---------- */
@media(max-width:820px){
  html body #root .photographerMain>.photographerRolePageScrollArea[data-pb790-gallery="1"]{min-height:0!important;height:auto!important;max-height:none!important;overflow-y:auto!important;overflow-x:hidden!important;-webkit-overflow-scrolling:touch!important;touch-action:pan-y!important;overscroll-behavior-y:contain!important}
  .globalModalLayer>.modal[data-pb790-tariff="1"]{height:calc(100dvh - 12px)!important;max-height:calc(100dvh - 12px)!important;width:calc(100vw - 12px)!important;overflow:hidden!important;padding:10px!important;display:flex!important;flex-direction:column!important}
  .globalModalLayer>.modal>.modalContent[data-pb790-tariff="1"]{flex:1 1 auto!important;min-height:0!important;overflow:hidden!important;display:flex!important;flex-direction:column!important}
  .clientGalleryTariffTableModal[data-pb790-tariff="1"],.clientGalleryTariffModal[data-pb790-tariff="1"]{flex:1 1 auto!important;min-height:0!important;max-height:none!important;overflow:hidden!important;display:flex!important;flex-direction:column!important}
  .clientGalleryTariffTableModal[data-pb790-tariff="1"] .clientGalleryTariffTableScroller,.clientGalleryTariffModal[data-pb790-tariff="1"] .clientGalleryTariffTableScroller{flex:1 1 auto!important;min-height:0!important;max-height:none!important;overflow-y:auto!important;overflow-x:auto!important;-webkit-overflow-scrolling:touch!important}
  .clientGalleryTariffTableModal[data-pb790-tariff="1"] .clientGalleryTariffTableFoot,.clientGalleryTariffModal[data-pb790-tariff="1"] .clientGalleryTariffTableFoot{position:sticky!important;bottom:0!important;flex:0 0 auto!important;z-index:30!important;margin-top:8px!important;padding:9px 0 max(9px,env(safe-area-inset-bottom))!important;background:#fff!important;border-top:1px solid #e4e7ec!important}
}

/* ---------- Customer gallery ---------- */
.publicClientGalleryPage.pb790CustomerGallery .clientGalleryMobileSingleViewHint{display:none!important}
.publicClientGalleryPage.pb790CustomerGallery .clientGalleryPublicMedia.pb790PhotoCard{position:relative!important;overflow:visible!important;display:flex!important;flex-direction:column!important;align-items:stretch!important}
.publicClientGalleryPage.pb790CustomerGallery .clientGalleryPublicMediaView{order:1!important;position:relative!important}
.publicClientGalleryPage.pb790CustomerGallery .clientGalleryPhotoInteraction.pb790PhotoActions{order:2!important;position:static!important;inset:auto!important;z-index:auto!important;display:block!important;width:100%!important;margin:5px 0 0!important;padding:0!important;background:transparent!important;box-shadow:none!important;pointer-events:auto!important;overflow:visible!important}
.publicClientGalleryPage.pb790CustomerGallery .clientGalleryPhotoNote{order:3!important}

/* Selection is a compact control ON the image. */
.publicClientGalleryPage.pb790CustomerGallery .clientGalleryBaseSelection.pb790SelectionOverlay{position:absolute!important;top:7px!important;right:7px!important;z-index:28!important;width:34px!important;height:34px!important;margin:0!important;padding:0!important;background:transparent!important;border:0!important;box-shadow:none!important;pointer-events:auto!important}
.publicClientGalleryPage.pb790CustomerGallery .clientGalleryBaseSelection.pb790SelectionOverlay>label{display:grid!important;place-items:center!important;width:34px!important;height:34px!important;min-width:34px!important;min-height:34px!important;margin:0!important;padding:0!important;border:1px solid rgba(15,23,42,.2)!important;border-radius:10px!important;background:rgba(255,255,255,.96)!important;box-shadow:0 4px 12px rgba(15,23,42,.18)!important;color:#344054!important;overflow:hidden!important}
.publicClientGalleryPage.pb790CustomerGallery .clientGalleryBaseSelection.pb790SelectionOverlay>label.picked{background:#315efb!important;border-color:#315efb!important;color:#fff!important}
.publicClientGalleryPage.pb790CustomerGallery .clientGalleryBaseSelection.pb790SelectionOverlay input{display:block!important;width:18px!important;height:18px!important;min-width:18px!important;min-height:18px!important;margin:0!important;accent-color:#315efb!important}
.publicClientGalleryPage.pb790CustomerGallery .clientGalleryBaseSelection.pb790SelectionOverlay>label.picked input{accent-color:#fff!important}
.publicClientGalleryPage.pb790CustomerGallery .clientGalleryBaseSelection.pb790SelectionOverlay span,.publicClientGalleryPage.pb790CustomerGallery .clientGalleryBaseSelection.pb790SelectionOverlay b{display:none!important}

/* Print order is the only under-image action and always stays one line. */
.publicClientGalleryPage.pb790CustomerGallery .pb790PrintOrderButton{display:flex!important;align-items:center!important;justify-content:center!important;width:100%!important;min-width:0!important;height:34px!important;min-height:34px!important;max-height:34px!important;margin:0!important;padding:0 clamp(4px,1.4vw,10px)!important;border:1px solid #315efb!important;border-radius:9px!important;background:#315efb!important;color:#fff!important;font-size:clamp(7px,2.25vw,10.5px)!important;font-weight:950!important;line-height:1!important;white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important;box-shadow:none!important}
.publicClientGalleryPage.pb790CustomerGallery.gallery-cols-1 .pb790PrintOrderButton,.publicClientGalleryPage.pb790CustomerGallery .clientGalleryPublicGrid.cols-1 .pb790PrintOrderButton{height:38px!important;min-height:38px!important;max-height:38px!important;font-size:10.5px!important}

/* The real React print controls never unfold below the image. They are shown only in the dedicated modal state. */
.publicClientGalleryPage.pb790CustomerGallery .clientGalleryOptionalOrdering{display:none!important;visibility:hidden!important;opacity:0!important;pointer-events:none!important}
.publicClientGalleryPage.pb790CustomerGallery .clientGalleryPublicMedia.pb790OrderOpen .clientGalleryOptionalOrdering{display:flex!important;visibility:visible!important;opacity:1!important;pointer-events:auto!important;position:fixed!important;z-index:2147483402!important;top:50%!important;left:50%!important;right:auto!important;bottom:auto!important;transform:translate(-50%,-50%)!important;width:min(440px,calc(100vw - 24px))!important;max-height:min(78dvh,650px)!important;overflow-y:auto!important;overflow-x:hidden!important;overscroll-behavior:contain!important;-webkit-overflow-scrolling:touch!important;flex-direction:column!important;gap:10px!important;margin:0!important;padding:50px 14px 16px!important;border:1px solid #e4e7ec!important;border-radius:18px!important;background:#fff!important;box-shadow:0 30px 90px rgba(15,23,42,.32)!important}
.publicClientGalleryPage.pb790CustomerGallery .clientGalleryPublicMedia.pb790OrderOpen .clientGalleryOptionalOrdering::before{content:"سفارش چاپ";position:absolute!important;top:15px!important;right:16px!important;font-size:16px!important;font-weight:950!important;color:#101828!important}
.pb790OrderBackdrop{position:fixed!important;inset:0!important;z-index:2147483400!important;border:0!important;background:rgba(15,23,42,.6)!important;padding:0!important;margin:0!important}
.pb790OrderClose{position:fixed!important;z-index:2147483405!important;top:calc(11dvh + 6px)!important;left:calc(50% - min(220px,calc(50vw - 12px)) + 10px)!important;width:32px!important;height:32px!important;padding:0!important;border:1px solid #e4e7ec!important;border-radius:9px!important;background:#f8fafc!important;color:#344054!important;font-size:22px!important;line-height:1!important}

/* Header layout selector stays on the LEFT; identity stays comfortably inside the header. */
.publicClientGalleryPage.pb790CustomerGallery .clientGalleryPublicHeader.pb790Header{direction:ltr!important;display:flex!important;align-items:center!important;justify-content:space-between!important;gap:10px!important;padding-top:9px!important;padding-bottom:9px!important}
.publicClientGalleryPage.pb790CustomerGallery .clientGalleryPublicHeader.pb790Header>div:first-child{direction:rtl!important;order:2!important;min-width:0!important;align-self:center!important;padding-block:2px!important}
.publicClientGalleryPage.pb790CustomerGallery .clientGalleryPublicHeaderRight{direction:rtl!important;order:1!important;margin:0!important;align-self:center!important;display:flex!important;align-items:center!important;gap:6px!important;flex-wrap:wrap!important;justify-content:flex-start!important}
.publicClientGalleryPage.pb790CustomerGallery .clientGalleryPublicHeader.pb790Header>div:first-child>div{display:grid!important;gap:2px!important;align-content:center!important;padding-block:2px!important}
.publicClientGalleryPage.pb790CustomerGallery .clientGalleryPublicHeader.pb790Header>div:first-child span,.publicClientGalleryPage.pb790CustomerGallery .clientGalleryPublicHeader.pb790Header>div:first-child h1,.publicClientGalleryPage.pb790CustomerGallery .clientGalleryPublicHeader.pb790Header>div:first-child p{margin:0!important;padding:0!important;line-height:1.35!important}
.pb790GalleryCart{height:36px!important;min-height:36px!important;border:1px solid #cbd5e1!important;border-radius:10px!important;background:#fff!important;color:#344054!important;display:inline-flex!important;align-items:center!important;gap:5px!important;padding:0 8px!important;font-size:9.5px!important;font-weight:900!important;white-space:nowrap!important}
.pb790GalleryCart i{min-width:19px;height:19px;border-radius:999px;background:#315efb;color:#fff;display:grid;place-items:center;font-style:normal;font-size:9px}

/* Cart */
.pb790CartLayer{position:fixed!important;inset:0!important;z-index:2147483500!important;background:rgba(15,23,42,.58)!important;display:grid!important;place-items:center!important;padding:12px!important;direction:rtl!important}
.pb790CartCard{width:min(520px,100%)!important;max-height:min(86dvh,720px)!important;background:#fff!important;border-radius:20px!important;box-shadow:0 30px 90px rgba(15,23,42,.32)!important;display:flex!important;flex-direction:column!important;overflow:hidden!important}
.pb790CartCard>header{height:auto!important;position:static!important;padding:14px 15px!important;display:flex!important;align-items:center!important;justify-content:space-between!important;background:#fff!important;border-bottom:1px solid #eaecf0!important}
.pb790CartCard>header>div{display:grid!important;gap:3px!important}.pb790CartCard>header b{font-size:16px!important}.pb790CartCard>header small{font-size:10px!important;color:#667085!important}.pb790CartClose{width:34px!important;height:34px!important;border:1px solid #e4e7ec!important;border-radius:9px!important;background:#f8fafc!important;font-size:22px!important}
.pb790CartRows{flex:1 1 auto!important;min-height:0!important;overflow:auto!important;padding:10px!important;display:grid!important;gap:8px!important;-webkit-overflow-scrolling:touch!important}
.pb790CartRow{display:grid!important;grid-template-columns:56px minmax(0,1fr) auto!important;gap:9px!important;align-items:center!important;padding:8px!important;border:1px solid #eaecf0!important;border-radius:12px!important}.pb790CartRow img{width:56px!important;height:56px!important;object-fit:cover!important;border-radius:9px!important}.pb790CartRow>div{display:grid!important;gap:3px!important;min-width:0!important}.pb790CartRow b{font-size:11px!important}.pb790CartRow small{font-size:9px!important;color:#667085!important;line-height:1.6!important}.pb790CartRow button{height:32px!important;border:1px solid #cbd5e1!important;border-radius:8px!important;background:#fff!important;font-size:9px!important;font-weight:900!important}.pb790CartEmpty{padding:28px 12px!important;text-align:center!important;color:#667085!important;font-size:11px!important}.pb790CartCard>footer{display:grid!important;grid-template-columns:1fr 1.4fr!important;gap:8px!important;padding:10px 12px max(10px,env(safe-area-inset-bottom))!important;border-top:1px solid #eaecf0!important;background:#fff!important}.pb790CartCard>footer button{min-height:42px!important;border-radius:10px!important;font-size:10.5px!important;font-weight:950!important}.pb790CartContinue{border:1px solid #cbd5e1!important;background:#fff!important;color:#344054!important}

/* ---------- Non-Iran IP / VPN hint ---------- */
.pb790VpnHint{position:fixed!important;left:10px!important;right:10px!important;bottom:max(10px,env(safe-area-inset-bottom))!important;z-index:2147483600!important;direction:rtl!important;display:grid!important;grid-template-columns:42px minmax(0,1fr) auto!important;grid-template-areas:"grip grip grip" "icon copy close" "icon action action"!important;gap:8px 10px!important;align-items:center!important;padding:7px 12px 12px!important;border:1px solid #fed7aa!important;border-radius:20px!important;background:#fffaf3!important;box-shadow:0 24px 70px rgba(15,23,42,.26)!important;transform:translateY(calc(100% + 28px))!important;opacity:0!important;transition:transform .28s cubic-bezier(.2,.8,.2,1),opacity .2s ease!important;font-family:Vazirmatn,Tahoma,Arial,sans-serif!important}
.pb790VpnHint.open{transform:translateY(0)!important;opacity:1!important}.pb790VpnHint.closing{transform:translateY(calc(100% + 28px))!important;opacity:0!important}
.pb790VpnGrip{grid-area:grip!important;width:44px!important;height:4px!important;border-radius:999px!important;background:#d0d5dd!important;justify-self:center!important}.pb790VpnIcon{grid-area:icon!important;width:42px!important;height:42px!important;border-radius:13px!important;background:#ffedd5!important;color:#c2410c!important;display:grid!important;place-items:center!important;font-size:22px!important;font-weight:950!important}.pb790VpnCopy{grid-area:copy!important;min-width:0!important}.pb790VpnCopy b{display:block!important;font-size:12px!important;color:#7c2d12!important}.pb790VpnCopy p{margin:3px 0 0!important;font-size:9.5px!important;line-height:1.75!important;color:#9a3412!important}.pb790VpnOk{grid-area:action!important;justify-self:start!important;height:34px!important;padding:0 13px!important;border:0!important;border-radius:9px!important;background:#c2410c!important;color:#fff!important;font-size:10px!important;font-weight:900!important}.pb790VpnClose{grid-area:close!important;width:30px!important;height:30px!important;border:0!important;border-radius:8px!important;background:transparent!important;color:#9a3412!important;font-size:20px!important;line-height:1!important}
