/*
 * 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/.
 */

.subviewbutton,
#zen-welcome-start-button,
.zen-toast button {
  -moz-context-properties: fill, fill-opacity !important;
  fill: currentColor !important;
}

.private-browsing-indicator-icon {
  list-style-image: url('account-private.svg') !important;
  border-radius: 100% !important;
}

#back-button {
  list-style-image: url('back.svg') !important;
}

#zenSplitViewModifierActivateReallocation > image {
  list-style-image: url('move-tab.svg') !important;
}

#forward-button {
  list-style-image: url('forward.svg') !important;
}

#reload-button {
  list-style-image: url('reload.svg') !important;
}

#stop-button,
.close-icon,
#zen-glance-sidebar-close,
.zen-theme-picker-custom-list-item-remove {
  list-style-image: url('close.svg') !important;
}

#PanelUI-zen-emojis-picker-none {
  list-style-image: url('trash.svg');
}

.reset-icon {
  list-style-image: url('reload.svg') !important;
}

.tab-reset-button,
#PanelUI-zen-gradient-generator-color-remove {
  list-style-image: url('unpin.svg') !important;
}

#sidebar-button {
  list-style-image: url('sidebars-right.svg') !important;
}

#sidebar-button:-moz-locale-dir(ltr):not([positionend]),
#sidebar-button:-moz-locale-dir(rtl)[positionend] {
  list-style-image: url('chrome://browser/skin/sidebars.svg') !important;
}

#downloads-button,
#downloads-indicator-anchor,
#appMenu-downloads-button,
#appMenu-library-downloads-button {
  list-style-image: url('downloads.svg') !important;
}

#appMenu-translate-button {
  list-style-image: url('translations.svg') !important;
}

#appMenu-zoom-controls,
#PanelUI-zen-gradient-generator-color-add {
  list-style-image: url('plus.svg') !important;
}

#appMenu-passwords-button,
#password-notification-icon,
#PopupAutoComplete
  > richlistbox
  > richlistitem[originaltype='generatedPassword']
  > .two-line-wrapper
  > .ac-site-icon,
#PopupAutoComplete
  > richlistbox
  > richlistitem[originaltype='loginWithOrigin']
  > .two-line-wrapper
  > .ac-site-icon,
#PopupAutoComplete > richlistbox > richlistitem[originaltype='login'] > .ac-site-icon {
  list-style-image: url('passwords.svg') !important;
}

#nav-bar-overflow-button {
  list-style-image: url('chevron.svg') !important;
}

#zen-rice-share-options .options-header,
#PanelUI-zen-gradient-generator-color-page-right {
  list-style-image: url('arrow-right.svg');
}

#PanelUI-menu-button,
#appMenu-more-button2,
.zen-workspaces-actions,
#zen-workspace-actions-menu-icon {
  list-style-image: url('menu.svg') !important;
}

#appMenu-help-button2 {
  list-style-image: url('help.svg') !important;
}

#sync-button,
.urlbarView-row[source='tabs'] > .urlbarView-row-inner > .urlbarView-no-wrap > .urlbarView-favicon,
#urlbar-engine-one-off-item-tabs {
  list-style-image: url('tab.svg') !important;
}

#context-navigation > menuitem {
  padding: 4px;
}

#history-panelmenu,
.urlbarView-row[source='history']
  > .urlbarView-row-inner
  > .urlbarView-no-wrap
  > .urlbarView-favicon,
#urlbar-engine-one-off-item-history,
#appMenu-history-button,
#appMenu-library-history-button,
#sidebar-switcher-history,
#zen-history-button,
#sidebar-box[sidebarcommand='viewHistorySidebar']
  > #sidebar-header
  > #sidebar-switcher-target
  > #sidebar-icon {
  list-style-image: url('history.svg') !important;
}

#save-page-button,
#appMenu-save-file-button2 {
  list-style-image: url('save.svg') !important;
}

#print-button,
#appMenu-print-button2 {
  list-style-image: url('print.svg') !important;
}

.searchbar-search-icon {
  list-style-image: url('search-glass.svg') !important;
}

#find-button,
#appMenu-find-button2 {
  list-style-image: url('search-page.svg') !important;
}

#open-file-button {
  list-style-image: url('open.svg') !important;
}

#add-ons-button,
#appMenu-extensions-themes-button,
#appMenu-unified-extensions-button,
#unified-extensions-button {
  list-style-image: url('extension.svg') !important;
}

#zoom-out-button,
#appMenu-zoomReduce-button2 {
  list-style-image: url('zoom-out.svg') !important;
}

#zoom-in-button,
#tabs-newtab-button,
#zen-create-new-button,
#new-tab-button,
#appMenu-zoomEnlarge-button2,
#PanelUI-zen-profiles-newProfile,
#zen-sidebar-add-panel-button,
#PanelUI-zen-gradient-generator-color-custom-add image {
  list-style-image: url('plus.svg') !important;
}

#cut-button {
  list-style-image: url('edit-cut.svg') !important;
}

#copy-button {
  list-style-image: url('edit-copy.svg') !important;
}

#paste-button {
  list-style-image: url('edit-paste.svg') !important;
}

#email-link-button {
  list-style-image: url('mail.svg') !important;
}

#screenshot-button {
  list-style-image: url('screenshot.svg') !important;
}

#preferences-button,
#zen-preferences-button,
.search-setting-button > .button-box > .button-icon,
#appMenu-settings-button,
#PanelUI-zen-profiles-managePrfs,
.unified-extensions-item-open-menu.subviewbutton {
  list-style-image: url('settings.svg') !important;
}

#spell-check-enabled {
  list-style-image: url('spell-check.svg') !important;
}

#panic-button {
  list-style-image: url('forget.svg') !important;
}

#appMenu-new-private-window-button2,
#PanelUI-zen-profiles-privateWin {
  list-style-image: url('private-window.svg') !important;
}

#privatebrowsing-button {
  list-style-image: url('privateBrowsing.svg') !important;
}

#save-to-pocket-button {
  list-style-image: url('pocket-outline.svg') !important;
}

#profiler-button-button > .toolbarbutton-icon,
.subviewbutton[label='Task Manager'] {
  list-style-image: url('tool-profiler.svg') !important;
}

#developer-button {
  list-style-image: url('developer.svg') !important;
}

#new-window-button,
#appMenu-new-window-button2 {
  list-style-image: url('window.svg') !important;
}

#restore-button,
#fullscreen-button,
#zen-glance-sidebar-open,
#appMenu-fullscreen-button2,
.zen-tab-unsplit-button {
  list-style-image: url('fullscreen.svg') !important;
}

#restore-button[checked],
#fullscreen-button[checked],
#appMenu-fullscreen-button2[checked] {
  list-style-image: url('fullscreen-exit.svg') !important;
}

#bookmarks-menu-button,
#appMenu-bookmarks-button,
#sidebar-switcher-bookmarks,
#appMenu-library-bookmarks-button,
#sidebar-box[sidebarcommand='viewBookmarksSidebar']
  > #sidebar-header
  > #sidebar-switcher-target
  > #sidebar-icon {
  list-style-image: url('bookmark-star-on-tray.svg') !important;
}

#home-button {
  list-style-image: url('home.svg') !important;
}

#toggle_toolbar-menubar,
#appMenu_menu_openHelp {
  display: none;
}

#library-button {
  list-style-image: url('library.svg') !important;
}

/* identity icons */
#identity-icon {
  list-style-image: url('info.svg');
}

#identity-box[pageproxystate='valid'].chromeUI #identity-icon {
  filter: grayscale(1);
}

#identity-box[pageproxystate='valid'].localResource #identity-icon {
  list-style-image: url('page-portrait.svg') !important;
}

#urlbar:not(.searchButton)
  > #urlbar-input-container
  > #identity-box[pageproxystate='invalid']
  #identity-icon {
  list-style-image: url('search-glass.svg') !important;
}

#urlbar[actiontype='extension'] > #urlbar-input-container > #identity-box #identity-icon,
#identity-box[pageproxystate='valid'].extensionPage #identity-icon {
  list-style-image: url('extension.svg') !important;
}

#identity-box[pageproxystate='valid'].verifiedDomain #identity-icon,
#identity-box[pageproxystate='valid'].mixedActiveBlocked #identity-icon {
  list-style-image: url('security.svg') !important;
}

#urlbar-input-container[pageproxystate='valid']
  > #tracking-protection-icon-container
  > #tracking-protection-icon-box
  > #tracking-protection-icon {
  list-style-image: url('tracking-protection.svg') !important;
}

/* security */
.identity-popup-security-connection,
#appMenu-report-broken-site-button {
  list-style-image: url('security-broken.svg') !important;
}

#identity-box[pageproxystate='valid'].notSecure #identity-icon,
#identity-box[pageproxystate='valid'].mixedActiveContent #identity-icon,
#identity-box[pageproxystate='valid'].httpsOnlyErrorPage #identity-icon {
  list-style-image: url('security-broken.svg') !important;
}

#identity-popup[connection='chrome'] .identity-popup-security-connection {
  filter: grayscale(1);
}

#identity-popup[connection='file'] .identity-popup-security-connection {
  list-style-image: url('page-portrait.svg') !important;
}

#identity-popup[connection^='secure'] .identity-popup-security-connection {
  list-style-image: url('security.svg') !important;
}

#identity-popup[ciphers='weak'] .identity-popup-security-connection,
#identity-popup[mixedcontent~='passive-loaded'][isbroken] .identity-popup-security-connection,
#identity-popup[connection='secure-cert-user-overridden'] .identity-popup-security-connection,
#identity-popup[connection='cert-error-page'] .identity-popup-security-connection {
  list-style-image: url('security-warning.svg') !important;
}

#identity-popup[connection='net-error-page'] .identity-popup-security-connection {
  list-style-image: url('info.svg') !important;
}

#identity-popup[connection='extension'] .identity-popup-security-connection {
  list-style-image: url('extension.svg') !important;
}

#appMenu-new-tab-button2 {
  list-style-image: url('new-tab-image.svg') !important;
}

.findbar-find-previous {
  list-style-image: url('arrow-up.svg') !important;
}

.findbar-find-next {
  list-style-image: url('arrow-down.svg') !important;
}

.zen-workspace-actions-reorder-icon,
.zen-tab-rearrange-button {
  list-style-image: url('drag-indicator.svg') !important;
}

#protections-popup-mainView .subviewbutton-nav:not(.notFound)::after,
#identity-popup-mainView .subviewbutton-nav::after,
.widget-overflow-list .subviewbutton-nav::after,
.PanelUI-subView .subviewbutton-nav::after,
.menu-right {
  content: url('arrow-right.svg') !important;
}

#PlacesChevron,
#urlbar-go-button {
  list-style-image: url('arrow-right.svg') !important;
}

#zen-expand-sidebar-button {
  list-style-image: url('expand-sidebar.svg') !important;
}

.panel-header > .subviewbutton-back,
#PanelUI-zen-gradient-generator-color-page-left {
  list-style-image: url('arrow-left.svg') !important;
}

#overflowMenu-customize-button,
#appmenu-moreTools-button {
  list-style-image: url('customize.svg') !important;
}

#zen-copy-current-url-button {
  list-style-image: url('share.svg');
}

.bookmark-item[container] {
  list-style-image: url('folder.svg') !important;
}

#pageAction-panel-bookmark,
#star-button,
#zen-bookmark-button {
  list-style-image: url('bookmark-hollow.svg') !important;
}

#pageAction-panel-bookmark[starred],
#star-button[starred] {
  list-style-image: url('bookmark.svg') !important;
}

#zen-glance-sidebar-split {
  list-style-image: url('split.svg');

  &[disabled='true'] {
    opacity: 0.5;
    cursor: not-allowed;
  }
}

#sidebar-box[sidebarcommand='viewTabsSidebar']
  > #sidebar-header
  > #sidebar-switcher-target
  > #sidebar-icon,
#sidebar-switcher-tabs {
  list-style-image: url('send-to-device.svg') !important;
}

/* tab icons */
.tab-icon-image[src="chrome://branding/content/icon32.png"],
.tab-icon-image[src="chrome://browser/skin/privatebrowsing/favicon.svg"]
{
  content: url('new-tab-image.svg') !important;
}

.tab-icon-image[src="chrome://global/skin/icons/settings.svg"]
{
  content: url('settings.svg') !important;
}

.tab-icon-image[src="chrome://mozapps/skin/extensions/extension.svg"]
{
  content: url('extension.svg') !important;
}

.tab-icon-image[src="chrome://browser/skin/customize.svg"]
{
  content: url('customize.svg') !important;
}

/* permissions */
#permissions-granted-icon {
  list-style-image: url('permissions.svg') !important;
}

.geo-icon {
  list-style-image: url('geo.svg') !important;
}

.geo-icon.blocked-permission-icon {
  list-style-image: url('geo-blocked.svg') !important;
}

.xr-icon {
  list-style-image: url('xr.svg') !important;
}

.xr-icon.blocked-permission-icon {
  list-style-image: url('xr-blocked.svg') !important;
}

.popup-notification-icon[popupid='web-notifications'],
.desktop-notification-icon {
  list-style-image: url('desktop-notification.svg') !important;
}

.desktop-notification-icon.blocked-permission-icon {
  list-style-image: url('desktop-notification-blocked.svg') !important;
}

.camera-icon {
  list-style-image: url('camera.svg') !important;
}

.camera-icon.blocked-permission-icon {
  list-style-image: url('camera-blocked.svg') !important;
}

.microphone-icon {
  list-style-image: url('microphone.svg') !important;
}

.microphone-icon.blocked-permission-icon {
  list-style-image: url('microphone-blocked.svg') !important;
}

.screen-icon {
  list-style-image: url('screen.svg') !important;
}

.screen-icon.blocked-permission-icon {
  list-style-image: url('screen-blocked.svg') !important;
}

.popup-notification-icon[popupid='persistent-storage'],
.persistent-storage-icon,
.indexedDB-icon {
  list-style-image: url('persistent-storage.svg') !important;
}

.persistent-storage-icon.blocked-permission-icon {
  list-style-image: url('persistent-storage-blocked.svg') !important;
}

.popup-icon {
  list-style-image: url('popup.svg') !important;
}

.autoplay-media-icon {
  list-style-image: url('autoplay-media.svg') !important;
}

.autoplay-media-icon.blocked-permission-icon {
  list-style-image: url('autoplay-media-blocked.svg') !important;
}

#canvas-notification-icon,
.popup-notification-icon[popupid='canvas-permissions-prompt'],
.canvas-icon {
  list-style-image: url('canvas.svg') !important;
}

.canvas-icon.blocked-permission-icon {
  list-style-image: url('canvas-blocked.svg') !important;
}

.midi-icon,
.midi-sysex-icon,
.popup-notification-icon[popupid='midi'],
.popup-notification-icon[popupid='midi-sysex'] {
  list-style-image: url('midi.svg') !important;
}

.install-icon {
  list-style-image: url('extension.svg') !important;
}

.install-icon.blocked-permission-icon,
.popup-notification-icon[popupid='xpinstall-disabled'],
.popup-notification-icon[popupid='addon-install-blocked'],
.popup-notification-icon[popupid='addon-install-origin-blocked'] {
  list-style-image: url('extension-blocked.svg') !important;
}

/* tab sound icons */
.tab-icon-overlay[soundplaying] {
  list-style-image: url('tab-audio-playing-small.svg') !important;
  background-image: none !important;
  fill: white !important;
}

.tab-icon-overlay[muted] {
  list-style-image: url('tab-audio-muted-small.svg') !important;
  background-image: none !important;
  fill: white !important;
}

.tab-icon-overlay[activemedia-blocked] {
  list-style-image: url('tab-audio-blocked-small.svg') !important;
  background-image: none !important;
  fill: white !important;
}

/* reload/stop animation */
#stop-reload-button[animate]
  > #reload-button[displaystop]
  + #stop-button
  > .toolbarbutton-animatable-box
  > .toolbarbutton-animatable-image {
  background-image: url('reload-to-stop.svg') !important;
}

#stop-reload-button[animate]
  > #reload-button
  > .toolbarbutton-animatable-box
  > .toolbarbutton-animatable-image {
  background-image: url('stop-to-reload.svg') !important;
}

#reader-mode-button > .urlbar-icon {
  list-style-image: url('reader-mode.svg') !important;
}

#unified-extensions-manage-extensions {
  list-style-image: url('manage.svg') !important;
}

#appMenuRecentlyClosedTabs {
  list-style-image: url('container-tab.svg') !important;
}

#appMenuClearRecentHistory {
  list-style-image: url('edit-delete.svg') !important;
}

#appMenuRecentlyClosedWindows {
  list-style-image: url('window.svg') !important;
}

#appMenuSearchHistory {
  list-style-image: url('search-glass.svg') !important;
}

#PanelUI-historyMore {
  list-style-image: url('manage.svg') !important;
}

/* FIX header icons for the app menu sub menus (eg. fx account, history...) */
.panel-header > h1 {
  text-align: left;
  margin-left: 8px !important;
}

/* header icons for the app menu sub menus (eg. fx account, history...) */
.panel-header > h1 > span::before {
  content: '';
  background: var(--header-image, none) center / 16px no-repeat;
  -moz-context-properties: fill, fill-opacity;
  fill: currentColor;
  padding-inline-start: calc(var(--fp-enabled, 0) * 16px);
  margin-inline-end: calc(var(--fp-enabled, 0) * 8px);
}

#PanelUI-fxa .panel-header > h1 > span::before {
  --header-image: var(--avatar-image-url);
  --fp-enabled: 1;
  transform: scale(1.25);
  border-radius: 99px;
  display: inline-block;
  height: 16px;
}

#PanelUI-bookmarks .panel-header > h1 > span::before {
  --header-image: url('bookmark-star-on-tray.svg');
  --fp-enabled: 1;
}

#PanelUI-history .panel-header > h1 > span::before {
  --header-image: url('history.svg');
  --fp-enabled: 1;
}

#PanelUI-helpView .panel-header > h1 > span::before {
  --header-image: url('help.svg');
  --fp-enabled: 1;
}

#appMenu-libraryView .panel-header > h1 > span::before {
  --header-image: url('library.svg');
  --fp-enabled: 1;
}

#unified-extensions-panel .panel-header > h1 > span::before {
  --header-image: url('extension.svg');
  --fp-enabled: 1;
}

#alltabs-button {
  list-style-image: url('chrome://browser/skin/tabs.svg') !important;
}

#toolbar-context-toggle-vertical-tabs,
#toolbar-context-customize-sidebar,
#sidebarRevampSeparator {
  display: none !important;
}

#zen-media-playpause-button {
  list-style-image: url('media-play.svg');
}

#zen-media-controls-toolbar.playing #zen-media-playpause-button {
  list-style-image: url('media-pause.svg');
}

#zen-media-nexttrack-button {
  list-style-image: url('media-next.svg');
}

#zen-media-previoustrack-button {
  list-style-image: url('media-previous.svg');
}

#zen-media-controls-toolbar[muted] #zen-media-mute-button {
  list-style-image: url('media-mute.svg');
}

#zen-media-mute-button {
  list-style-image: url('media-unmute.svg');
}

#zen-media-close-button {
  list-style-image: url('close.svg');
}

#zen-media-focus-button:hover {
  list-style-image: url('screen.svg');
}

#zen-media-close-button {
  list-style-image: url('close.svg');
}

#zen-media-mute-mic-button {
  list-style-image: url('microphone-fill.svg');
}

#zen-media-controls-toolbar[mic-muted] #zen-media-mute-mic-button {
  list-style-image: url('microphone-blocked-fill.svg');
  fill: rgb(224, 41, 29);
}

#zen-media-mute-camera-button {
  list-style-image: url('video-fill.svg');
}

#zen-media-controls-toolbar[camera-muted] #zen-media-mute-camera-button {
  list-style-image: url('video-blocked-fill.svg');
  fill: rgb(224, 41, 29);
}

#zen-media-pip-button {
  list-style-image: url('chrome://global/skin/media/picture-in-picture-open.svg');
}

#zenCreateNewPopup > menuitem image {
  -moz-context-properties: fill;
  fill: currentColor;
}

#zen-create-new-button {
  border-radius: var(--tab-border-radius);

  &:hover {
    background: var(--toolbarbutton-hover-background);
  }

  & image {
    background: transparent !important;
  }
}

#PanelUI-zen-gradient-generator-scheme-auto {
  list-style-image: url('sparkles.svg');
}

@media -moz-pref('zen.view.window.scheme', 2) {
  #PanelUI-zen-gradient-generator-scheme-auto {
    background: light-dark(rgba(0, 0, 0, 0.1), rgba(255, 255, 255, 0.1));
  }
}

#PanelUI-zen-gradient-generator-scheme-dark {
  list-style-image: url('moon-stars.svg');
}

@media -moz-pref('zen.view.window.scheme', 0) {
  #PanelUI-zen-gradient-generator-scheme-dark {
    background: light-dark(rgba(0, 0, 0, 0.1), rgba(255, 255, 255, 0.1));
  }
}

#PanelUI-zen-gradient-generator-scheme-light {
  list-style-image: url('face-sun.svg');
}

@media -moz-pref('zen.view.window.scheme', 1) {
  #PanelUI-zen-gradient-generator-scheme-light {
    background: light-dark(rgba(0, 0, 0, 0.1), rgba(255, 255, 255, 0.1));
  }
}
