/* Source file https://github.com/MrOtherGuy/firefox-csshacks/tree/master/chrome/window_control_placeholder_support.css made available under Mozilla Public License v. 2.0
See the above repository for updates as well as full license text. */

/* Creates placeholders for window controls */
/* This is a supporting file used by other stylesheets */

/* This stylesheet is pretty much unnecessary if window titlebar is enabled */

/* This file should preferably be imported before other stylesheets */

/* Defaults for window controls on RIGHT side of the window */
/* Modify these values to match your preferences */
:root[tabsintitlebar]{
  --uc-window-control-width: 138px; /* Space reserved for window controls */
  --uc-window-drag-space-width: 24px; /* Extra space reserved on both sides of the nav-bar to be able to drag the window */
}
:root[sizemode="fullscreen"] .titlebar-buttonbox-container{ display: none !important }
:root[sizemode="fullscreen"] #window-controls{
  position: fixed;
  display: flex;
  top: 0;
  right:0;
  height: 40px;
}
:root[uidensity="compact"][sizemode="fullscreen"] #window-controls{ height: 32px }
#nav-bar{
  border-inline: var(--uc-window-drag-space-width,0px) solid var(--toolbar-bgcolor);
  border-inline-style: solid !important;
  border-right-width: calc(var(--uc-window-control-width,0px) + var(--uc-window-drag-space-width,0px));
}

/* Use this pref to check Mac OS where window controls are on left */
/* This pref defaults to true on Mac and doesn't actually do anything on other platforms. So if your system has window controls on LEFT side you can set the pref to true */
@supports -moz-bool-pref("layout.css.osx-font-smoothing.enabled"){
  :root{ --uc-window-control-width: 72px; }
  :root[tabsintitlebar="true"]:not([inFullscreen]) #nav-bar{
    border-inline-width: calc(var(--uc-window-control-width,0px) + var(--uc-window-drag-space-width,0px)) var(--uc-window-drag-space-width,0px)
  }
}
 
