/* Makes tabs toolbar items zero-height initially and sets enlarge them to fill up space equal to tab-min-height set on tabs */
/* Firefox 65+ only */

/* REMOVE ALL BUTTONS you can from the tabs toolbar or this won't work properly */

:root:not([sizemode="fullscreen"]) #nav-bar {
  --uc-window-drag-space-width: 20px;
}

#titlebar {
  -moz-appearance: none !important;
}

#tabbrowser-tabs,
#tabbrowser-tabs > .tabbrowser-arrowscrollbox {
  min-height: 0 !important;
}
:root:not([customizing]) #tabbrowser-tabs .tabs-newtab-button,
:root:not([customizing]) #TabsToolbar .titlebar-button {
  -moz-appearance: none !important;
  height: 0px;
  padding-top: 0px !important;
  padding-bottom: 0px !important;
  -moz-box-align: stretch;
  margin: 0 !important;
  min-height: 0px;
  max-height: 0px;
  visibility: collapse !important;
}

#tabbrowser-tabs .tabbrowser-tab {
  height: var(--tab-min-height);
}

/* Button re-styling */
#tabs-newtab-button:hover,
#tabbrowser-tabs .tabs-newtab-button:hover {
  background-color: var(--toolbarbutton-hover-background);
}

#tabs-newtab-button > .toolbarbutton-icon,
#tabbrowser-tabs .tabs-newtab-button > .toolbarbutton-icon {
  padding: 0 !important;
  transform: scale(0.6);
  background-color: transparent !important;
}
/* Extra top padding  in maximized window */
/* Removed to fix https://github.com/diedummydie/Safari-Theme-for-Firefox/issues/2 */
/*:root[sizemode="maximized"] > #navigator-toolbox{ padding-top:7px !important; }*/

/* Fix window controls not being clickable */
#toolbar-menubar:hover {
  min-height: calc(
    var(--tab-min-height) + var(--space-above-tabbar) - 1px
  ) !important;
  height: calc(
    var(--tab-min-height) + var(--space-above-tabbar) - 1px
  ) !important;
  -moz-appearance: initial !important;
}
#nav-bar::before,
#nav-bar::after {
  content: "";
  display: -moz-box;
  width: var(--uc-window-drag-space-width);
}
