/* Modify to change window drag space width */
/*
Use Fx65_tabs_on_bottom_menubar_on_top_patch.css if you
have menubar permanently enabled and want it on top
 */

/* IMPORTANT */
/*
Get window_control_placeholder_support.css
Window controls will be all wrong without it.

Additionally on Linux, you may need to get:
linux_gtk_window_control_patch.css

*/

:root {
  --uc-titlebar-padding: 0px;
}
:root[sizemode="maximized"][tabsintitlebar] {
  --uc-titlebar-padding: 8px;
}

.titlebar-buttonbox-container {
  position: fixed;
  display: block;
  top: var(--uc-titlebar-padding, 0px);
  right: 0;
  height: 40px;
}
/* Mac specific. You should set that font-smoothing pref to true if you are on any platform where window controls are on left */
@supports -moz-bool-pref("layout.css.osx-font-smoothing.enabled") {
  :root {
    --uc-titlebar-padding: 0px !important;
  }
  .titlebar-buttonbox-container {
    left: 0;
    right: unset;
  }
}

:root[uidensity="compact"] .titlebar-buttonbox-container {
  height: 32px;
}

#toolbar-menubar[inactive] > .titlebar-buttonbox-container {
  opacity: 0;
}

#navigator-toolbox {
  padding-top: var(--uc-titlebar-padding, 0px) !important;
}

.titlebar-buttonbox-container > .titlebar-buttonbox {
  height: 100%;
}

#titlebar {
  -moz-box-ordinal-group: 2;
  -moz-appearance: none !important;
}

.titlebar-placeholder,
#TabsToolbar .titlebar-spacer {
  display: none;
}
/* Also hide the toolbox bottom border which isn't at bottom with this setup */
#navigator-toolbox::after {
  display: none !important;
}

@media (-moz-gtk-csd-close-button) {
  .titlebar-button {
    -moz-box-orient: vertical;
  }
}
