/*
 * This Source Code Form is subject to the terms of the Mozilla Public
 * License, v. 2.0. If a copy of the MPL was not distributed with this
 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
 */
/* Screenshots */

#screenshotsPagePanel {
  position: absolute !important;
  top: 3%;
  right: 1.5%;
}

#zen-workspaces-button .zen-workspace-sidebar-name {
  margin-left: 10px;
  display: none;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

#customization-footer #customization-toolbar-visibility-button {
  display: none !important;
}

.private-browsing-indicator-with-label {
  display: none !important;
}

body > #confetti {
  z-index: 1;
}

/* Bookmarks */
#PersonalToolbar:not([collapsed='true']) {
  min-height: 30px;
}

/* Firefox View */
#firefox-view-button {
  display: none !important;
}

/* Emojis picker */

#PanelUI-zen-emojis-picker {
  --panel-width: 250px;
  --panel-padding: 0px;

  #PanelUI-zen-emojis-picker-header {
    gap: 10px;
    align-items: center;
    padding: 0px 10px;
    padding-bottom: 6px;
  }

  #PanelUI-zen-emojis-picker-pages {
    overflow: hidden;
    max-height: 230px;

    & > * {
      min-width: 100%;
    }
  }

  &[only-svg-icons='true'] {
    & #PanelUI-zen-emojis-picker-change-emojis {
      display: none;
    }

    & #PanelUI-zen-emojis-picker-change-svg {
      pointer-events: none;
    }

    & #PanelUI-zen-emojis-picker-pages > vbox[emojis='true'] {
      display: none;
    }
  }

  #PanelUI-zen-emojis-picker-none label {
    display: none;
  }

  #PanelUI-zen-emojis-picker-search {
    padding: 4px;
    width: 100%;
  }

  #PanelUI-zen-picker-header {
    padding: 6px 16px;
    justify-content: space-between;

    & > toolbarbutton:first-of-type {
      pointer-events: none;
    }

    & #PanelUI-zen-emojis-buttons-wrapper {
      gap: 4px;

      & toolbarbutton {
        appearance: none;
        font-size: small;
        padding: 0 6px;
        border-radius: 4px;
        font-weight: 600;

        &:hover {
          background-color: light-dark(rgba(0, 0, 0, 0.1), rgba(255, 255, 255, 0.1));
        }

        &.selected {
          background-color: light-dark(rgba(0, 0, 0, 0.1), rgba(255, 255, 255, 0.1));
        }
      }
    }
  }

  #PanelUI-zen-emojis-picker-list,
  #PanelUI-zen-emojis-picker-svgs {
    overflow-y: auto;
    overflow-x: hidden;
    width: 100%;

    padding: 10px;
    padding-top: 5px;

    gap: 5px;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(28px, 1fr));

    .zen-emojis-picker-emoji {
      font-size: 14px;
      padding: 0px !important;
      & image {
        display: none;
      }
    }

    .zen-emojis-picker-svg {
      padding: 0px !important;
      & label {
        display: none;
      }

      & .toolbarbutton-icon {
        width: 22px;
      }
    }
  }

  .zen-emojis-picker-emoji,
  .zen-emojis-picker-svg,
  #PanelUI-zen-emojis-picker-none {
    width: 22px;
    height: 22px;
    appearance: none;

    &:hover {
      background-color: light-dark(rgba(0, 0, 0, 0.1), rgba(255, 255, 255, 0.1));
      border-radius: 4px;
      cursor: pointer;
    }
  }
}

.toolbarbutton-1 {
  :root:is([zen-single-toolbar='true'], :not([zen-sidebar-expanded='true']))
    #zen-sidebar-top-buttons-customization-target
    &,
  #zen-sidebar-foot-buttons & {
    --tab-border-radius: 6px;
    --toolbarbutton-border-radius: var(--tab-border-radius);
    --toolbarbutton-inner-padding: 5px;
    --toolbarbutton-outer-padding: 2px;
  }

  transition:
    background-color 0.1s,
    scale 0.2s;
  &:active {
    transform: scale(0.98);
  }
}
