/*= Tab Bar - Distribution padding, radius ===================================*/
@import "tab_padding";

/*= Tab Bar - Reduce Width, Show more tabs ===================================*/
@include Option("userChrome.padding.first_tab") {
  @import "first_tab";
}

@include Option("userChrome.padding.tabbar_width") {
  @import "tabbar_width";
}

/*= Tab Bar - Reduce Height, Show more contents ==============================*/
@include Option("userChrome.padding.drag_space") {
  @import "drag_space";
}

@include Option("userChrome.padding.tabbar_height") {
  @import "tabbar_height";
}

/*= Tool Bar - Button Padding ================================================*/
@include Option("userChrome.padding.toolbar_button", "userChrome.tab.newtab_button_smaller") {
  :root {
    --uc-small-toolbarbutton-inner-padding: 6px;
    --uc-toolbarbutton-inner-padding-default: 8px;
  }
  :root[uidensity="compact"] {
    --uc-small-toolbarbutton-inner-padding: 4px;
    --uc-toolbarbutton-inner-padding-default: 6px;
  }
  :root[uidensity="touch"] #tabs-newtab-button > .toolbarbutton-icon {
    --uc-small-toolbarbutton-inner-padding: 9px;
    --uc-toolbarbutton-inner-padding-default: 9px;
  }
}
@include Option("userChrome.padding.toolbar_button") {
  @import "toolbar_button";
}

/*= Nav Bar - Reduce Width ===================================================*/
@include Option("userChrome.padding.navbar_width") {
  @import "navbar";
}

/*= URL Bar - Reduce Padding =================================================*/
@include NotOption("userChrome.urlView.as_commandbar") {
  @include Option("userChrome.padding.urlbar") {
    @import "urlbar";
  }
}
@include Option("userChrome.padding.urlView_expanding", "userChrome.urlView.as_commandbar") {
  #urlbar[breakout][breakout-extend] {
    top: calc(var(--urlbar-container-height) * 2 - var(--urlbar-height)) !important;
    width: var(--urlbar-width) !important;
    position: relative !important;
    margin: 0 !important;
  }

  #urlbar[breakout][breakout-extend] > #urlbar-input-container,
  #urlbar[breakout][breakout-extend] > .urlbar-input-container  {
    height: var(--urlbar-height) !important;
    padding-block: 0 !important;
    padding-inline: var(--urlbar-container-padding, 0px) !important;
  }
}
@include Option("userChrome.padding.urlView_expanding") {
  @import "urlview_expanding";
}
@include Option("userChrome.padding.urlView_result") {
  @import "urlview_result";
}

/*= BookMark Bar - Reduce Height =============================================*/
@include Option("userChrome.padding.bookmarkbar") {
  @import "bookmarkbar";
}

/*= Info Bar - Reduce Padding ================================================*/
@include Option("userChrome.padding.infobar", "userChrome.autohide.infobar") {
  #tab-notification-deck notification-message[message-bar-type="infobar"]:not([style*="margin-top"]) {
    margin: var(--infobar-message-margin, 0 4px var(--infobar-message-vertical-margin, 8px)) !important;
  }
}
@include Option("userChrome.padding.infobar") {
  @import "infobar";
}

/*= Menu - Reduce Padding ====================================================*/
@include Option("userChrome.padding.menu") {
  @import "menu";
}

/*= Bookmark Menu - Reduce Padding ===========================================*/
@include Option("userChrome.padding.bookmark_menu") {
  @import "bookmark_menu";
}

/*= Global Menu - Set Padding ================================================*/
@include Option("userChrome.padding.global_menubar") {
  @import "global_menubar";
}

/*= Panel - Reduce padding ===================================================*/
@include Option("userChrome.padding.panel") {
  @import "panel";
}
@include Option("userChrome.padding.panel_header") {
  @import "panel_header";
}

/*= Popup Panel - Reduce padding =============================================*/
@include Option("userChrome.padding.popup_panel") {
  @import "popup_panel";
}
