/* This is slapped together from a variety of sources- unfortunately we forgot to document where things came from, but hopefully this can be of some use. */

/*** Remove items from image context menu ***/
#context-sendimage, #context-sep-setbackground, #context-setDesktopBackground, #context-inspect-a11y, #PanelUI-fxa-menu-connect-device-button, #appMenu-fxa-status2, #appMenu-proton-update-banner
{
  display: none !important;
}

/* Smaller tab size and other tab changes. */
.tabbrowser-tab {
  --tab-min-height: 30px !important;
  max-height: 30px !important;
  font-family: Source Code Pro, Monospace;
  border-radius: 0px;
}

:root:not([uidensity=touch]) #TabsToolbar {
  --toolbarbutton-inner-padding: 2px;
  --newtab-margin: 2px 0 1px -3px !important;
  max-height: 30px !important;
}

.toolbar-items, .tabbrowser-tab {
  max-height: 30px;
}

.tab-content {
  margin-top: 3px;
  margin-bottom: 2px;
  padding-bottom: 2px !important;
}

#tabs-newtab-button {
  margin: 2px 0px 0px 1px;
  padding: 2px;
  width: 5px;
  height: 5px;
}

:root[uidensity=compact] .toolbar-items, .tabbrowser-tab {
  max-height: 30px;
}

:root[uidensity=touch] .toolbar-items, .tabbrowser-tab {
  max-height: unset;
}

/*
 * Underlines and dims unloaded tabs
 *
 * Contributor(s): josemam
 */

.tabbrowser-tab[pending] {
  text-decoration: underline;
  opacity: .5;
}

/* Reconnect tabs */

.tab-background {
  border-radius: 0px !important;
  margin-bottom: 2px !important;
  margin-left: 0px !important;
  padding: 1px 2px 2px 0px !important;
}

.tab-stack {
  margin-top: 0px !important;
  margin-bottom: 5px !important;
}

#TabsToolbar {
  border-radius: 0px;
}


/* Change fonts. */

#PlacesToolbarItems .bookmark-item {
  font-family: Source Code Pro, Monospace;
  padding-top: 2px !important;
  padding-bottom: 2px !important;
}

#urlbar {
  font-family: Source Code Pro, Monospace;
}

/* Hide toolbar when not hovering over it. */

#PersonalToolbar{
    --uc-bm-height: 1px; /* Might need to adjust if the toolbar has other buttons */
    --uc-bm-padding: 2px; /* Vertical padding to be applied to bookmarks */
  }

  :root[uidensity="compact"] #PersonalToolbar{ --uc-bm-padding: 1px }
  :root[uidensity="touch"] #PersonalToolbar{ --uc-bm-padding: 6px }

  #PersonalToolbar:not([customizing]){
    margin-bottom: calc(2px - var(--uc-bm-height) - 2 * var(--uc-bm-padding)) + 2px;
    transform: rotateX(90deg);
    transform-origin: top;
    transition: transform 135ms linear 600ms !important;
    z-index: 1;

  }
  #PlacesToolbarItems {   
    display: flex !important;   
    /* justify-content: center !important; */
}
  #PlacesToolbarItems > .bookmark-item{ padding-block: var(--uc-bm-padding) !important; }


  /* SELECT ONE BOOKMARKS TOOLBAR BEHAVIOR */

  /* ONE | Show when urlbar is focused 
       #nav-bar:focus-within + #PersonalToolbar{ 
       transition-delay: 100ms !important; 
       transform: rotateX(0); 
   } */

  /* TWO | Show when cursor is over the toolbar area 
  My Personal Choice
  */
  #navigator-toolbox:hover > #PersonalToolbar{
    transition-delay: 100ms !important;
    transform: rotateX(0);
  }
