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

/**
 * 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;
}

/**
 * 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%, 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: 1px 0 3px;
  -moz-border-image: url(icons/tab.png) 4 3 0 / 4px 3px 0 repeat stretch;
  height: 26px;
  min-height: 26px;
  border-radius: 0;
  border-width: 0;
  margin-top: 1px;
  margin-bottom: 4px;
}

.tabmail-tab: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"] {
  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;
}

.tab-content {
  -moz-padding-start: 3px;
  -moz-padding-end: 3px;
}

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

.tabs-bottom {
  height: 4px !important;
  margin: 0px !important;
  background: -moz-dialog !important;
  border-top: 1px solid threedshadow;
  border-bottom: 1px solid threedshadow;
}

.tab-icon-image,
.tab-throbber {
  -moz-margin-end: 3px;
  margin-bottom: 1px;

  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: 0; /* Move up into tabs since menu is not below anymore */
}

/**
 * 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, 16px, 16px, 0);
  border: none !important;
  padding: 1px;
  cursor: default;
  list-style-image: url("chrome://global/skin/icons/close.svg");
}

.tabs-closebutton {
  padding: 1px 3px;
}

.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, 14px, 14px, 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[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);
}

/**
 * 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 {
  height: 3px;
  border-bottom: 1px solid rgb(105, 105, 105);
}

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