/* FCWB mobile shell v1 - isolated from desktop */
@media (max-width:800px){
  html,body{width:100%;max-width:100%;overflow-x:hidden}
  .app,.main,#view,.workspace{min-width:0;max-width:100%}
  .top{min-width:0;gap:6px;padding-inline:8px}
  .top .zone-tabs{min-width:0;max-width:calc(100% - 55px);overflow-x:auto;scrollbar-width:none}
  .top .zone-tabs::-webkit-scrollbar{display:none}
  .top .zone-tabs .navbtn{min-height:42px;flex-shrink:0}
  .mobileMenu{min-width:44px;min-height:44px;flex-shrink:0;cursor:pointer}
  .sidebar{width:min(290px,85vw);max-width:85vw;overflow-y:auto;overscroll-behavior:contain;z-index:100}
  .sidebar .navbtn{min-height:44px}
  .content{min-width:0;padding:12px 10px 24px}
  .page-head{flex-wrap:wrap}
  button,select,input,textarea{max-width:100%}
}
@media(max-width:380px){.top .zone-tabs .navbtn{padding-inline:7px;font-size:10px}.content{padding-inline:8px}}

/* Compact mobile header: menu | title | zone selector */
.fc-mobile-title,.fc-mobile-zone-label{display:none}
.fc-visually-hidden{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
@media(max-width:800px){
 .top{display:grid;grid-template-columns:44px minmax(0,1fr) minmax(112px,37%);gap:8px;align-items:center}
 .top .zone-tabs,.top-actions,.top>div:not(.top-actions){display:none!important}
 .top .mobileMenu{grid-column:1;grid-row:1;display:grid;place-items:center}
 .top .fc-mobile-title{grid-column:2;grid-row:1;display:block!important;font-size:15px;font-weight:750;color:#263a55;text-align:center;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
 .top .fc-mobile-zone-label{grid-column:3;grid-row:1;display:block!important;min-width:0}
 .top #fc-mobile-zone{width:100%;min-width:0;min-height:44px;border:1px solid #d8e2ef;border-radius:10px;background:#fff;color:#385272;font:inherit;font-size:12px;font-weight:650;padding:0 5px}
}
/* Mobile top: menu, expanding search, left-aligned location, zone */
.fc-mobile-top-search{display:none}
@media(max-width:800px){
.top{position:relative;grid-template-columns:44px 44px minmax(0,1fr) minmax(96px,30%)!important;gap:7px!important}
.top .fc-mobile-top-search{grid-column:2;grid-row:1;display:flex;align-items:center;justify-content:center;width:44px;height:44px;margin:0;position:relative;z-index:30}
.top .fc-mobile-top-search-icon{width:44px;height:44px;display:grid;place-items:center;border:1px solid #d8e2ef;border-radius:10px;background:#fff;color:#385272;cursor:pointer;padding:0}
.top .fc-mobile-top-search input{display:none;min-width:0}
.top .fc-mobile-top-search.expanded{position:absolute;left:59px;right:8px;top:50%;transform:translateY(-50%);width:auto;height:44px;z-index:120;background:white;border:1px solid #d8e2ef;border-radius:10px;box-shadow:0 3px 12px #15283b22}
.top .fc-mobile-top-search.expanded .fc-mobile-top-search-icon{flex:0 0 44px;border:0}
.top .fc-mobile-top-search.expanded input{display:block;flex:1 1 auto;width:100%;height:40px;max-width:none!important;border:0;outline:0;padding:0 12px 0 0;background:white;font:inherit;font-size:15px}
.top .fc-mobile-title{grid-column:3!important;text-align:left!important;font-size:14px!important}
.top .fc-mobile-zone-label{grid-column:4!important}
#view .module-toolbar>.module-global-search{display:none!important}
}
/* Keep the magnifier anchored when the search expands to the right. */
@media(max-width:800px){
.top .fc-mobile-top-search.expanded{left:59px!important;right:8px!important;transform:translateY(-50%)!important}
.top .fc-mobile-top-search.expanded .fc-mobile-top-search-icon{flex:0 0 44px!important;width:44px!important;min-width:44px!important}
}

/* Anchor expanded search to its measured collapsed location, no horizontal jump. */
@media(max-width:800px){
.top .fc-mobile-top-search.expanded{left:var(--fc-search-left)!important;top:var(--fc-search-top)!important;right:8px!important;transform:none!important;height:44px!important}
}
/* Expanded search stays in the same grid cell: no absolute-position reflow. */
@media(max-width:800px){
.top .fc-mobile-top-search{position:relative!important;left:auto!important;right:auto!important;top:auto!important;transform:none!important;justify-content:flex-start!important;z-index:30}
.top .fc-mobile-top-search.expanded{position:relative!important;grid-column:2!important;grid-row:1!important;left:auto!important;right:auto!important;top:auto!important;transform:none!important;width:calc(100vw - 118px)!important;max-width:none!important;min-width:0!important;margin:0!important;height:44px!important;z-index:120}
.top .fc-mobile-top-search.expanded .fc-mobile-top-search-icon{width:42px!important;min-width:42px!important;flex:0 0 42px!important}
}
