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

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

.tab-icon-image,
.tab-throbber {
  width: 16px;
  height: 16px;
}

.tabmail-tab {
  list-style-image: url("chrome://global/skin/tree/item.png");
}

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

.tabmail-tab:not(:hover):not([selected="true"]) > .tab-image-middle > .tab-icon-image {
  opacity: .6;
}

.tabmail-tab[type="glodaSearch"] {
  list-style-image: url("chrome://messenger/skin/icons/search-tab.png");
}

.tab-text {
  margin-top: 0 !important;
  margin-bottom: 0 !important;
  font: message-box;
  font-weight: bold;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.4);
}

.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% + 11px);
  margin: 0;
  padding: 1px 0 0;
  -moz-border-image: url(chrome://messenger/skin/tabs/tab-normal-active.png) 4 5 3 6 /
                     4px 5px 3px 6px repeat stretch;
  border-radius: 4px 4px 0 0;
  min-height: 23px;
}

.tabmail-tab[selected="true"] {
  -moz-border-image: url(chrome://messenger/skin/tabs/tab.png) 4 5 3 6 /
                     4px 5px 3px 6px repeat stretch;
}

.tabmail-tab[selected="true"]:not(:-moz-lwtheme) {
  background-color: -moz-mac-chrome-active;
}


.tabmail-tab[selected="true"]:not(:-moz-lwtheme):-moz-window-inactive {
  background-color: -moz-mac-chrome-inactive;
}

.tabmail-tab[selected="true"]:-moz-lwtheme {
  background: transparent;
}

.tabmail-tab:not([selected="true"]):hover {
  -moz-border-image: url(chrome://messenger/skin/tabs/tab-hover-active.png) 4 5 3 6 /
                     4px 5px 3px 6px repeat stretch;
}

/* preloading hack - required to prevent flicker on tabs startup */
#tabs-toolbar::after {
  content: '';
  display: block;
  background-image: url(tabs/tab-normal-active.png), url(tabs/tab-hover-active.png);
}

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

.tabmail-arrowscrollbox:-moz-lwtheme > .tabs-newtab-button {
  width: auto;
  -moz-box-flex: 1;
  -moz-box-pack: start;
  border-style: none;
  background: none;
}

.tabmail-tab:-moz-lwtheme-brighttext {
  -moz-border-left-colors: rgba(255,255,255,.1) rgba(255,255,255,.6) rgba(255,255,255,.2);
  -moz-border-top-colors: rgba(255,255,255,.1) rgba(255,255,255,.6) rgba(255,255,255,.2);
  -moz-border-right-colors: rgba(255,255,255,.1) rgba(255,255,255,.6) rgba(255,255,255,.2);
}

.tabmail-tab:-moz-lwtheme-brighttext[selected="true"] {
  -moz-border-left-colors: rgba(255,255,255,.6);
  -moz-border-top-colors: rgba(255,255,255,.6);
  -moz-border-right-colors: rgba(255,255,255,.6);
}

.tabmail-tab[selected="true"]:focus > .tab-text {
  outline: 2px solid #4F8EC9;
  outline-offset: -2px;
  -moz-outline-radius: 3px;
}

.tabmail-tab[selected="true"],
.tabmail-tab:hover {
  color: #000000;
}

.tabmail-tabs {
  border: none;
  -moz-box-pack: center;
  -moz-box-align: center;
  height: 23px;
  margin-bottom: 0;
}

.tabs-left {
  display: -moz-box;
  width: 3px;
}

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

tabmail > tabbox > tabpanels {
  -moz-appearance: none !important;
}


/**
 * Tab Drag and Drop
 */

.tab-drop-indicator {
  list-style-image: url(chrome://messenger/skin/tabs/tabDragIndicator.png);
  margin-bottom: -8px;
}

/**
 * In-tab close button
 */

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

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

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

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

.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;
}

.tabmail-arrowscrollbox > .scrollbutton-up,
.tabmail-arrowscrollbox > .scrollbutton-down-stack > .scrollbutton-down:-moz-locale-dir(rtl) {
  border: 0;
  border-right: 2px solid;
  -moz-border-right-colors: rgba(0,0,0,0.25) rgba(255,255,255,0.15);
  list-style-image: url("chrome://messenger/skin/tabs/tab-arrow-start.png");
  -moz-image-region: rect(0px, 7px, 11px, 0px);
  padding: 0;
  width: 16px;
  margin: 0;
}

.tabmail-arrowscrollbox > .scrollbutton-down-stack > .scrollbutton-down:-moz-locale-dir(rtl) {
  -moz-border-end: none;
}

.tabmail-arrowscrollbox > .scrollbutton-up:hover {
  background-color: rgba(0,0,0,0.10);
}

.tabmail-arrowscrollbox > .scrollbutton-up:hover:active {
  background-color: rgba(0,0,0,0.20);
}

.tabmail-arrowscrollbox > .scrollbutton-up[disabled="true"],
.tabmail-arrowscrollbox > .scrollbutton-down-stack > .scrollbutton-down[disabled="true"]:-moz-locale-dir(rtl) {
  -moz-image-region: rect(0px, 28px, 11px, 21px);
  background-color: transparent !important; 
}

.tabmail-arrowscrollbox .scrollbutton-down,
.tabmail-arrowscrollbox > .scrollbutton-up:-moz-locale-dir(rtl) {
  border-left: 2px solid;
  -moz-border-left-colors: rgba(0,0,0,0.25) rgba(255,255,255,0.15);
  list-style-image: url("chrome://messenger/skin/tabs/tab-arrow-end.png");
  -moz-image-region: rect(0px, 44px, 11px, 37px);
  -moz-padding-start: 2px;
  -moz-padding-end: 0;
  width: 16px;
  margin: 0;
}

.tabmail-arrowscrollbox > .scrollbutton-up:-moz-locale-dir(rtl) {
  -moz-border-start: none;
}

.tabmail-arrowscrollbox .scrollbutton-down:hover {
  background-color: rgba(0,0,0,0.10);
}

.tabmail-arrowscrollbox .scrollbutton-down:hover:active {
  background-color: rgba(0,0,0,0.20);
}

.tabmail-arrowscrollbox > .scrollbutton-down-stack > .scrollbutton-down[disabled="true"],
.tabmail-arrowscrollbox > .scrollbutton-up[disabled="true"]:-moz-locale-dir(rtl) {
  -moz-image-region: rect(0px, 23px, 11px, 16px);
  background-color: transparent !important;
}


/**
 * New Tab & All Tabs Buttons
 */

.tabs-alltabs-box {
  margin: 0;
}

.tabs-newtab-button ,
.tabs-alltabs-button {
  margin: 0;
  padding: 0 4px;
}
.tabs-newtab-button {
  list-style-image: url(chrome://messenger/skin/tabs/newtab.png);
}
.tabs-alltabs-button {
  padding-top: 2px;
  list-style-image: url(chrome://messenger/skin/tabs/alltabs-box-bkgnd-icon.png);
}
.tabs-newtab-button:hover ,
.tabs-alltabs-button:hover {
  background-color: rgba(0,0,0,0.10);
}
.tabs-newtab-button:hover:active,
.tabs-alltabs-button:hover:active,
.tabs-alltabs-button[open="true"] {
  background-color: rgba(0,0,0,0.20);
}

.tabs-newtab-button > .toolbarbutton-text ,
.tabs-alltabs-button > .toolbarbutton-menu-dropmarker ,
.tabs-alltabs-button > .toolbarbutton-text {
  display: none;
}

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

.tabs-alltabs-box-animate {
  margin: 1px 0px 0px;
  width: 25px;
  background-image: url("chrome://messenger/skin/tabs/alltabs-box-overflow-bkgnd-animate.png");
  background-repeat: no-repeat;
  opacity: 0.0;
}

/**
 * All Tabs Menupopup 
 */

.alltabs-item {
  list-style-image: url("chrome://global/skin/tree/item.png");
}

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

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

.tabs-closebutton {
  -moz-padding-end: 4px;
  list-style-image: url("chrome://global/skin/icons/close.png") !important;
  list-style-image: none;
  border: none;
  -moz-box-align: stretch;
  -moz-image-region: rect(0, 16px, 16px, 0);
}

.tabs-closebutton:hover > .toolbarbutton-icon {
  background-image: none !important;
}

.tabs-closebutton:hover:active {
  -moz-image-region: rect(0, 48px, 16px, 32px);
}

tabpanels.plain {
  background-color: transparent;
}

/* Content Tabs */

.contentTabToolbox {
  -moz-appearance: none;
  border: 0;
}

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

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

.contentTabToolbox:-moz-lwtheme {
  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 {
  -moz-appearance: none !important;
  min-height: 0px;
  padding: 0;
}
