%if 0
/* 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/. */
%endif
%define WINDOWS_AERO
%include primaryToolbar.css
%undef WINDOWS_AERO

.mail-toolbox > toolbar {
  -moz-margin-start: 0;
  border-bottom: none;
  /* force iconsize="small" on these toolbars */
  counter-reset: smallicons;
}

.mail-toolbox > toolbar:not(:-moz-lwtheme),
#navigation-toolbox > toolbar:not(:-moz-lwtheme),
.contentTabToolbox:not(:-moz-lwtheme) > toolbar:not(:-moz-lwtheme) {
  -moz-appearance: none;
  border-style: none;
  background-color: transparent;
}

@media (-moz-windows-default-theme) and (-moz-os-version: windows-vista),
       (-moz-windows-default-theme) and (-moz-os-version: windows-win7) {
  .mail-toolbox:not(:-moz-lwtheme),
  .contentTabToolbox:not(:-moz-lwtheme) {
    background-color: hsl(210, 75%, 92%);
  }
}

.chromeclass-toolbar {
  /* Toolbar buttons have a margin of 3px; adjust the toolbar so the leftmost
     button lines up with the rest of the window. */
  -moz-margin-start: -3px;
}

/* ::::: primary toolbar buttons ::::: */

.toolbarbutton-1:not([type="menu-button"]),
.toolbarbutton-1 > .toolbarbutton-menubutton-button,
.toolbarbutton-1 > .toolbarbutton-menubutton-dropmarker {
  padding: 1px 5px !important;
}

.toolbarbutton-1 {
  min-height: 24px;
}

.findbar-button {
  padding: 2px 6px;
}

@media not all and (-moz-windows-default-theme) {
  #messengerWindow[tabsintitlebar] #mail-menubar > menu {
    -moz-appearance: none;
  }
}

@media (-moz-windows-default-theme) and (-moz-os-version: windows-vista),
       (-moz-windows-default-theme) and (-moz-os-version: windows-win7) {
  .findbar-button,
  .toolbarbutton-1:not([type="menu-button"]),
  .toolbarbutton-1 > .toolbarbutton-menubutton-button,
  .toolbarbutton-1 > .toolbarbutton-menubutton-dropmarker {
    -moz-appearance: none;
    background: hsla(210, 32%, 93%, 0) padding-box;
    border-radius: 2px;
    border: 1px solid;
    border-color: hsla(210, 54%, 20%, 0) hsla(210, 54%, 20%, 0)
                  hsla(210, 54%, 20%, 0);
    box-shadow: 0 1px hsla(0, 0%, 100%, 0) inset,
                0 1px hsla(210, 54%, 20%, 0),
                0 0 2px hsla(210, 54%, 20%, 0);
    transition-property: background-color, border-color, box-shadow;
    transition-duration: 150ms;
  }

  .toolbarbutton-1 > .toolbarbutton-menubutton-button:-moz-locale-dir(ltr),
  .toolbarbutton-1 > .toolbarbutton-menubutton-dropmarker:-moz-locale-dir(rtl) {
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
  }

  .toolbarbutton-1 > .toolbarbutton-menubutton-button:-moz-locale-dir(rtl),
  .toolbarbutton-1 > .toolbarbutton-menubutton-dropmarker:-moz-locale-dir(ltr) {
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
  }

  .findbar-button:not(:-moz-any([checked="true"],[disabled="true"])):hover,
  .toolbarbutton-1:not([disabled="true"]):-moz-any(:hover,[open="true"]) >
  .toolbarbutton-menubutton-button,
  .toolbarbutton-1:not([disabled="true"]):hover >
  .toolbarbutton-menubutton-dropmarker,
  .toolbarbutton-1:not([type="menu-button"]):not([disabled="true"]):not([checked="true"]):not([open="true"]):not(:active):hover {
    color: -moz-DialogText;
    background-image: linear-gradient(hsla(0, 0%, 100%, .6),
                      hsla(0, 0%, 100%, .1));
    background-color: hsla(210, 32%, 93%, .2);
    border-color: hsla(210, 54%, 20%, .15) hsla(210, 54%, 20%, .2)
                  hsla(210, 54%, 20%, .25);
    box-shadow: 0 1px hsla(0, 0%, 100%, .3) inset,
                0 1px hsla(210, 54%, 20%, .03),
                0 0 2px hsla(210, 54%, 20%, .1);
  }

  .toolbarbutton-1 >
  .toolbarbutton-menubutton-button:not([disabled="true"]):not([open="true"]):not(:active):hover,
  .toolbarbutton-1:not([buttonover="true"]):not([open="true"]):not(:active):hover >
  .toolbarbutton-menubutton-dropmarker:not([disabled="true"]) {
    border-color: hsla(210, 54%, 20%, .3) hsla(210, 54%, 20%, .35)
                  hsla(210, 54%, 20%, .4);
    background-color: hsla(210, 48%, 96%, .75);
    box-shadow: 0 0 1px hsla(210, 54%, 20%, .03),
                0 0 2px hsla(210, 54%, 20%, .1);
  }

  .findbar-button:not([disabled=true]):-moz-any([checked="true"],:hover:active),
  .toolbarbutton-1 > .toolbarbutton-menubutton-button:not([disabled="true"]):hover:active,
  .toolbarbutton-1[open="true"] > .toolbarbutton-menubutton-dropmarker:not([disabled="true"]),
  .toolbarbutton-1:not([type="menu-button"]):not([disabled="true"]):-moz-any([open="true"],[checked="true"],:hover:active) {
    background-image: linear-gradient(hsla(0, 0%, 100%, .6),
                      hsla(0, 0%, 100%, .1));
    background-color: hsla(210, 54%, 20%, .15);
    border-color: hsla(210, 54%, 20%, .3) hsla(210, 54%, 20%, .35)
                  hsla(210, 54%, 20%, .4);
    box-shadow: 0 1px 1px hsla(210, 54%, 20%, .1) inset,
                0 0 1px hsla(210, 54%, 20%, .2) inset,
                0 1px 0 hsla(210, 54%, 20%, 0),
                0 0 2px hsla(210, 54%, 20%, 0);
    text-shadow: none;
    transition: none;
  }

  .toolbarbutton-1:not([disabled="true"]):-moz-any(:hover,[open="true"]) >
  .toolbarbutton-menubutton-dropmarker {
    -moz-border-start-color: hsla(210, 54%, 20%, .35);
  }

  .toolbarbutton-1[checked=true]:not(:active):hover {
    background-color: rgba(90%, 90%, 90%, .4);
    transition: background-color .4s;
  }
}

@media (-moz-os-version: windows-win8),
       (-moz-os-version: windows-win10) {
  .findbar-button,
  .toolbarbutton-1:not([type="menu-button"]),
  .toolbarbutton-1 > .toolbarbutton-menubutton-button,
  .toolbarbutton-1 > .toolbarbutton-menubutton-dropmarker {
    -moz-appearance: none;
    border: 1px solid;
    border-color: transparent;
    transition-property: background-color, border-color;
    transition-duration: 150ms;
  }

  .toolbarbutton-1[type="menu-button"] {
    -moz-appearance: none;
  }

  .findbar-button:not(:-moz-any([checked="true"],[disabled="true"])):hover,
  .toolbarbutton-1:not([disabled=true]):-moz-any(:hover,[open]) >
  .toolbarbutton-menubutton-button,
  .toolbarbutton-1:not([disabled=true]):-moz-any(:hover,[open]) >
  .toolbarbutton-menubutton-dropmarker,
  .toolbarbutton-1:not([disabled=true]):not([checked=true]):not([open]):not(:active):hover,
  .toolbarbutton-1:not([buttonover]):not([open]):not(:active):hover >
  .toolbarbutton-menubutton-dropmarker:not([disabled]) {
    color: -moz-DialogText;
    background-color: hsla(210, 4%, 10%, .08);
    border-color: hsla(210, 4%, 10%, .1);
  }

  .findbar-button:not([disabled=true]):-moz-any([checked="true"],:hover:active),
  .toolbarbutton-1 >
  .toolbarbutton-menubutton-button:not([disabled=true]):hover:active,
  .toolbarbutton-1[open] >
  .toolbarbutton-menubutton-dropmarker:not([disabled=true]),
  .toolbarbutton-1:not([type="menu-button"]):not([disabled]):-moz-any([open],:hover:active) {
    background-color: hsla(210, 4%, 10%, .12);
    border-color: hsla(210, 4%, 10%, .1);
    border-top-color: hsla(210, 4%, 10%, .2);
    box-shadow: 0 1px 0 0 hsla(210, 4%, 10%, .1) inset;
    transition-duration: 10ms;
  }

  .toolbarbutton-1[checked=true]:not([type="menu-button"]):not([disabled]) {
    background-color: hsla(210, 4%, 10%, .12);
    border-color: hsla(210, 4%, 10%, .2);
    box-shadow: 0 1px 1px hsla(210, 4%, 10%, .1) inset,
                0 0 1px hsla(210, 4%, 10%, .2) inset,
                0 1px 0 hsla(210, 4%, 10%, 0),
                0 0 2px hsla(210, 4%, 10%, 0);
    text-shadow: none;
    transition: none;
  }

  .toolbarbutton-1[checked=true]:not(:active):hover {
    background-color: rgba(90%, 90%, 90%, .4);
    transition: background-color .4s;
  }
}

@media (-moz-windows-default-theme) {
  /* Separator between menu and split type buttons */
  .toolbarbutton-1:not(:hover):not(:active):not([open]):not([checked]) >
  .toolbarbutton-menubutton-dropmarker::before,
  .toolbarbutton-1[disabled="true"] >
  .toolbarbutton-menubutton-dropmarker::before {
    content: "";
    display: -moz-box;
    width: 1px;
    height: 18px;
    -moz-margin-start: -4px;
    -moz-margin-end: 3px;
    background: hsla(210, 54%, 20%, .2) padding-box;
    box-shadow: 0 0 0 1px hsla(0, 0%, 100%, .2);
  }

  .toolbarbutton-1[type="menu-button"] {
    -moz-appearance: none;
    border: none;
    padding: 0 !important;
    background: none !important;
    box-shadow: none !important;
  }

  .toolbarbutton-1:not([type="menu-button"]),
  .toolbarbutton-1 > .toolbarbutton-menubutton-button,
  .toolbarbutton-1 > .toolbarbutton-menubutton-dropmarker {
    -moz-box-pack: center;
  }

  .toolbarbutton-1,
  .toolbarbutton-1[type="menu-button"] {
    margin: 1px;
  }

  toolbar[mode="icons"] .toolbarbutton-menubutton-button,
  toolbar[mode="icons"] .toolbarbutton-1:not([type="menu-button"]) {
    -moz-padding-start: 6px !important;
    -moz-padding-end: 6px !important;
  }

  .toolbarbutton-1 > .toolbarbutton-menubutton-dropmarker {
    -moz-box-align: center;
  }

  .toolbarbutton-1 > .toolbarbutton-menubutton-button {
    -moz-border-end: none;
  }

  .toolbarbutton-1 > .toolbarbutton-menubutton-dropmarker {
    padding: 1px 3px !important;
  }

  .toolbarbutton-1 .toolbarbutton-menu-dropmarker,
  .toolbarbutton-1 > .toolbarbutton-menubutton-dropmarker {
    list-style-image: url("chrome://messenger/skin/icons/toolbarbutton-arrow.png");
  }

  /* Let the Customize window's menulist stay a system menulist */
  #modelist {
    -moz-appearance: menulist;
    margin: 2px 4px;
    padding: 0 !important;
  }
}

.toolbarbutton-1[disabled=true] .toolbarbutton-icon,
.toolbarbutton-1[disabled=true] .toolbarbutton-menu-dropmarker,
.toolbarbutton-1[disabled=true] > .toolbarbutton-menubutton-dropmarker,
.toolbarbutton-1[disabled=true] > .toolbarbutton-menubutton-button >
.toolbarbutton-icon {
  opacity: .4;
}

.toolbarbutton-menubutton-button > .toolbarbutton-icon,
.toolbarbutton-1 .toolbarbutton-icon {
  width: 18px;
  height: 18px;
}

toolbox[labelalign="end"] > toolbar[mode="full"] .toolbarbutton-1 .toolbarbutton-text {
  -moz-padding-end: 2px;
}

/* ::::: toolbar buttons on tabbar toolbar ::::: */

#tabbar-toolbar .toolbarbutton-1,
#tabbar-toolbar .toolbarbutton-menubutton-button,
#tabbar-toolbar .toolbarbutton-menubutton-dropmarker {
  margin: 0 0 -1px;
  padding: 0 3px !important;
  border: none;
  border-radius: 0;
  background: none;
  box-shadow: none;
}

#tabbar-toolbar .toolbarbutton-menubutton-button,
#tabbar-toolbar .toolbarbutton-menubutton-dropmarker {
  margin: 0;
}

#tabbar-toolbar .toolbarbutton-1 > .toolbarbutton-menubutton-dropmarker::before {
  display: none;
}

#tabbar-toolbar .toolbarbutton-1:not([disabled]):hover,
#tabbar-toolbar .toolbarbutton-1:not([disabled])[checked="true"],
#tabbar-toolbar toolbarbutton[type="menu-button"]:hover >
                .toolbarbutton-menubutton-dropmarker:not([disabled="true"]) {
  background-image: linear-gradient(rgba(255, 255, 255, 0),
                    rgba(255, 255, 255, .5)),
                    linear-gradient(transparent, rgba(0, 0, 0, .25) 30%),
                    linear-gradient(transparent, rgba(0, 0, 0, .25) 30%);
  background-position: 1px -1px, 0 -1px, 100% -1px;
  background-size: calc(100% - 2px) 100%, 1px 100%, 1px 100%;
  background-repeat: no-repeat;
}

#tabbar-toolbar .toolbarbutton-menubutton-button:not([disabled]):hover {
  background-image: linear-gradient(rgba(255, 255, 255, 0),
                    rgba(255, 255, 255, .5)),
                    linear-gradient(transparent, rgba(0, 0, 0, .25) 30%);
  background-position: 1px -1px, 0 -1px;
  background-size: calc(100% - 1px) 100%, 1px 100%;
  background-repeat: no-repeat;
}

#tabbar-toolbar
  .toolbarbutton-menubutton-button:not([disabled]):hover:-moz-locale-dir(rtl) {
  background-position: 1px -1px, 100% -1px;
}

@media (-moz-windows-default-theme) and (-moz-windows-compositor) {
  #navigation-toolbox:not(:-moz-lwtheme),
  #tabs-toolbar {
    background-color: transparent;
  }

  #mail-toolbox:not(:-moz-lwtheme),
  #navigation-toolbox:not(:-moz-lwtheme),
  .glodaTabToolbar {
    color: black;
  }

  #mail-toolbar-menubar2 {
    background-image: linear-gradient(rgba(253, 253, 253, 0.45),
                                      rgba(253, 253, 253, 0.45));
    box-shadow: 0 1px 0 rgba(253, 253, 253, 0.45) inset;
    padding-bottom: 1px;
    padding-top: 2px;
  }

  #messengerWindow[tabsintitlebar][sizemode="normal"] #mail-toolbar-menubar2 {
    margin-top: 0;
  }

  #navigation-toolbox > #mail-toolbar-menubar2:not(:-moz-lwtheme) {
    background-color: -moz-dialog;
    border-bottom: 1px solid ThreeDShadow;
  }

  #messengerWindow[tabsintitlebar][sizemode="normal"] > #navigation-toolbox >
  #tabs-toolbar {
    margin-top: 16px !important;
  }

  #messengerWindow[tabsintitlebar][sizemode="maximized"] > #navigation-toolbox >
  #tabs-toolbar {
    margin-top: 0 !important;
  }

  #tabs-toolbar {
    -moz-box-ordinal-group: 10;
  }

  #mail-toolbar-menubar2 {
    -moz-box-ordinal-group: 20;
  }
}

@media (-moz-windows-glass) {
  #mail-toolbox:not(:-moz-lwtheme),
  .contentTabToolbox:not(:-moz-lwtheme) {
    box-shadow: 0 1px 0 rgba(253, 253, 253, 0.45) inset,
                0 -1px 0 #AABCCF inset;
  }

  #navigation-toolbox > #mail-toolbar-menubar2:not(:-moz-lwtheme) {
    background-color: hsl(210, 75%, 92%);
    border-bottom: 1px solid #AABCCF;
  }

  #tabs-toolbar:not(:-moz-lwtheme) {
    position: relative;
  }

  #tabs-toolbar:not(:-moz-lwtheme)::before {
    box-shadow: 0 0 30px 30px rgba(174, 189, 204, 0.85);
    content: "";
    display: -moz-box;
    height: 0;
    margin: 0 60px; /* (30px + 30px) from box-shadow */
    position: absolute;
    pointer-events: none;
    top: 50%;
    width: -moz-available;
    z-index: -1;
  }
}

@media not all and (-moz-windows-compositor) {
  @media (-moz-windows-default-theme) {
    #messengerWindow {
      background-color: rgb(185, 209, 234);
    }
    #messengerWindow:-moz-window-inactive {
      background-color: rgb(215, 228, 242);
    }

    #mail-toolbar-menubar2:not([autohide=true]):not(:-moz-lwtheme),
    #tabs-toolbar:not(:-moz-lwtheme) {
      -moz-binding: url("chrome://global/content/bindings/toolbar.xml#toolbar-drag");
      background-color: transparent;
    }
    #mail-toolbar-menubar2[autohide=true] {
      background-color: transparent !important;
    }

    /* Render a window top border for lwthemes: */
    #messengerWindow[tabsintitlebar][sizemode="normal"]
    #titlebar-content:-moz-lwtheme {
      background-image: linear-gradient(to bottom, rgb(37, 44, 51) 0,
                                        rgb(37, 44, 51) 1px,
                                        rgba(255,255,255,.6) 1px,
                                        rgba(255,255,255,.6) 2px, transparent 2px);
    }

    #messengerWindow[tabsintitlebar][sizemode="normal"]
    #titlebar-content:-moz-lwtheme:-moz-window-inactive {
      background-image: linear-gradient(to bottom, rgb(102, 102, 102) 0,
                                        rgb(102, 102, 102) 1px,
                                        rgba(255,255,255,.6) 1px,
                                        rgba(255,255,255,.6) 2px, transparent 2px);
    }
  }

  #print-preview-toolbar:not(:-moz-lwtheme) {
    -moz-appearance: -moz-win-browsertabbar-toolbox;
  }
}

@media (-moz-os-version: windows-win8),
       (-moz-os-version: windows-win10) {
  @media not all and (-moz-windows-default-theme) {
    #messengerWindow:not([tabsintitlebar]) #tabs-toolbar:not(:-moz-lwtheme),
    #messengerWindow:not([tabsintitlebar]) #mail-menubar >
      menu:not(:-moz-lwtheme) {
      color: CaptionText;
    }

    #messengerWindow:not([tabsintitlebar])
      #tabs-toolbar:not(:-moz-lwtheme):-moz-window-inactive,
    #messengerWindow:not([tabsintitlebar]) #mail-menubar >
      menu:not(:-moz-lwtheme):-moz-window-inactive {
      color: InactiveCaptionText;
    }

    #messengerWindow:not([tabsintitlebar]) #mail-menubar > menu {
      -moz-appearance: none;
    }
  }
}

toolbar[brighttext] .toolbarbutton-1 .toolbarbutton-menu-dropmarker,
toolbar[brighttext] .toolbarbutton-1 > .toolbarbutton-menubutton-dropmarker {
  list-style-image: url("chrome://messenger/skin/icons/toolbarbutton-arrow-inverted.png");
}

#button-getmsg {
  list-style-image: url("chrome://messenger/skin/icons/mail-toolbar.svg#getmsg");
}

#button-newmsg {
  list-style-image: url("chrome://messenger/skin/icons/mail-toolbar.svg#newmsg");
}

#button-address {
  list-style-image: url("chrome://messenger/skin/icons/mail-toolbar.svg#address");
}

#button-reply {
  list-style-image: url("chrome://messenger/skin/icons/mail-toolbar.svg#reply");
}

#button-replyall {
  list-style-image: url("chrome://messenger/skin/icons/mail-toolbar.svg#replyall");
}

#button-replylist {
  list-style-image: url("chrome://messenger/skin/icons/mail-toolbar.svg#replylist");
}

#button-forward {
  list-style-image: url("chrome://messenger/skin/icons/mail-toolbar.svg#forward");
}

.delete-button {
  list-style-image: url("chrome://messenger/skin/icons/mail-toolbar.svg#delete");
}

.junk-button {
  list-style-image: url("chrome://messenger/skin/icons/mail-toolbar.svg#junk");
}

#button-print {
  list-style-image: url("chrome://messenger/skin/icons/mail-toolbar.svg#print");
}

#button-stop {
  list-style-image: url("chrome://messenger/skin/icons/mail-toolbar.svg#stop");
}

#button-file {
  list-style-image: url("chrome://messenger/skin/icons/mail-toolbar.svg#file");
}

#button-nextUnread {
  list-style-image: url("chrome://messenger/skin/icons/mail-toolbar.svg#nextUnread");
}

#button-previousUnread {
  list-style-image: url("chrome://messenger/skin/icons/mail-toolbar.svg#previousUnread");
}

#button-mark {
  list-style-image: url("chrome://messenger/skin/icons/mail-toolbar.svg#mark");
}

#button-tag {
  list-style-image: url("chrome://messenger/skin/icons/mail-toolbar.svg#tag");
}

#button-goback {
  list-style-image: url("chrome://messenger/skin/icons/mail-toolbar.svg#goback");
}

#button-goforward {
  list-style-image: url("chrome://messenger/skin/icons/mail-toolbar.svg#goforward");
}

#button-compact {
  list-style-image: url("chrome://messenger/skin/icons/mail-toolbar.svg#compact");
}

#button-archive {
  list-style-image: url("chrome://messenger/skin/icons/mail-toolbar.svg#archive");
}

#button-chat {
  list-style-image: url("chrome://messenger/skin/icons/mail-toolbar.svg#chat");
}

#button-nextMsg {
  list-style-image: url("chrome://messenger/skin/icons/mail-toolbar.svg#nextMsg");
}

#button-previousMsg {
  list-style-image: url("chrome://messenger/skin/icons/mail-toolbar.svg#previousMsg");
}

#qfb-show-filter-bar {
  list-style-image: url("chrome://messenger/skin/icons/mail-toolbar.svg#filter");
}

.button-appmenu {
  list-style-image: url("chrome://messenger/skin/icons/mail-toolbar.svg#appButton");
}

toolbar[brighttext] #button-getmsg {
  list-style-image: url("chrome://messenger/skin/icons/mail-toolbar.svg#getmsg-inverted");
}

toolbar[brighttext] #button-newmsg {
  list-style-image: url("chrome://messenger/skin/icons/mail-toolbar.svg#newmsg-inverted");
}

toolbar[brighttext] #button-address {
  list-style-image: url("chrome://messenger/skin/icons/mail-toolbar.svg#address-inverted");
}

toolbar[brighttext] #button-reply {
  list-style-image: url("chrome://messenger/skin/icons/mail-toolbar.svg#reply-inverted");
}

toolbar[brighttext] #button-replyall {
  list-style-image: url("chrome://messenger/skin/icons/mail-toolbar.svg#replyall-inverted");
}

toolbar[brighttext] #button-replylist {
  list-style-image: url("chrome://messenger/skin/icons/mail-toolbar.svg#replylist-inverted");
}

toolbar[brighttext] #button-forward {
  list-style-image: url("chrome://messenger/skin/icons/mail-toolbar.svg#forward-inverted");
}

toolbar[brighttext] .delete-button {
  list-style-image: url("chrome://messenger/skin/icons/mail-toolbar.svg#delete-inverted");
}

toolbar[brighttext] .junk-button {
  list-style-image: url("chrome://messenger/skin/icons/mail-toolbar.svg#junk-inverted");
}

toolbar[brighttext] #button-print {
  list-style-image: url("chrome://messenger/skin/icons/mail-toolbar.svg#print-inverted");
}

toolbar[brighttext] #button-stop {
  list-style-image: url("chrome://messenger/skin/icons/mail-toolbar.svg#stop-inverted");
}

toolbar[brighttext] #button-file {
  list-style-image: url("chrome://messenger/skin/icons/mail-toolbar.svg#file-inverted");
}

toolbar[brighttext] #button-next > #button-nextUnread {
  list-style-image: url("chrome://messenger/skin/icons/mail-toolbar.svg#nextUnread-inverted");
}

toolbar[brighttext] #button-previous > #button-previousUnread {
  list-style-image: url("chrome://messenger/skin/icons/mail-toolbar.svg#previousUnread-inverted");
}

toolbar[brighttext] #button-mark {
  list-style-image: url("chrome://messenger/skin/icons/mail-toolbar.svg#mark-inverted");
}

toolbar[brighttext] #button-tag {
  list-style-image: url("chrome://messenger/skin/icons/mail-toolbar.svg#tag-inverted");
}

toolbar[brighttext] #button-goback {
  list-style-image: url("chrome://messenger/skin/icons/mail-toolbar.svg#goback-inverted");
}

toolbar[brighttext] #button-goforward {
  list-style-image: url("chrome://messenger/skin/icons/mail-toolbar.svg#goforward-inverted");
}

toolbar[brighttext] #button-compact {
  list-style-image: url("chrome://messenger/skin/icons/mail-toolbar.svg#compact-inverted");
}

toolbar[brighttext] #button-archive {
  list-style-image: url("chrome://messenger/skin/icons/mail-toolbar.svg#archive-inverted");
}

toolbar[brighttext] #button-chat {
  list-style-image: url("chrome://messenger/skin/icons/mail-toolbar.svg#chat-inverted");
}

toolbar[brighttext] #button-nextMsg {
  list-style-image: url("chrome://messenger/skin/icons/mail-toolbar.svg#nextMsg-inverted");
}

toolbar[brighttext] #button-previousMsg {
  list-style-image: url("chrome://messenger/skin/icons/mail-toolbar.svg#previousMsg-inverted");
}

toolbar[brighttext] #qfb-show-filter-bar {
  list-style-image: url("chrome://messenger/skin/icons/mail-toolbar.svg#filter-inverted");
}

toolbar[brighttext] .button-appmenu {
  list-style-image: url("chrome://messenger/skin/icons/mail-toolbar.svg#appButton-inverted");
}

toolbar > #button-chat[unreadMessages="true"] {
  list-style-image: url("chrome://messenger/skin/icons/mail-toolbar.svg#chat-unread");
}

.button-appmenu {
  min-width: 35px !important;
}

toolbar:not([mode="text"]) > #button-chat > stack,
toolbar:not([mode="text"]) > toolbarpaletteitem > #button-chat > stack {
  margin: 1px;
}

toolbar[iconsize="large"]:not([mode="text"]) .badgeButton-badge {
  -moz-margin-start: 7px;
  margin-bottom: 7px;
}

#palette-box .toolbarbutton-1,
#palette-box .toolbarbutton-menubutton-button,
#palette-box .toolbarbutton-menubutton-dropmarker {
  border: none;
  background: none;
  box-shadow: none;
}

#palette-box #qfb-show-filter-bar {
  list-style-image: url("chrome://messenger/skin/icons/mail-toolbar.svg#filter");
}

/* remove the small icons checkbox in Customize window */
#smallicons {
  display: none;
}

/* AppMenu styling */

.splitmenu-menuitem {
  -moz-padding-end: 0.5em;
}

@media (-moz-os-version: windows-win8),
       (-moz-os-version: windows-win10) {
  #appmenuSecondaryPane {
    --appMenu-bg-color: -moz-dialog;
    --appMenu-bg-box-shadow: ThreeDShadow;
  }
}

@media (-moz-windows-default-theme) {
  #appmenuPrimaryPane menupopup {
    -moz-appearance: none;
    background-image: linear-gradient(to right, white 26px, ThreeDLightShadow 26px,
                                      ThreeDLightShadow 27px, ThreeDHighlight 27px,
                                      ThreeDHighlight 28px, white 28px);
    border: 3px solid;
    -moz-border-top-colors: ThreeDShadow white;
    -moz-border-bottom-colors: ThreeDShadow white;
    -moz-border-left-colors: ThreeDShadow white;
    -moz-border-right-colors: ThreeDShadow white;
  }

  #appmenuSecondaryPane menupopup {
    -moz-appearance: none;
    background-image: linear-gradient(to right, var(--appMenu-bg-color) 26px,
                                      ThreeDLightShadow 26px, ThreeDLightShadow 27px,
                                      ThreeDHighlight 27px, ThreeDHighlight 28px,
                                      var(--appMenu-bg-color) 28px);
    border: 3px solid;
    -moz-border-top-colors: ThreeDShadow var(--appMenu-bg-color);
    -moz-border-bottom-colors: ThreeDShadow var(--appMenu-bg-color);
    -moz-border-left-colors: ThreeDShadow var(--appMenu-bg-color);
    -moz-border-right-colors: ThreeDShadow var(--appMenu-bg-color);
  }

  #appmenuPrimaryPane menupopup:-moz-locale-dir(rtl) {
    background-image: linear-gradient(to left, white 26px, ThreeDLightShadow 26px,
                                      ThreeDLightShadow 27px, ThreeDHighlight 27px,
                                      ThreeDHighlight 28px, white 28px);
  }
  #appmenuSecondaryPane menupopup:-moz-locale-dir(rtl) {
    background-image: linear-gradient(to left, var(--appMenu-bg-color) 26px,
                                      ThreeDLightShadow 26px, ThreeDLightShadow 27px,
                                      ThreeDHighlight 27px, ThreeDHighlight 28px,
                                      var(--appMenu-bg-color) 28px);
  }

  /* Hi-DPI overrides of the menu backgrounds, to adjust where the gutter line falls */
  @media (min-resolution: 1.25dppx) {
    #appmenuPrimaryPane menupopup {
      background-image: linear-gradient(to right, white 22.4px, ThreeDLightShadow 22.4px,
                                        ThreeDLightShadow 23.2px, ThreeDHighlight 23.2px,
                                        ThreeDHighlight 24px, white 24px);
    }
    #appmenuSecondaryPane menupopup {
      background-image: linear-gradient(to right, var(--appMenu-bg-color) 22.4px,
                                        ThreeDLightShadow 22.4px, ThreeDLightShadow 23.2px,
                                        ThreeDHighlight 23.2px, ThreeDHighlight 24px,
                                        var(--appMenu-bg-color) 24px);
    }
    #appmenuPrimaryPane menupopup:-moz-locale-dir(rtl) {
      background-image: linear-gradient(to left, white 22.4px, ThreeDLightShadow 22.4px,
                                        ThreeDLightShadow 23.2px, ThreeDHighlight 23.2px,
                                        ThreeDHighlight 24px, white 24px);
    }
    #appmenuSecondaryPane menupopup:-moz-locale-dir(rtl) {
      background-image: linear-gradient(to left, var(--appMenu-bg-color) 22.4px,
                                        ThreeDLightShadow 22.4px, ThreeDLightShadow 23.2px,
                                        ThreeDHighlight 23.2px, ThreeDHighlight 24px,
                                        var(--appMenu-bg-color) 24px);
    }
  }

  @media (min-resolution: 1.5dppx) {
    #appmenuPrimaryPane menupopup {
      background-image: linear-gradient(to right, white 20.6667px, ThreeDLightShadow 20.6667px,
                                        ThreeDLightShadow 21.3333px, ThreeDHighlight 21.3333px,
                                        ThreeDHighlight 22px, white 22px);
    }
    #appmenuSecondaryPane menupopup {
      background-image: linear-gradient(to right, var(--appMenu-bg-color) 20.6667px,
                                        ThreeDLightShadow 20.6667px, ThreeDLightShadow 21.3333px,
                                        ThreeDHighlight 21.3333px, ThreeDHighlight 22px,
                                        var(--appMenu-bg-color) 22px);
    }
    #appmenuPrimaryPane menupopup:-moz-locale-dir(rtl) {
      background-image: linear-gradient(to left, white 20.6667px, ThreeDLightShadow 20.6667px,
                                        ThreeDLightShadow 21.3333px, ThreeDHighlight 21.3333px,
                                        ThreeDHighlight 22px, white 22px);
    }
    #appmenuSecondaryPane menupopup:-moz-locale-dir(rtl) {
      background-image: linear-gradient(to left, var(--appMenu-bg-color) 20.6667px,
                                        ThreeDLightShadow 20.6667px, ThreeDLightShadow 21.3333px,
                                        ThreeDHighlight 21.3333px, ThreeDHighlight 22px,
                                        var(--appMenu-bg-color) 22px);
    }
  }

  @media (min-resolution: 2dppx) {
    #appmenuPrimaryPane menupopup {
      background-image: linear-gradient(to right, white 19.5px, ThreeDLightShadow 19.5px,
                                        ThreeDLightShadow 20px, ThreeDHighlight 20px,
                                        ThreeDHighlight 20.5px, white 20.5px);
    }
    #appmenuSecondaryPane menupopup {
      background-image: linear-gradient(to right, var(--appMenu-bg-color) 19.5px,
                                        ThreeDLightShadow 19.5px, ThreeDLightShadow 20px,
                                        ThreeDHighlight 20px, ThreeDHighlight 20.5px,
                                        var(--appMenu-bg-color) 20.5px);
    }
    #appmenuPrimaryPane menupopup:-moz-locale-dir(rtl) {
      background-image: linear-gradient(to left, white 19.5px, ThreeDLightShadow 19.5px,
                                        ThreeDLightShadow 20px, ThreeDHighlight 20px,
                                        ThreeDHighlight 20.5px, white 20.5px);
    }
    #appmenuSecondaryPane menupopup:-moz-locale-dir(rtl) {
      background-image: linear-gradient(to left, var(--appMenu-bg-color) 19.5px,
                                        ThreeDLightShadow 19.5px, ThreeDLightShadow 20px,
                                        ThreeDHighlight 20px, ThreeDHighlight 20.5px,
                                        var(--appMenu-bg-color) 20.5px);
    }
  }

  @media (min-resolution: 1.25dppx) {
    .appmenu-menuseparator {
      -moz-margin-start: 25px;
    }
  }
  @media (min-resolution: 1.5dppx) {
    .appmenu-menuseparator {
      -moz-margin-start: 24px;
    }
  }
  @media (min-resolution: 2dppx) {
    .appmenu-menuseparator {
      -moz-margin-start: 22px;
    }
  }
}

@media (min-resolution: 1.25dppx) {
  #appmenu_addons {
    list-style-image: url("chrome://mozapps/skin/extensions/extensionGeneric.png");
  }
}
