/* ***** BEGIN LICENSE BLOCK *****
 * Version: MPL 1.1/GPL 2.0/LGPL 2.1
 *
 * The contents of this file are subject to the Mozilla Public License Version
 * 1.1 (the "License"); you may not use this file except in compliance with
 * the License. You may obtain a copy of the License at
 * http://www.mozilla.org/MPL/
 *
 * Software distributed under the License is distributed on an "AS IS" basis,
 * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
 * for the specific language governing rights and limitations under the
 * License.
 *
 * The Original Code is tabmail
 * The Initial Developer of the Original Code is
 *   Scott MacGregor <mscott@mozilla.org>.
 * Portions created by the Initial Developer are Copyright (C) 2007
 * the Initial Developer. All Rights Reserved.
 *
 * Contributor(s):
 *   Magnus Melin <mkmelin+mozilla@iki.fi>
 *
 * Alternatively, the contents of this file may be used under the terms of
 * either the GNU General Public License Version 2 or later (the "GPL"), or
 * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
 * in which case the provisions of the GPL or the LGPL are applicable instead
 * of those above. If you wish to allow use of your version of this file only
 * under the terms of either the GPL or the LGPL, and not to allow others to
 * use your version of this file under the terms of the MPL, indicate your
 * decision by deleting the provisions above and replace them with the notice
 * and other provisions required by the GPL or the LGPL. If you do not delete
 * the provisions above, a recipient may use your version of this file under
 * the terms of any one of the MPL, the GPL or the LGPL.
 *
 * ***** END LICENSE BLOCK ***** */

/**
 * Tabmail Tabs
 */

.tabmail-tabs:not(:-moz-lwtheme) {
  -moz-appearance: menubar;
}

.tabmail-tabs[overflow="true"] {
  -moz-padding-start: 0px;
}

.tabmail-tabs[overflow="true"] .tabs-left {
  display: none;
}

.tabmail-tabs > .tabmail-tab:first-child > .tab-close-button {
  visibility: collapse;
}

tabpanels {
  -moz-appearance: none;
}

/**
 * Tab
 */

.tabmail-tab {
  position: static;
  -moz-appearance: none;
  background: -moz-linear-gradient(hsla(0, 0%, 100%, .2),
              hsla(0, 0%, 45%, .2) 1px, hsla(0, 0%, 32%, .2) 50%);
  background-position: -5px -2px;
  background-repeat: no-repeat;
  background-size: -moz-calc(100% + 11px) -moz-calc(100% + 7px);
  margin: 0;
  padding: 0;
  -moz-border-image: url(chrome://messenger/skin/icons/tab.png) 4 5 3 6 /
                     4px 5px 3px 6px repeat stretch;
  border-radius: 10px 8px 0 0;
  min-height: 25px; /* reserve space for the sometimes hidden close button */
}

.tabmail-tab:not(:-moz-lwtheme) {
  color: MenuText;
}

.tabmail-tab:hover {
  background-image: -moz-linear-gradient(hsla(0, 0%, 100%, .6),
                    hsla(0, 0%, 100%, .2) 2px, hsla(0, 0%, 75%, .2) 50%);
}
 
 .tabmail-tab[selected="true"] {
  color: -moz-DialogText;
  font-weight: bold;
  background-image: -moz-linear-gradient(rgba(255, 255, 255, .8),
                    rgba(255, 255, 255, .5) 2px, rgba(255, 255, 255, .3) 20%,
                    rgba(255, 255, 255, 0) 80%),
                    -moz-linear-gradient(-moz-dialog, -moz-dialog);
}

.tabmail-tab[selected="true"]:-moz-lwtheme {
  background-image: -moz-linear-gradient(rgba(255, 255, 255, .8),
                    rgba(255, 255, 255, .5) 2px, rgba(255, 255, 255, .3) 20%);
}

.tabmail-tab:-moz-lwtheme-brighttext:not([selected="true"]) {
  background-image: -moz-linear-gradient(hsla(0, 0%, 60%, .6),
                    hsla(0, 0%, 40%, .6) 2px, hsla(0, 0%, 30%, .6) 50%);
}

.tabmail-tab:-moz-lwtheme-brighttext:not([selected="true"]):hover {
  background-image: -moz-linear-gradient(hsla(0, 0%, 80%, .6),
                    hsla(0, 0%, 60%, .6) 2px, hsla(0, 0%, 45%, .6) 50%);
}

.tabmail-tab:-moz-lwtheme-darktext:not([selected="true"]) {
  background-image: -moz-linear-gradient(hsla(0, 0%, 100%, .5),
                    hsla(0, 0%, 60%, .5) 2px, hsla(0, 0%, 45%, .5) 50%);
}

.tabmail-tab:-moz-lwtheme-darktext:not([selected="true"]):hover {
  background-image: -moz-linear-gradient(hsla(0, 0%, 100%, .5),
                    hsla(0, 0%, 80%, .5) 2px, hsla(0, 0%, 60%, .5) 50%);
}

.tabmail-tab:-moz-lwtheme {
  color: inherit;
  text-shadow: none;
}

.tabmail-tab:-moz-lwtheme:not([selected="true"]) {
  opacity: .85;
}

.tab-icon-image,
.tab-throbber {
  width: 16px;
  height: 16px;
  -moz-margin-end: 3px;
}

.tabmail-tab {
  list-style-image: url("moz-icon://stock/gtk-file?size=menu");
}

.tab-throbber {
  list-style-image: url("chrome://global/skin/icons/loading_16.png") !important;
  -moz-image-region: auto !important;
}

.tabmail-tab[type="glodaSearch"] {
  list-style-image: url(moz-icon://stock/gtk-find?size=menu);
}

.tabs-bottom {
  border-bottom: 1px solid threedshadow;
}

.tabmail-tab > .tab-text {
  /* tabmail-tab focus ring */
  border: 1px dotted transparent;
  margin: -1px !important; /* let the border not consume any space, like outline */
}

.tabmail-tab[selected="true"]:focus > .tab-image-middle > .tab-text {
  border: 1px dotted -moz-DialogText;
}

/* Tab drag and drop */
.tab-drop-indicator {
  list-style-image: url(chrome://messenger/skin/icons/tabDragIndicator.png);
  margin-top: -11px;
}

/* In-tab close button */
.tab-close-button > .toolbarbutton-icon {
  /* XXX Buttons have padding in widget/ that we don't want here but can't
     override with good CSS, so we must use evil CSS to give the
     impression of smaller content. */
  margin: -3px !important;
}

.tab-close-button {
  margin-top: -1px;
  margin-bottom: -1px;
  -moz-margin-end: -1px;
  padding: 0px;
  border: none;
  list-style-image: url("moz-icon://stock/gtk-close?size=menu");
  -moz-image-region: auto;
}

.tabmail-tab[selected="true"] > .tab-close-button {
  /* Make this button focusable so clicking on it will not focus the tab while
     it's getting closed. */
  -moz-user-focus: normal;
}

/**
 * Tab Scrollbox Arrow Buttons
 */

/* Tabstrip close button */
.tabs-closebutton {
  list-style-image: url("moz-icon://stock/gtk-close?size=menu");
  border: none;
  margin-bottom: 1px;
}

.tabmail-arrowscrollbox > .scrollbutton-up {
  -moz-appearance: tab-scroll-arrow-back;
  margin: 0px;
}

.tabmail-arrowscrollbox > .scrollbutton-down-stack > .scrollbutton-down {
  -moz-appearance: tab-scroll-arrow-forward;
  margin: 0px;
}

.tabs-alltabs-box-animate {
  background-color: Highlight;
  opacity: 0.0;
}

/* All tabs menupopup */
.alltabs-item {
  list-style-image: url("moz-icon://stock/gtk-file?size=menu");
}

.alltabs-item[selected="true"] {
  font-weight: bold;
}

.alltabs-item[busy] {
  list-style-image: url("chrome://global/skin/icons/loading_16.png") !important;
  -moz-image-region: auto !important;
}

.tabs-alltabs-button {
  margin-bottom: 1px;
}

.tabs-alltabs-button > .toolbarbutton-menu-dropmarker {
  -moz-appearance: none !important;
  margin-bottom: -1px;
  -moz-padding-start: 0 !important;
  list-style-image: url("chrome://messenger/skin/icons/dropmarker.svg");
}

.tabs-alltabs-button:hover > .toolbarbutton-menu-dropmarker {
  list-style-image: url("chrome://messenger/skin/icons/dropmarker-hover.svg");
}

.tabs-alltabs-button > .toolbarbutton-icon {
  display: none;
  -moz-margin-end: 0;
}

.alltabs-item > .menu-iconic-left {
  visibility: visible !important;
}
