/* ***** 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):
 *
 * 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-arrowscrollbox {
  margin-bottom: -1px;
 }

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

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

#tabpanelcontainer:-moz-lwtheme {
  color: inherit;
}

/**
 * Tab
 */

.tabmail-tab {
  -moz-appearance: none;
  background: -moz-linear-gradient(bottom, rgba(10%, 10%, 10%, .4) 1px,
              transparent 1px), -moz-linear-gradient(transparent,
              hsla(0, 0%, 45%, .1) 1px, hsla(0, 0%, 32%, .2) 80%,
              hsla(0, 0%, 0%, .2)),
              -moz-linear-gradient(-moz-dialog, -moz-dialog);
  background-origin: border-box;
  background-position: 1px 2px;
  background-size: -moz-calc(100% - 2px) -moz-calc(100% - 2px);
  background-repeat: no-repeat;
  margin: 0;
  padding: 0 0 3px;
  -moz-border-image: url(icons/tab.png) 4 3 0 / 4px 3px 0 repeat stretch;
  height: 26px;
  border-radius: 0;
}

.tabmail-tab:not(:-moz-lwtheme):not([selected="true"]):hover {
  background-image: -moz-linear-gradient(bottom, rgba(10%, 10%, 10%, .4) 1px,
                    transparent 1px), -moz-linear-gradient(hsla(0, 0%, 100%, .3) 1px,
                    hsla(0, 0%, 75%, .2) 80%, hsla(0, 0%, 60%, .2)),
                    -moz-linear-gradient(-moz-dialog, -moz-dialog);
}

.tabmail-tab[selected="true"]:not(:-moz-lwtheme) {
  background-image: -moz-linear-gradient(rgba(255, 255, 255, .7),
                    rgba(255, 255, 255, .5) 30%),
                    -moz-linear-gradient(-moz-dialog, -moz-dialog);
  color: -moz-dialogText;
}

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

.tabmail-tab[selected="true"]:-moz-lwtheme {
  background-image: -moz-linear-gradient(rgba(255, 255, 255, .7),
                    rgba(255, 255, 255, .5) 50%);
}

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

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

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

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

.tabmail-tab > .tab-image-middle {
  padding-top: 1px;
  -moz-padding-start: 1px;
}

.tabmail-tab[busy],
.tabmail-tab[thinking] {
  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("chrome://global/skin/icons/Search-glass.png");
}

.tabmail-tab[selected="true"] > .tab-image-middle > .tab-text {
  opacity: 1.0 !important;
}

.tabmail-arrowscrollbox > .scrollbutton-up:-moz-lwtheme-brighttext,
.tabmail-arrowscrollbox > .scrollbutton-down:-moz-lwtheme-brighttext,
.tabs-alltabs-button:-moz-lwtheme-brighttext,
.tabs-closebutton:-moz-lwtheme-brighttext {
  background-color: rgba(0,0,0,.5);
}

.tabmail-arrowscrollbox > .scrollbutton-up:-moz-lwtheme-darktext,
.tabmail-arrowscrollbox > .scrollbutton-down:-moz-lwtheme-darktext,
.tabs-alltabs-button:-moz-lwtheme-darktext,
.tabs-closebutton:-moz-lwtheme-darktext {
  background-color: rgba(255,255,255,.5);
}

.tabmail-tabs:-moz-lwtheme {
  padding-top: 1px;
  background-color: transparent;
  background-image: none;
}

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

.tabmail-tab {
  list-style-image: url("chrome://global/skin/icons/folder-item.png");
  -moz-image-region: rect(0px, 16px, 16px, 0px);
}

tabpanels {
  -moz-appearance: none;
  background-color: transparent;
}

.tabs-left,
.tabs-right {
  width: 3px;
  border-bottom-width: 0px;
}

/* tabmail-tab focus ring */
.tabmail-tab >  .tab-image-middle > .tab-text {
  border: 1px dotted transparent;
}

.tabmail-tab:focus > .tab-image-middle > .tab-text {
  border: 1px dotted -moz-DialogText;
}

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

/**
 * close buttons
 */

.tabs-closebutton-box {
  margin-top: 2px;
  margin-bottom: 4px;
}

.tab-close-button > .toolbarbutton-icon {
  -moz-margin-end: 0px !important;
  margin-top: 1px;
}

.tab-close-button,
.tabs-closebutton {
  -moz-appearance: none;
  -moz-image-region: rect(0, 64px, 16px, 48px);
  border: none !important;
  padding: 0px;
  cursor: default;
  list-style-image: url("chrome://global/skin/icons/close.png");
}

.tabs-closebutton {
  padding: 0 2px;
}

.tabmail-tab:not([selected="true"]) > .tab-close-button {
  margin-bottom: 1px;
}

.tabmail-tab:not([selected="true"]) > .tab-close-button > .toolbarbutton-icon {
  margin-top: 2px;
}

.tab-close-button:hover,
.tabs-closebutton:hover,
.tabmail-tab[selected="true"] > .tab-close-button:hover {
  -moz-image-region: rect(0, 32px, 16px, 16px);
  opacity: 1.0;
}

.tab-close-button:hover:active,
.tabs-closebutton:hover:active,
.tabmail-tab[selected="true"] > .tab-close-button:hover:active {
  -moz-image-region: rect(0, 48px, 16px, 32px);
  opacity: 1.0;
}

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

.tab-close-button:focus,
.tabs-closebutton:focus {
  outline: none !important;
}

/**
 * Tab Scrollbox Arrow Buttons
 */

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

.tabmail-arrowscrollbox > .scrollbutton-up {
  margin-top: 1px;
  margin-bottom: 1px;
  padding: 0 0 3px;
  width: 18px;
  height: 23px;
  -moz-margin-start: 0px;
  -moz-margin-end: 2px;
  list-style-image: url(chrome://messenger/skin/icons/tab-arrow-left.png);
}

.tabmail-arrowscrollbox > .scrollbutton-up > .toolbarbutton-icon {
  margin: 2px 0px 0px;
}

.tabmail-arrowscrollbox > .scrollbutton-down-stack {
  height: 23px;
  margin-top: 1px;
  margin-bottom: 1px;
  -moz-margin-start: 2px;
}

.tabmail-arrowscrollbox > stack > .scrollbutton-down-box {
  width: 18px;
}

.tabmail-arrowscrollbox > stack > .scrollbutton-down {
  width: 18px;
  margin: 0px;
  padding: 0 0 3px;
  list-style-image: url(chrome://messenger/skin/icons/tab-arrow-left.png);
}

.tabmail-arrowscrollbox > stack > .scrollbutton-down > .toolbarbutton-icon {
  margin-top: 2px;
  margin-bottom: 0px;
  -moz-margin-start: 1px;
  -moz-margin-end: 0px;
}

.tabmail-arrowscrollbox > .scrollbutton-up:-moz-lwtheme-brighttext,
.tabmail-arrowscrollbox > stack > .scrollbutton-down:-moz-lwtheme-brighttext {
  list-style-image: url(chrome://messenger/skin/icons/tab-arrow-left-inverted.png);
}

.tabmail-arrowscrollbox > .scrollbutton-up[disabled],
.tabmail-arrowscrollbox > stack > .scrollbutton-down[disabled] {
  opacity: .4;
}

.tabmail-arrowscrollbox > .scrollbutton-up:-moz-locale-dir(rtl),
.tabmail-arrowscrollbox > stack > .scrollbutton-down:-moz-locale-dir(ltr) {
  -moz-transform: scaleX(-1);
}

/**
 * All Tabs Button
 */

.tabs-alltabs-button {
  margin-top: 1px;
  margin-bottom: 1px;
  width: 18px !important;
  height: 23px !important;
  -moz-padding-start: 4px !important;
  -moz-padding-end: 4px !important;
  padding: 0px;
}

.tabs-alltabs-button > .toolbarbutton-text {
  display: none;
}

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

.tabs-alltabs-button > .toolbarbutton-menu-dropmarker {
  -moz-margin-end: 3px !important;
  list-style-image: url(chrome://messenger/skin/icons/mainwindow-dropdown-arrow.png);
  -moz-image-region: rect(0, 13px, 11px, 0);
}

.tabs-alltabs-button > .toolbarbutton-menu-dropmarker:-moz-lwtheme-brighttext {
  list-style-image: url(chrome://messenger/skin/icons/mainwindow-dropdown-arrow-inverted.png);
}

/**
 * All Tabs Menupopup
 */

.alltabs-item {
  list-style-image: url("chrome://global/skin/icons/folder-item.png");
  -moz-image-region: rect(0px, 16px, 16px, 0px);
}

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

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

/* Content Tabs */
.contentTabToolbox {
  -moz-appearance: none;
  height: 0px;
  border: 0;
}

.contentTabInstance[disablechrome] .contentTabToolbox {
  display: none;
}

.contentTabToolbox:not(:-moz-lwtheme) {
  height: 3px;
  border-bottom: 1px solid rgb(105, 105, 105);
}

.contentTabToolbox:-moz-lwtheme {
  height: 1px;
  background-image: -moz-linear-gradient(rgba(255, 255, 255, 0.5), rgba(255, 255, 255, 0.5) 50%);
  background-color: rgba(255, 255, 255, 0.3);
}

.contentTabToolbar {
  height: 0px;
  min-height: 0px;
}
