/* vim:set ts=2 sw=2 sts=2 et: */
/* 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/. */

/* Tabs General Styles */

.tabs {
  height: 100%;
  background: var(--theme-sidebar-background);
  display: flex;
  flex-direction: column;
}

.tabs .tabs-menu {
  list-style: none;
  padding: 0;
  margin: 0;
}

.tabs .tabs-menu-item {
  display: inline-block;
  position: relative;
}

.tabs .tabs-menu-item a {
  display: flex;
  justify-content: center;
  padding: 4px 8px;
  border: 1px solid transparent;
  font-size: 12px;
  text-decoration: none;
  white-space: nowrap;
}

.tabs .tabs-menu-item .tab-badge {
  color: var(--theme-highlight-blue);
  font-size: 80%;
  font-style: italic;
  /* Tabs have a 15px padding start/end, so we set the margins here in order to center the
     badge after the tab title, with a 5px effective margin. */
  margin-inline-start: 5px;
  margin-inline-end: -10px;
}

.tabs .tabs-menu-item.is-active .tab-badge {
  /* Use the same color as the tab-item when active */
  color: inherit;
}

/* To avoid "select all" commands from selecting content in hidden tabs */
.tabs .hidden,
.tabs .hidden * {
  -moz-user-select: none !important;
}

.tabs .tabs-menu-item a {
  cursor: default;
  -moz-user-select: none;
}

/* Make sure panel content takes entire vertical space. */
.tabs .panels {
  flex: 1;
  overflow: hidden;
}

.tabs .tab-panel {
  height: 100%;
  overflow-x: hidden;
  overflow-y: auto;
}

.tabs .tabs-navigation,
.tabs .tabs-navigation {
  position: relative;
  border-bottom: 1px solid var(--theme-splitter-color);
  background: var(--theme-tab-toolbar-background);
}

.theme-dark .tabs .tabs-menu-item,
.theme-light .tabs .tabs-menu-item {
  margin: 0;
  padding: 0;
  color: var(--theme-toolbar-color);
}

.theme-dark .tabs .tabs-menu-item.is-active,
.theme-light .tabs .tabs-menu-item.is-active {
  color: var(--theme-toolbar-selected-color);
}

.theme-dark .tabs .tabs-menu-item:last-child,
.theme-light:not(.theme-firebug) .tabs .tabs-menu-item:last-child {
  border-inline-end-width: 1px;
}

.theme-dark .tabs .tabs-menu-item a,
.theme-light .tabs .tabs-menu-item a {
  padding: 3px 10px;
}

.theme-dark .tabs .tabs-menu-item:hover,
.theme-light .tabs .tabs-menu-item:hover {
  background-color: var(--theme-toolbar-hover);
}

.theme-dark .tabs .tabs-menu-item:hover:active:not(.is-active),
.theme-light .tabs .tabs-menu-item:hover:active:not(.is-active) {
  background-color: var(--theme-toolbar-hover-active);
}

/* Firebug Theme */

.theme-firebug .tabs .tabs-navigation {
  padding-top: 3px;
  padding-left: 3px;
}

.theme-firebug .tabs .tabs-menu {
  margin-bottom: -1px;
}

.theme-firebug .tabs .tabs-menu-item.is-active,
.theme-firebug .tabs .tabs-menu-item.is-active:hover {
  background-color: transparent;
}

.theme-firebug .tabs .tabs-menu-item {
  position: relative;
  border-inline-start-width: 0;
}

.theme-firebug .tabs .tabs-menu-item a {
  font-family: var(--proportional-font-family);
  font-weight: bold;
  color: var(--theme-body-color);
  border-radius: 4px 4px 0 0;
}

.theme-firebug .tabs .tabs-menu-item:hover:not(.is-active) a {
  border: 1px solid var(--theme-splitter-color);
  border-bottom: 1px solid transparent;
  background-color: transparent;
}

.theme-firebug .tabs .tabs-menu-item.is-active a {
  background-color: var(--theme-toolbar-tab-selected-background);
  border: 1px solid var(--theme-splitter-color);
  border-bottom-color: transparent;
  color: var(--theme-body-color);
}

.theme-firebug .tabs .tabs-menu-item:hover:active a {
  background-color: var(--theme-toolbar-hover-active);
}

.theme-firebug .tabs .tabs-menu-item.is-active:hover:active a {
  background-color: var(--theme-selection-background);
  color: var(--theme-selection-color);
}

.theme-firebug .tabs .tabs-menu-item a {
  border: 1px solid transparent;
  padding: 4px 8px;
}
