/* The footer stays in flow and is public until a signed-in user opens another tab. */
html body.tk-footer-flow:has(>#root){display:flex;flex-direction:column;box-sizing:border-box;min-height:100vh!important;min-height:100dvh!important;padding-bottom:0!important}
html body.tk-footer-flow #root{display:flex;flex:1 0 auto;flex-direction:column;min-height:0!important}
html body.tk-footer-flow #root>.vtw-mobile-app{display:flex;flex:1 0 auto;flex-direction:column;min-height:0!important;padding-bottom:0!important}
html body.tk-footer-flow #root:has(>.vtw-mobile-app[data-hide-public-footer="true"])+.tk-public-footer{display:none!important}
html body .tk-public-footer{position:static!important;flex:0 0 auto;box-sizing:border-box!important;clear:both;width:100%!important;max-width:none!important;margin:0!important;padding:6px 24px calc(7px + env(safe-area-inset-bottom,0px))!important;border-top:1px solid #e2e8f0;background:#fff;font:11px/1.45 Arial,"Helvetica Neue",sans-serif!important;color:#52667c;text-align:left!important}
html body .tk-public-footer h2{margin:0 0 3px!important;font-size:12px!important;line-height:1.35!important}
html body .tk-public-footer p{margin:3px 0!important}
html body .tk-public-footer nav{justify-content:flex-start!important;gap:6px 14px!important;margin-top:5px!important}
html body .tk-public-footer nav a{font-size:11px!important;line-height:1.4!important}
@media(min-width:769px){
  html body .tk-public-footer{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:baseline;column-gap:18px}
  html body .tk-public-footer h2{grid-column:1/-1}
  html body .tk-public-footer p{margin:0!important}
  html body .tk-public-footer nav{justify-self:end;flex-wrap:nowrap;margin:0!important;white-space:nowrap}
}
html body .vtw-footer-status{position:static!important;z-index:auto!important;display:flex!important;flex:0 0 auto;flex-direction:row!important;flex-wrap:nowrap!important;align-items:center!important;gap:6px 10px!important;box-sizing:border-box!important;width:100%!important;max-width:none!important;min-width:0!important;margin:auto 0 0!important;padding:5px 16px!important;border:1px solid #dce5ee!important;border-left:0!important;border-right:0!important;border-radius:0!important;background:#fff!important;box-shadow:none!important;font-size:10.5px!important;line-height:1.35!important}
html body .vtw-footer-status>div:first-child{flex:1 1 160px!important;min-width:0!important;width:auto!important;overflow:hidden!important;white-space:nowrap!important;padding-right:0!important}
html body .vtw-footer-status .vtw-status-log{display:flex!important;align-items:center!important;width:100%!important;min-width:0!important;margin:0!important;padding:3px 6px!important}
html body .vtw-footer-status .vtw-status-log>svg{width:13px!important;height:13px!important;flex-shrink:0!important;margin-top:0!important}
html body .vtw-footer-status .vtw-status-log>span{display:block!important;min-width:0!important;margin:0!important;white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important;word-break:normal!important}
html body .vtw-footer-status>.vtw-quota-box{display:flex!important;flex:0 0 auto!important;flex-wrap:nowrap!important;align-items:center!important;gap:4px 7px!important;width:auto!important;min-width:0!important;margin:0!important;overflow:visible!important;white-space:nowrap!important}
html body .vtw-footer-status>.vtw-privacy-link{flex:0 0 auto!important;width:auto!important;padding:3px 0!important}
@media(max-width:768px){
  html body .tk-public-footer{padding:5px 12px calc(6px + env(safe-area-inset-bottom,0px))!important;font-size:10px!important;line-height:1.4!important}
  html body .tk-public-footer h2{font-size:11px!important;margin-bottom:2px!important}
  html body .tk-public-footer nav{gap:4px 12px!important;margin-top:4px!important}
  html body .tk-public-footer nav a{font-size:10px!important}
  html body .vtw-footer-status{flex-wrap:wrap!important;gap:3px 6px!important;padding:4px 8px!important;font-size:9.5px!important}
  html body .vtw-footer-status>div:first-child{flex:1 0 100%!important}
  html body .vtw-footer-status>.vtw-quota-box{flex:0 1 auto!important;flex-wrap:wrap!important;justify-content:flex-start!important;gap:4px!important;font-size:9px!important}
  html body .vtw-footer-status>.vtw-quota-box>span{margin:0!important}
  html body .vtw-footer-status>.vtw-quota-box>span:last-child{padding-left:4px!important;padding-right:4px!important}
  html body .vtw-footer-status>.vtw-privacy-link{font-size:9px!important}
}
@media(max-width:767px){
  html body.tk-footer-flow:has(.tubekey-fixed-section-rail.is-visible){padding-bottom:calc(66px + env(safe-area-inset-bottom,0px))!important}
}
/* Desktop workspace fills the viewport in normal flex flow; only the working panes scroll. */
@media(min-width:1101px) and (min-height:600px){
  html:has(body.tk-footer-flow>#root>.vtw-mobile-app){height:100%;overflow:hidden}
  html body.tk-footer-flow:has(>#root>.vtw-mobile-app){height:100dvh!important;min-height:0!important;overflow:hidden!important}
  html body.tk-footer-flow #root{flex:1 1 0!important;min-height:0!important;overflow:hidden}
  html body.tk-footer-flow #root>.vtw-mobile-app{flex:1 1 0!important;min-height:0!important;overflow:hidden}
  html body.tk-footer-flow .vtw-app-header,html body.tk-footer-flow .vtw-tabs{flex:0 0 auto!important}
  html body.tk-footer-flow .vtw-page-wrap{display:flex;flex-direction:column;flex:1 1 0;min-height:0;overflow:auto;padding:8px 12px!important}
  html body.tk-footer-flow .vtw-main-panel{flex:1 1 0;min-height:0!important;overflow:auto;padding:10px!important}
  html body.tk-footer-flow .vtw-main-panel:has(>.vtw-niche-layout){display:flex;flex-direction:column;overflow:hidden}
  html body.tk-footer-flow .vtw-main-panel>.vtw-niche-layout{flex:1 1 0!important;height:auto!important;max-height:none!important;min-height:0!important}
  html body.tk-footer-flow .vtw-niche-content{min-width:0!important;padding:12px!important}
  html body.tk-footer-flow .vtw-footer-status{flex:0 0 auto!important;margin:0!important}
}
