/* ***** 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 mozilla.org code.
 *
 * The Initial Developer of the Original Code is
 * Netscape Communications Corporation.
 * Portions created by the Initial Developer are Copyright (C) 1998-1999
 * the Initial Developer. All Rights Reserved.
 *
 * Contributor(s):
 *   Joe Hewitt (hewitt@netscape.com)
 *   Jason Kersey (kerz@netscape.com)
 *   Pierre Chanial (chanial@noos.fr)
 *   Dean Tessman (dean_tessman@hotmail.com)
 *   Blake Ross (blake@cs.stanford.edu)
 *   Pamela Greene (pamg.bugs@gmail.com)
 *   Dão Gottwald (dao@mozilla.com)
 *   Florian Quèze (florian@instantbird.org)
 *
 * 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 ***** */

/* Tabstrip */
.tabbrowser-tabs {
  -moz-appearance: -moz-win-browsertabbar-toolbox;
  background: -moz-dialog url("chrome://instantbird/skin/tabbrowser/tabbrowser-tabs-bkgnd.png") repeat-x;
}

.tabs-container:not([overflow="true"]) {
  padding: 0 3px;
}

/* Tabs */
.tabbrowser-tab {
  -moz-appearance: none;
  background: url("chrome://instantbird/skin/tabbrowser/tab-bkgnd.png") repeat-x;
  height: 22px;
  margin: 3px 0px 4px;
  padding: 0px 1px 1px 0px;
  border: 2px solid;
  border-right-width: 1px;
  border-bottom: none;
  -moz-border-radius-topleft: 2px;
  -moz-border-radius-topright: 2px;
  -moz-border-top-colors: ThreeDShadow rgba(255,255,255,.3);
  -moz-border-right-colors: rgba(0,0,0,.1);
  -moz-border-left-colors: ThreeDShadow rgba(255,255,255,.3);
}

.tabbrowser-tab:hover,
.tabbrowser-tab[selected="true"] {
  border-width: 1px;
  height: 23px;
  -moz-border-radius-topleft: 4px;
  -moz-border-radius-topright: 4px;
  -moz-border-top-colors: ThreeDShadow;
  -moz-border-right-colors: ThreeDShadow;
  -moz-border-left-colors: ThreeDShadow;
}

.tabbrowser-tab:not([selected="true"]):hover {
  margin: 2px 0px 4px;
  padding: 2px 1px 1px;
  background-image: url("chrome://instantbird/skin/tabbrowser/tab-hover-bkgnd.png");
}

.tabbrowser-tab[selected="true"] {
  margin: 2px 0px 3px;
  padding: 1px;
  background-image: url("chrome://instantbird/skin/tabbrowser/tab-active-bkgnd.png");
  background-color: -moz-dialog;
  font-weight: bold;
}

.tab-icon-image {
  margin-top: 1px;
  -moz-margin-start: 7px;
  -moz-margin-end: 3px;
  width: 16px;
  height: 16px;
  -moz-image-region: rect(0px, 16px, 16px, 0px);
}

.tabs-bottom {
  height: 4px;
  margin: 0px;
  background: -moz-dialog url("chrome://instantbird/skin/tabbrowser/tabstrip-bottom.png") repeat;
  border-top: 1px solid threedshadow;
  border-bottom: 1px solid threedshadow;
}

tabpanels {
  -moz-appearance: none;
}

/* tabbrowser-tab focus ring */
.tab-text {
  border: 1px dotted transparent;
}

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

/* Tab DnD indicator */
.tab-drop-indicator-bar {
  height: 11px;
  margin-top: -11px;
  position: relative;
  /* set -moz-margin-start to -1/2 indicator width: */
  -moz-margin-start: -5px;
  -moz-margin-end: -8px;
}

.tab-drop-indicator {
  margin-top: 11px;
  height: 11px;
  width: 11px;
  margin-bottom: -11px;
  position: relative;
  background: url('chrome://instantbird/skin/tabbrowser/tabDragIndicator.png') 50% 50% no-repeat;
}

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

.tab-close-button {
  -moz-appearance: none;
  -moz-image-region: rect(0px, 64px, 16px, 48px);
  -moz-margin-end: 6px;
  border: none;
  padding: 0px;
  list-style-image: url("chrome://global/skin/icons/close.png");
}

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

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

.tabbrowser-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 {
  outline: none !important;
}

/* Tab scrollbox arrow, tabstrip new tab and all-tabs buttons */
.tabbrowser-arrowscrollbox > .scrollbutton-up,
.tabbrowser-arrowscrollbox > .scrollbutton-down,
.tabs-newtab-button,
.tabs-alltabs-button {
  -moz-appearance: none;
  width: 18px;
  margin: 3px 0px 4px;
  padding: 0px;
  border: 2px solid;
  border-right-width: 1px;
  border-bottom: none;
  -moz-border-top-colors: ThreeDShadow rgba(255,255,255,.3);
  -moz-border-right-colors: ThreeDShadow;
  -moz-border-left-colors: ThreeDShadow rgba(255,255,255,.3);
  background: url("chrome://instantbird/skin/tabbrowser/tab-bkgnd.png") repeat-x;
  -moz-image-region: rect(0, 11px, 14px, 0);
}

.tabbrowser-arrowscrollbox > .scrollbutton-up:not([disabled="true"]):hover,
.tabbrowser-arrowscrollbox > .scrollbutton-down:not([disabled="true"]):hover,
.tabs-newtab-button:hover,
.tabs-alltabs-button:hover {
  border-top-width: 1px;
  padding-top: 1px;
  -moz-border-top-colors: ThreeDShadow;
  -moz-border-right-colors: ThreeDShadow;
  -moz-border-left-colors: ThreeDShadow transparent;
  background-image: url("chrome://instantbird/skin/tabbrowser/tab-hover-bkgnd.png");
}

.tabbrowser-arrowscrollbox > .scrollbutton-up,
.tabbrowser-arrowscrollbox > .scrollbutton-down {
  -moz-image-region: rect(0, 15px, 17px, 0);
}

.tabbrowser-arrowscrollbox > .scrollbutton-up:not([disabled="true"]):hover,
.tabbrowser-arrowscrollbox > .scrollbutton-down:not([disabled="true"]):hover {
  -moz-image-region: rect(0, 30px, 17px, 15px);
}

.tabbrowser-arrowscrollbox > .scrollbutton-up[disabled="true"],
.tabbrowser-arrowscrollbox > .scrollbutton-down[disabled="true"] {
  opacity: .4;
}

.tabbrowser-arrowscrollbox > .scrollbutton-up:not([disabled="true"]):hover:active,
.tabbrowser-arrowscrollbox > .scrollbutton-down:not([disabled="true"]):hover:active {
  -moz-image-region: rect(0, 45px, 17px, 30px);
}

.tabbrowser-arrowscrollbox > .scrollbutton-up {
  border-left-style: none;
  list-style-image: url("chrome://instantbird/skin/tabbrowser/tab-arrow-left.png");
  -moz-border-radius-topright: 2px;
}

.tabbrowser-arrowscrollbox > .scrollbutton-up[chromedir="rtl"] {
  border-left-style: solid;
  border-right-style: none;
  -moz-border-radius-topleft: 2px;
  -moz-border-radius-topright: 0px;
  list-style-image: url("chrome://instantbird/skin/tabbrowser/tab-arrow-right.png");
}

.tabbrowser-arrowscrollbox > .scrollbutton-down,
.tabs-container > .tabs-newtab-button,
.tabs-alltabs-button {
  border-right-style: none;
  -moz-border-radius-topleft: 2px;
}

.tabbrowser-arrowscrollbox > .scrollbutton-down {
  list-style-image: url("chrome://instantbird/skin/tabbrowser/tab-arrow-right.png");
}

.tabbrowser-arrowscrollbox > .scrollbutton-down[chromedir="rtl"],
.tabs-container > .tabs-newtab-button[chromedir="rtl"],
.tabs-container > stack[chromedir="rtl"] > .tabs-alltabs-button {
  border-left-style: none;
  border-right-style: solid;
  -moz-border-radius-topleft: 0px;
  -moz-border-radius-topright: 2px;
}

.tabbrowser-arrowscrollbox > .scrollbutton-down[chromedir="rtl"] {
  list-style-image: url("chrome://instantbird/skin/tabbrowser/tab-arrow-left.png");
}

.tabs-newtab-button {
  list-style-image: url(chrome://instantbird/skin/tabbrowser/newtab.png);
  -moz-image-region: rect(0, 18px, 18px, 0);
}

.tabs-newtab-button:hover:active {
  -moz-image-region: rect(0, 36px, 18px, 18px);
}

.tabbrowser-arrowscrollbox > .tabs-newtab-button {
  width: 31px;
  -moz-border-radius-topright: 2px;
  -moz-border-radius-topleft: 2px;
}

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

.tabs-alltabs-button {
  width: 17px;
}

.tabs-alltabs-button > .toolbarbutton-icon {
  list-style-image: url("chrome://instantbird/skin/tabbrowser/mainwindow-dropdown-arrow.png");
  margin: 5px 0 4px;
  -moz-image-region: rect(0, 13px, 11px, 0);
}

.tabs-alltabs-button[open="true"] > .toolbarbutton-icon {
  -moz-image-region: rect(0, 26px, 11px, 13px);
}

.tabs-alltabs-box-animate {
  margin-top: 2px;
  margin-bottom: 4px;
  width: 17px !important;
  background-image: url("chrome://instantbird/skin/tabbrowser/alltabs-box-overflow-end-bkgnd-animate.png");
  background-repeat: no-repeat;
  opacity: 0.0;
}

stack[chromedir="rtl"] > hbox > .tabs-alltabs-box-animate {
  background-image: url("chrome://instantbird/skin/tabbrowser/alltabs-box-overflow-start-bkgnd-animate.png");
}

/* All tabs menupopup */
.alltabs-item > .menu-iconic-left > .menu-iconic-icon {
  -moz-image-region: rect(0px, 16px, 16px, 0px);
}

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

/* Tabstrip close button */
.tabs-closebutton {
  -moz-appearance: none;
  list-style-image: url("chrome://global/skin/icons/close.png");
  -moz-image-region: rect(0px, 16px, 16px, 0px);
  padding: 4px 2px;
  margin: 0px;
  border: none;
}

.tabs-closebutton > .toolbarbutton-icon {
  -moz-margin-end: 0px !important;
  -moz-padding-end: 2px !important;
  -moz-padding-start: 2px !important;
}

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

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

.tabs-container > .tabs-closebutton {
  margin: 3px 0px 3px;
  padding: 4px 2px 2px;
  background: -moz-dialog url("chrome://instantbird/skin/tabbrowser/tab-active-bkgnd.png") repeat-x;
  border-left: 1px solid threedshadow;
  border-top: 1px solid threedshadow;
  -moz-border-radius-topleft: 2px;
}

.tabs-container > .tabs-closebutton[chromedir="rtl"] {
  border-left: none;
  border-right: 1px solid threedshadow;
  -moz-border-radius-topleft: 0px;
  -moz-border-radius-topright: 2px;
}
