@charset "UTF-8";
/*
# 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/.
*/

:root {
  --dropmarker-size: 0.15em;
  --dropmarker-color: -moz-fieldtext;
}

.tab.dragging {
  opacity: 0.5 !important;
}

.tab[data-drop-position="self"] {
  outline: var(--dropmarker-size) solid var(--dropmarker-color) !important;
  outline-offset: calc(0px - var(--dropmarker-size));
  -moz-outline-radius: calc(var(--dropmarker-size) * 2);
}

.tab[data-drop-position]:not([data-drop-position="self"])::before {
  content: "";
  display: block;
  max-height: var(--dropmarker-size);
  min-height: var(--dropmarker-size);
  background: var(--dropmarker-color) !important;
  border-radius: var(--dropmarker-size);
  overflow: hidden;
  position: absolute;
  z-index: 10000;
}
.tab[data-drop-position]:not([data-drop-position="self"]).pinned::before {
  max-height: none;
  max-width: var(--dropmarker-size);
  min-height: 0;
  min-width: var(--dropmarker-size);
}

.tab:not(.pinned)[data-drop-position="before"]::before {
  left: 0;
  right: 0;
  top: 0;
}

.tab:not(.pinned)[data-drop-position="after"]::before {
  bottom: 0;
  left: 0;
  right: 0;
}

.tab.pinned[data-drop-position="before"]::before {
  bottom: 0;
  left: 0;
  top: 0;
}

.tab.pinned[data-drop-position="after"]::before {
  bottom: 0;
  right: 0;
  top: 0;
}


.tab-drop-blocker {
  display: none;
  min-height: calc(var(--favicon-size) / 5);
  min-width: calc(var(--favicon-size) / 5);
  position: fixed;
  z-index: 100000;
}

:root.debug .tab-drop-blocker {
  background: rgba(255, 0, 0, 0.5);
}

:root.tab-dragging .tab-drop-blocker,
:root.link-dragging .tab-drop-blocker {
  display: block;
}

.tab-drop-blocker#tab-drop-blocker-top {
  left: 0;
  right: 0;
  top: 0;
}

.tab-drop-blocker#tab-drop-blocker-right {
  bottom: 0;
  right: 0;
  top: 0;
}

.tab-drop-blocker#tab-drop-blocker-bottom {
  bottom: 0;
  left: 0;
  right: 0;
}

.tab-drop-blocker#tab-drop-blocker-left {
  bottom: 0;
  left: 0;
  top: 0;
}


/* tab drag handle */

#tab-drag-handle {
  --handle-size: calc(var(--favicon-size) * 1.5);

  direction: ltr;
  height: var(--handle-size);
  line-height: 1;
  opacity: 0;
  overflow: hidden;
  position: fixed;
  text-align: left;
  z-index: 2000;
}

#tab-drag-handle:not(.shown),
#tab-drag-handle.animating {
  pointer-events: none;
}

#tab-drag-handle.animating {
  transition: box-shadow var(--collapse-animation),
              opacity    var(--collapse-animation);
}

#tab-drag-handle > span {
  background: var(--tab-surface, var(--bg-color));
  border-left: 1px solid var(--tab-border);
  display: table-cell;
  height: var(--handle-size);
  min-height: var(--handle-size);
  min-width: var(--handle-size);
  opacity: 0.75;
  text-align: center;
  transition: opacity    var(--collapse-animation);
  vertical-align: middle;
  width: var(--handle-size);
}

#tab-drag-handle > span:first-of-type {
  border-left: none;
}

#tab-drag-handle > span::before {
  -moz-context-properties: fill;
  background: var(--tab-text);
  content: "";
  display: inline-block;
  height: var(--svg-small-icon-size);
  line-height: 1;
  margin-top: calc((var(--favicon-size) - var(--svg-small-icon-size)) / 2);
  max-height: var(--favicon-size);
  max-width: var(--favicon-size);
  width: var(--svg-small-icon-size);
}

#tab-drag-handle > span#tab-drag-handle-tree-tearoff::before {
  mask: url("/sidebar/styles/icons/tearoff-tree.svg") no-repeat center / 100%;
}

#tab-drag-handle > span#tab-drag-handle-tree-bookmark::before {
  mask: url("/sidebar/styles/icons/bookmark-tree.svg") no-repeat center / 100%;
}

#tab-drag-handle > span#tab-drag-handle-tab-tearoff::before {
  mask: url("/sidebar/styles/icons/tearoff-tab.svg") no-repeat center / 100%;
}

#tab-drag-handle > span#tab-drag-handle-tab-bookmark::before {
  mask: url("/sidebar/styles/icons/bookmark-tab.svg") no-repeat center / 100%;
}

#tab-drag-handle:not(.has-child) > :not(.shouldIgnoreDescendants) {
  display: none;
}

#tab-drag-handle.shown {
  box-shadow: 0.2em 0.2em 0.5em rgba(0, 0, 0, 0.5);
  opacity: 1;
}

#tab-drag-handle > span:hover,
#tab-drag-handle > span.active {
  opacity: 1;
}

#tab-drag-handle > span.active {
  border: calc(var(--favicon-size) / 8) solid var(--tab-text);
}

/* notification message */

#tab-drag-notification {
  background: var(--tab-surface, var(--bg-color));
  bottom: 0;
  color: var(--tab-text);
  font-size: var(--svg-small-icon-size);
  height: calc(var(--svg-small-icon-size) * 1.5);
  left: 0;
  line-height: 1;
  opacity: 0;
  overflow: hidden;
  padding: calc(var(--svg-small-icon-size) * 0.25) 0;
  pointer-events: none;
  position: fixed;
  transition: opacity var(--collapse-animation);
  right: 0;
  z-index: 2000;
}

#tab-drag-notification.shown {
  opacity: 0.85;
}
#tab-drag-notification.shown:hover {
  opacity: 1;
}

#tab-drag-notification::before {
  content: "";
  display: inline-block;
  white-space: nowrap;
}

#tab-drag-notification.shown > span,
#tab-drag-notification.hiding > span {
  position: absolute;
  white-space: nowrap;
  animation: marquee linear 20s infinite;
}

@keyframes marquee {
    0% { left: 100%; transform: translate(0); }
  100% { left: 0;    transform: translate(-100%); }
}
