/* Aniiland 3.1.12 — dedicated Floor Planner workspace fullscreen */
#layout-root .layout-scroll-frame{position:relative;min-width:0;max-width:100%;isolation:isolate}
#layout-root .layout-scroll-frame>#layout-move-lock{right:126px!important}
#layout-root .layout-scroll-frame>.floor-fullscreen-button{position:absolute;right:12px;top:12px;z-index:26;display:inline-flex;align-items:center;justify-content:center;gap:6px;min-height:38px;padding:7px 11px;border:1px solid #9e77d2;border-radius:9px;background:#7342ae;color:#fff;font:700 12px/1.2 'Segoe UI',sans-serif;white-space:nowrap;cursor:pointer;box-shadow:0 4px 16px #0009}
#layout-root .floor-fullscreen-button:focus-visible,#layout-root .floor-legend-toggle:focus-visible{outline:2px solid #f1ddff;outline-offset:2px}
#layout-root .layout-legend{min-width:0}
#layout-root .floor-legend-toggle{display:none;position:absolute;right:12px;top:12px;z-index:50;align-items:center;justify-content:center;gap:3px;width:38px;height:38px;min-height:38px;margin:0;padding:8px;border:1px solid var(--line,#8198b9);border-radius:9px;background:var(--raised,#354c6b);color:var(--text,#f8faff);cursor:pointer;box-shadow:0 3px 12px #0007}
#layout-root .floor-legend-toggle{display:none;grid-template-columns:repeat(2,6px);grid-template-rows:repeat(2,6px);gap:3px}
#layout-root .floor-legend-toggle span{display:block;width:6px;height:6px;border-radius:1.5px;background:currentColor}
.layout-workspace:fullscreen.floor-fullscreen-active{position:relative!important}
.layout-workspace:fullscreen.floor-fullscreen-active>.floor-legend-toggle{display:flex!important}
.layout-workspace:fullscreen.floor-fullscreen-active .layout-scroll-frame>#layout-move-lock{right:176px!important;top:12px!important;z-index:26!important}
.layout-workspace:fullscreen.floor-fullscreen-active .layout-scroll-frame>.floor-fullscreen-button{right:12px!important;top:12px!important;z-index:27!important}
/* The fullscreen element is promoted to the browser top layer. Keep all layout
   rules on the fullscreen element itself rather than relying on #layout-root
   as an ancestor selector. */
.layout-workspace:fullscreen.floor-fullscreen-active{position:fixed!important;inset:0!important;width:100vw!important;height:100dvh!important;max-width:none!important;max-height:none!important;box-sizing:border-box!important;margin:0!important;padding:14px!important;overflow:hidden!important;background:var(--bg,#192739)!important;color:var(--text,#f3f7fd)!important;z-index:2147483000!important;display:grid!important;grid-template-columns:minmax(0,1fr) minmax(220px,280px)!important;gap:14px!important;align-items:stretch!important}
.layout-workspace:fullscreen.floor-fullscreen-active .layout-scroll-frame{min-width:0!important;min-height:0!important;height:100%!important;max-height:100%!important}
.layout-workspace:fullscreen.floor-fullscreen-active .layout-scroll{height:100%!important;min-height:0!important;max-height:none!important;overflow:auto!important;box-sizing:border-box!important}
.layout-workspace:fullscreen.floor-fullscreen-active .layout-legend{position:relative!important;top:auto!important;max-height:100%!important;height:100%!important;min-height:0!important;box-sizing:border-box!important;overflow:auto!important}
.layout-workspace:fullscreen.floor-fullscreen-active .floor-legend-toggle{display:flex!important}
.layout-workspace:fullscreen.floor-legend-collapsed{grid-template-columns:minmax(0,1fr) 0!important;gap:0!important}
.layout-workspace:fullscreen.floor-legend-collapsed .layout-legend{position:relative!important;width:0!important;min-width:0!important;padding:0!important;border:0!important;overflow:visible!important;background:transparent!important}
.layout-workspace:fullscreen.floor-legend-collapsed .layout-legend>*:not(.floor-legend-toggle){display:none!important}
.layout-workspace:fullscreen.floor-legend-collapsed .floor-legend-toggle{display:flex!important}
.layout-workspace:fullscreen.floor-fullscreen-active .layout-status{margin-top:8px}
.layout-workspace:fullscreen.floor-fullscreen-active .hint{margin-bottom:0}
@media(max-width:760px){
 #layout-root .layout-scroll-frame>#layout-move-lock{right:112px!important;min-width:78px!important;padding-inline:7px!important}
 #layout-root .layout-scroll-frame>.floor-fullscreen-button{right:9px;top:9px;min-height:36px;padding:7px 8px;font-size:11px}
 .layout-workspace:fullscreen.floor-fullscreen-active{padding:8px!important;grid-template-columns:minmax(0,1fr) minmax(150px,36vw)!important;gap:7px!important}
 .layout-workspace:fullscreen.floor-legend-collapsed{grid-template-columns:minmax(0,1fr) 0!important}
 .layout-workspace:fullscreen.floor-fullscreen-active .layout-scroll-frame>#layout-move-lock{right:170px!important;top:9px!important}
 .layout-workspace:fullscreen.floor-fullscreen-active .layout-scroll-frame>.floor-fullscreen-button{right:9px!important;top:9px!important}
 .layout-workspace:fullscreen.floor-fullscreen-active .layout-scroll{padding:8px!important}
 .layout-workspace:fullscreen.floor-fullscreen-active .layout-legend{padding:8px!important}
 .layout-workspace:fullscreen.floor-legend-collapsed .floor-legend-toggle{right:8px!important;top:8px!important}
}
@media(max-width:420px){
 #layout-root .layout-scroll-frame>#layout-move-lock{right:103px!important;min-width:72px!important;font-size:11px!important}
 #layout-root .layout-scroll-frame>.floor-fullscreen-button{font-size:10px!important;padding-inline:6px!important}
 .layout-workspace:fullscreen.floor-fullscreen-active{grid-template-columns:minmax(0,1fr) minmax(126px,35vw)!important}
}


/* 3.3.0 — narrow-screen fullscreen uses the entire viewport, not a hidden legend column. */
@media(max-width:760px){
 .layout-workspace:fullscreen.floor-fullscreen-active{
  grid-template-columns:minmax(0,1fr)!important;
  gap:0!important;padding:0!important
 }
 .layout-workspace:fullscreen.floor-fullscreen-active .layout-scroll-frame{
  width:100%!important;min-width:0!important;height:100%!important;max-width:none!important
 }
 .layout-workspace:fullscreen.floor-fullscreen-active .layout-scroll{
  width:100%!important;height:100%!important;max-height:none!important
 }
 .layout-workspace:fullscreen.floor-fullscreen-active .layout-legend,
 .layout-workspace:fullscreen.floor-fullscreen-active>.floor-legend-toggle{
  display:none!important
 }
}


/* Mobile fallback: keep the full planner usable when the browser does not
   support element Fullscreen (notably some mobile Safari/WebView versions). */
html.floorplanner-mobile-fullscreen-active,
html.floorplanner-mobile-fullscreen-active body {
  overflow: hidden !important;
  overscroll-behavior: none !important;
}
@media (max-width:1180px) {
  .layout-workspace.floor-fullscreen-fallback {
    position: fixed !important;
    inset: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    height: 100dvh !important;
    max-width: none !important;
    max-height: none !important;
    margin: 0 !important;
    padding: max(8px, env(safe-area-inset-top, 0px)) 8px max(8px, env(safe-area-inset-bottom, 0px)) !important;
    overflow: hidden !important;
    box-sizing: border-box !important;
    display: grid !important;
    grid-template-columns: minmax(0,1fr) !important;
    gap: 0 !important;
    align-items: stretch !important;
    background: var(--bg,#192739) !important;
    color: var(--text,#f3f7fd) !important;
    z-index: 2147483000 !important;
  }
  .layout-workspace.floor-fullscreen-fallback .layout-scroll-frame {
    width: 100% !important;
    min-width: 0 !important;
    min-height: 0 !important;
    height: 100% !important;
    max-width: none !important;
    max-height: 100% !important;
  }
  .layout-workspace.floor-fullscreen-fallback .layout-scroll {
    width: 100% !important;
    height: 100% !important;
    min-height: 0 !important;
    max-height: none !important;
    overflow: auto !important;
    box-sizing: border-box !important;
  }
  .layout-workspace.floor-fullscreen-fallback .layout-legend,
  .layout-workspace.floor-fullscreen-fallback > .floor-legend-toggle {
    display: none !important;
  }
  .layout-workspace.floor-fullscreen-fallback .layout-scroll-frame > .floor-fullscreen-button {
    top: max(8px, env(safe-area-inset-top, 0px)) !important;
    right: 8px !important;
    z-index: 40 !important;
  }
  .layout-workspace.floor-fullscreen-fallback .layout-scroll-frame > #layout-move-lock {
    top: max(8px, env(safe-area-inset-top, 0px)) !important;
    right: 120px !important;
    z-index: 40 !important;
  }
}
