@media (-moz-bool-pref: "zen.view.compact") {

  #zen-appcontent-navbar-container {
    padding: calc(var(--zen-element-separation) * 2) !important;
    border: none !important;
    background: none !important;
    box-sizing: border-box;
    box-shadow: none !important;
  }

  #nav-bar {
    min-height: calc( var(--zen-toolbar-height) + 5px ) !important;
  }

  #nav-bar,
  #PersonalToolbar {
    background: var(--zen-colors-tertiary) !important;
    border-radius: var(--zen-border-radius);
    border: 1px solid var(--zen-colors-border) !important;
  }

  #PersonalToolbar {
    margin-top: var(--zen-element-separation);
  }

  #PersonalToolbar,
  .bookmark-item {
    padding: var(--zen-element-separation) !important;
  }

}

/* Enable compact toolbar, similar to Smaller Compact Mode by n7itro */
@media (-moz-bool-pref: "zen.view.compact") and (-moz-bool-pref: "uc.floatingtoolbar.compact.enabled") {
  #nav-bar,
  #PersonalToolbar {
    width: 75vw !important;
    margin-left: calc( 12.5vw - var(--zen-element-separation) * 2) !important;
  }
}

/* Increase space around edge of browser window and toolbar / tab bar */
@media (-moz-bool-pref: "zen.view.compact") and (-moz-bool-pref: "uc.floatingtoolbar.increase.spacing") {
  #main-window {
    --zen-element-separation: 10px !important;
  }
  #PersonalToolbar,
  .bookmark-item {
    padding: calc( var(--zen-element-separation) / 2 ) !important;
  }
}

/* Merge bookmark bar with toolbar */
@media (-moz-bool-pref: "zen.view.compact") and (-moz-bool-pref: "uc.floatingtoolbar.merge.bookmarks") {
  #nav-bar {
    border-radius: var(--zen-border-radius) var(--zen-border-radius) 0 0;
  }
  #PersonalToolbar {
    border-radius: 0 0 var(--zen-border-radius) var(--zen-border-radius);
    border-top-width: 0 !important;
    margin-top: 0 !important;
  }
}
