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

@import url("base.css");
@import url("border.css");

:root {
  --tab-surface: Background;
  --tab-text: CaptionText;
  --tab-text-inverted: Caption;
  --tab-border: ThreeDHighlight;
  --tab-dropmarker: CaptionText;
}


/* Tab Bar */

:root,
#background {
  background: Background;
}

#background::after {
  background: CaptionText;
  opacity: 0.35;

  bottom: 0;
  content: "";
  left: 0;
  margin: 0;
  overflow: hidden;
  padding: 0;
  position: fixed;
  right: 0;
  top: 0;
  z-index: 20;
}


/* Tab */

.tab,
.after-tabs button {
  background: var(--tab-surface);
  color: var(--tab-text);
}

.tab * {
  color: var(--tab-text);
}

.tab:not(.collapsed):hover,
.after-tabs button:hover {
  opacity: 0.7;
  /*mix-blend-mode: multiply;*/
}

.tab.active {
  --tab-surface: Highlight;
  --throbber-color: HighlightText;
  --tab-border: Highlight;
  --tab-text: HighlightText;
  --tab-text-inverted: Highligh;
}

.tab:not(.active) {
  --throbber-color: Highlight;
}

.newtab-button-box {
  border-color: ThreeDHighlight;
  border-style: solid;
  border-width: 1px;
}


/* Closebox */

.tab .closebox:hover {
  --tab-text: HighlightText;
  opacity: 0.75;
}
.tab .closebox:hover::before {
  --tab-text: Highlight;
  border-radius: 0;
  height: calc(var(--svg-small-icon-size) + 0.3em);
  margin-left: -0.15em;
  margin-top: -0.15em;
  opacity: 1;
  width: calc(var(--svg-small-icon-size) + 0.3em);
}

.tab.active .closebox:hover {
  --tab-text: Highlight;
  opacity: 0.5;
}
.tab.active .closebox:hover::before {
  --tab-text: HighlightText;
}

/* Mac OS workaround */

:root.left-scrollbar.overlay-scrollbar #tabbar.overflow .tab:not(.pinned) {
  padding-left: var(--scrollbar-placeholder-size); /* it will be enough larger than the default padding */
}
:root.right-scrollbar.overlay-scrollbar #tabbar.overflow .tab:not(.pinned) {
  padding-right: var(--scrollbar-placeholder-size); /* it will be enough larger than the default padding */
}


/* hide regular active tab marker */
.highlighter::before {
  display: none !important;
}
