/* LAKTA CHROME CONTRACT: page content cannot reposition header slots.
   Change geometry here only. Logo, bell, identity, preferences have fixed slots. */
/* Tablet keyboard exception: preserve every header slot, reclaim the navigation
   reserve only while editing. Never apply this to phones or pointer laptops. */
html:root:root[data-tablet-keyboard] :is([data-testid="visitor-header"],[data-testid="workflow-shared-top"],header .top){top:var(--lakta-tablet-visual-top,0px)!important;}
html:root:root[data-tablet-keyboard] :is([data-testid="app-footer-space"],[data-testid="visitor-footer"],[data-testid="workflow-footer"],[data-testid="owner-footer"],#preview-footer){display:none!important;}
html:root:root[data-tablet-keyboard] [data-testid="workflow-root"]{min-height:0!important;flex:1!important;}
html:root:root[data-tablet-keyboard] :is([data-testid="workflow-scroll"],[data-testid="self-profile-scroll"],[data-testid="owner-account-scroll"]){min-height:0!important;flex:1 1 0%!important;}
html:root:root[data-tablet-keyboard] [data-testid="workflow-scroll"]>div{padding-block:12px 24px!important;}
html:root:root { --lakta-header-height:74px; --lakta-logo:92px; --lakta-gap:18px; }
html:root:root [data-testid="chrome-header-space"] {height:var(--lakta-header-height)!important;min-height:var(--lakta-header-height)!important;flex-shrink:0!important;width:100%!important;}
html:root:root :is([data-testid="visitor-header"],[data-testid="workflow-shared-top"],header .top) {
 position:fixed!important;inset:0 auto auto 0!important;transform:none!important;margin:0!important;
 width:100vw!important;max-width:none!important;height:var(--lakta-header-height)!important;min-height:var(--lakta-header-height)!important;
 padding:8px max(24px,calc((100vw - 1040px)/2))!important;box-sizing:border-box!important;
 display:grid!important;grid-template-columns:var(--lakta-logo) 44px minmax(0,240px) minmax(0,1fr) 293px!important;
 grid-template-rows:58px!important;gap:0 var(--lakta-gap)!important;align-items:center!important;
 direction:inherit!important;background:#fff!important;z-index:100!important;overflow:visible!important;border:0!important;border-radius:0!important;
}
html:root:root [data-testid="brand-header-row"] {display:contents!important;}
html:root:root :is([data-testid="header-logo-home"],header .top>a:first-child) {
 grid-column:1!important;grid-row:1!important;width:var(--lakta-logo)!important;min-width:var(--lakta-logo)!important;height:58px!important;
 display:flex!important;align-items:center!important;justify-content:center!important;flex:none!important;
 background:transparent!important;border:0!important;outline:0!important;box-shadow:none!important;border-radius:0!important;
}
html:root:root :is([data-testid="header-logo-home"],header .top>a:first-child):is(:focus,:focus-visible,:active,:hover) {border:0!important;outline:0!important;box-shadow:none!important;background:transparent!important;}
html:root:root [data-testid="header-logo"] {width:var(--lakta-logo)!important;height:var(--lakta-logo)!important;object-fit:contain!important;flex-shrink:0!important;border:0!important;outline:0!important;box-shadow:none!important;}
html:root:root  :is([data-testid="notification-bell"],[data-testid="notification-bell-placeholder"]) {grid-column:2!important;grid-row:1!important;width:44px!important;height:44px!important;margin:0!important;align-self:center!important;justify-self:center!important;}
html:root:root [data-testid="header-greeting-wrap"] {grid-column:3!important;grid-row:1!important;display:flex!important;flex-direction:column!important;justify-content:center!important;align-items:stretch!important;align-self:center!important;min-width:0!important;width:100%!important;height:40px!important;margin:0!important;padding:0!important;transform:none!important;overflow:hidden!important;text-align:start!important;}
html:root:root [data-testid="header-greeting-wrap"]>div {align-items:stretch!important;}
html:root:root :is([data-testid="header-greeting"],[data-testid="team-header-name"]) {display:block!important;font-size:13px!important;line-height:20px!important;height:20px!important;min-height:20px!important;font-weight:700!important;text-align:start!important;white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important;margin:0!important;}
html:root:root [data-testid="header-role-subtitle"] {display:block!important;font-size:11px!important;line-height:16px!important;height:16px!important;min-height:16px!important;text-align:start!important;margin:0!important;white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important;}
html:root:root :is([data-testid="wide-preferences"],[data-testid="visitor-preferences"],[data-testid="request-preferences"],header .preferences) {grid-column:5!important;grid-row:1!important;display:flex!important;flex-direction:row!important;direction:inherit!important;align-items:center!important;gap:10px!important;width:293px!important;margin:0!important;padding:0!important;}
html:root:root :is([data-testid="workflow-currency"],[data-testid="currency-button"],header [id="currency"]) {width:180px!important;min-width:180px!important;flex:none!important;}
html:root:root :is([data-testid="workflow-language"],[data-testid="language-button"],header [id="language"]) {width:103px!important;min-width:103px!important;flex:none!important;}
html:root:root :is([data-testid="workflow-currency"],[data-testid="currency-button"],[data-testid="workflow-language"],[data-testid="language-button"],header .preferences select) {height:38px!important;min-height:38px!important;background:#fff!important;border:1px solid #dde2e9!important;border-radius:9px!important;padding:6px 12px!important;box-sizing:border-box!important;font-size:14px!important;}
html:root:root header:has(.top) {height:var(--lakta-header-height)!important;min-height:var(--lakta-header-height)!important;}
html:root:root header .top nav {display:none!important;}
@media(max-width:699px) {
 html:root:root {--lakta-header-height:134px;--lakta-logo:76px;--lakta-gap:8px;}
 html:root:root :is([data-testid="visitor-header"],[data-testid="workflow-shared-top"],header .top) {padding:0 16px 10px!important;grid-template-columns:76px 44px minmax(0,1fr)!important;grid-template-rows:76px 48px!important;}
 html:root:root :is([data-testid="wide-preferences"],[data-testid="visitor-preferences"],[data-testid="request-preferences"],header .preferences) {grid-column:1 / -1!important;grid-row:2!important;width:100%!important;gap:10px!important;}
 html:root:root :is([data-testid="workflow-currency"],[data-testid="currency-button"],[data-testid="workflow-language"],[data-testid="language-button"],header .preferences select) {width:calc((100% - 10px)/2)!important;min-width:0!important;height:44px!important;min-height:44px!important;}
}

html:root:root [data-testid="notification-bell"]:not([hidden]) {display:flex!important;align-items:center!important;justify-content:center!important;}

html:root:root header .session-identity {color:#14254a;}
html:root:root header .session-identity small {color:#748097;}
html:root:root header .preferences select {font:14px Tajawal,Arial;}
html:root:root header .top>a:first-child img {display:block;}

/* React Navigation may animate an ancestor. It must never turn the shared
   fixed header into a scrolling/transformed containing block. */
html:root:root div:has([data-testid="visitor-header"]),
html:root:root div:has([data-testid="workflow-shared-top"]) {
 transform:none!important;perspective:none!important;filter:none!important;
 backdrop-filter:none!important;contain:none!important;will-change:auto!important;
}

/* One phone footer contract. Device safe area is real env(), never a fake 34px gap.
   The spacer reserves content room; the bar stays fixed to the visible viewport. */
@media(max-width:699px){
 html:root:root {--lakta-footer-height:calc(68px + env(safe-area-inset-bottom,0px));}
 html:root:root [data-testid="app-footer-space"]{height:var(--lakta-footer-height)!important;min-height:var(--lakta-footer-height)!important;width:100%!important;flex-shrink:0!important;}
 html:root:root :is([data-testid="visitor-footer"],[data-testid="workflow-footer"],[data-testid="owner-footer"]){
  position:fixed!important;inset:auto 0 0!important;width:100%!important;max-width:none!important;
  height:var(--lakta-footer-height)!important;min-height:var(--lakta-footer-height)!important;
  display:flex!important;flex-direction:row!important;direction:inherit!important;box-sizing:border-box!important;
  padding:9px 0 calc(9px + env(safe-area-inset-bottom,0px))!important;gap:0!important;
  border:0!important;border-top:1px solid #dfe4eb!important;border-radius:0!important;
  background:#fff!important;box-shadow:none!important;z-index:100!important;flex-shrink:0!important;
 }
 html:root:root :is([data-testid="visitor-footer"],[data-testid="workflow-footer"],[data-testid="owner-footer"])>*{
  position:relative!important;flex:1!important;min-width:0!important;min-height:48px!important;height:48px!important;
  display:flex!important;flex-direction:column!important;align-items:center!important;justify-content:center!important;gap:2px!important;
 }
 html:root:root [data-testid^="footer-label-"]{font-size:12px!important;line-height:16px!important;text-align:center!important;color:inherit!important;max-width:100%!important;}
 html:root:root :is([data-testid="visitor-footer"],[data-testid="workflow-footer"],[data-testid="owner-footer"])>*{color:#08085b!important;}
 html:root:root :is([data-testid="visitor-footer"],[data-testid="workflow-footer"],[data-testid="owner-footer"])>*:is([aria-selected="true"],[aria-pressed="true"],[aria-checked="true"]){color:#f58216!important;}
 html:root:root :is([data-testid="visitor-footer"],[data-testid="workflow-footer"],[data-testid="owner-footer"])>*>:first-child{position:absolute!important;top:-9px!important;margin:0!important;height:3px!important;}
}
@media(min-width:700px){
 html:root:root [data-testid="app-footer-space"]{height:auto!important;min-height:74px!important;width:100%!important;flex-shrink:0!important;}
}

@media(max-width:699px){
 html:root:root :is([data-testid="visitor-footer"],[data-testid="workflow-footer"],[data-testid="owner-footer"])>*>:nth-child(2){height:24px!important;min-height:24px!important;}
 html:root:root :is([data-testid="visitor-footer"],[data-testid="workflow-footer"],[data-testid="owner-footer"])>*>:last-child{height:20px!important;min-height:20px!important;justify-content:center!important;color:inherit!important;}
}

@media(max-width:699px){
 html:root:root div:has([data-testid="app-footer-space"]){
  transform:none!important;perspective:none!important;filter:none!important;
  backdrop-filter:none!important;contain:none!important;will-change:auto!important;
 }
}

@media(max-width:699px){
 html:root:root :is([data-testid="visitor-footer"],[data-testid="workflow-footer"],[data-testid="owner-footer"]) [style*="ionicons"]{color:inherit!important;}
}

html:root:root [data-testid^="footer-label-"]{color:inherit!important;}

@media(min-width:700px){
 html:root:root :is([data-testid="workflow-footer"],[data-testid="owner-footer"]) [data-testid^="footer-label-"]{font:inherit!important;}
}


/* Tablet pages share a viewport shell. Only the content between the bars scrolls. */
html:root:root[data-touch-tablet],html:root:root[data-touch-tablet] body{
 height:100%;overflow:hidden!important;overscroll-behavior:none;
}
html:root:root[data-touch-tablet] body{padding-bottom:0!important;}
html:root:root[data-touch-tablet] :is([data-testid="visitor-header"],[data-testid="workflow-shared-top"],header .top){
 top:var(--lakta-tablet-top,0px)!important;
}
html:root:root[data-touch-tablet] [data-testid="visible-viewport-frame"]{position:fixed!important;}
html:root:root[data-touch-tablet] [data-testid="workflow-root"]{
 flex:1!important;min-height:0!important;max-height:100%!important;margin:0 auto!important;
}
html:root:root[data-touch-tablet] body:has(#preview-footer) #main{
 position:fixed;top:calc(var(--lakta-tablet-top,0px) + 74px);
 bottom:auto;height:calc(var(--lakta-tablet-height,100dvh) - 148px);
 width:100%;left:0;right:0;overflow-y:auto;overflow-x:hidden;
 overscroll-behavior-y:contain;-webkit-overflow-scrolling:touch;
 margin:0 auto;padding-top:20px;padding-bottom:24px;
}
html:root:root[data-touch-tablet] :is([data-testid="visitor-footer"],[data-testid="workflow-footer"],[data-testid="owner-footer"],#preview-footer){
 position:fixed!important;top:calc(var(--lakta-tablet-top,0px) + var(--lakta-tablet-height,100dvh) - 74px)!important;
 bottom:auto!important;left:50%!important;right:auto!important;transform:translateX(-50%)!important;
 width:520px!important;max-width:calc(100% - 32px)!important;
 height:74px!important;min-height:74px!important;margin:0!important;
 padding:8px!important;box-sizing:border-box!important;background:#fff!important;
 border:1px solid #dfe4eb!important;border-bottom:0!important;border-radius:12px 12px 0 0!important;z-index:100!important;
}
html:root:root[data-touch-tablet] #preview-footer nav{height:100%;padding:0!important;gap:0;}
html:root:root[data-touch-tablet] #preview-footer a{grid-template-rows:26px 20px;row-gap:2px;padding:0;}
html:root:root[data-touch-tablet] #preview-footer a>span:last-child{height:20px;font-size:13px;line-height:18px;}
html:root:root[data-touch-tablet] [data-testid="app-footer-space"]{height:74px!important;min-height:74px!important;flex-shrink:0!important;}

/* Native horizontal gestures stay with the photo viewer, including desktop-mode iPad. */
html[data-touch-tablet] :is(.media,#viewer,#full-photo){touch-action:pan-y pinch-zoom;}
html[data-touch-tablet] #full-photo{user-select:none;-webkit-user-select:none;-webkit-user-drag:none;}
