@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 {
  --tab-twisty-offset: calc((var(--tab-ui-size) - var(--favicon-size)) / 2);
  --tab-twisty-negative-offset: calc((var(--favicon-size) - var(--tab-ui-size)) / 2);
}

tab-item tab-twisty {
  display: inline-block;
  font-size: var(--favicon-size);
  /*height: var(--favicon-size);*/
  margin-block: var(--tab-twisty-negative-offset);
  margin-inline: 0;
  /*max-height: var(--favicon-size);*/
  max-width: var(--favicon-size);
  min-height: var(--favicon-size);
  min-width: var(--favicon-size);
  padding-block: var(--tab-twisty-offset);
  padding-inline: 0;
  position: relative;
  transform-origin: 50% 50%;
  white-space: pre;
  width: var(--favicon-size);
  z-index: var(--tab-ui-z-index);
}

tab-item:not([data-child-ids]) tab-twisty,
tab-item.pinned tab-twisty,
tab-item.collapsed tab-twisty {
  visibility: hidden !important;
  pointer-events: none !important;
}

tab-item:not(.collapsed) {
  &.subtree-collapsed tab-twisty {
    opacity: 0.9;

    &:hover {
      opacity: 1;
    }
  }

  &:not(.subtree-collapsed) tab-twisty {
    opacity: 0.9;

    &:hover {
      opacity: 1;
    }
  }

  tab-twisty::before {
    -moz-context-properties: fill;
    background: url("./icons/ArrowheadDown.svg") no-repeat center / 60%;
    content: "";
    display: inline-block;
    fill: var(--tab-text);
    height: var(--svg-small-icon-size);
    line-height: 1;
    margin-block-start: 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);
  }
  :root.simulate-svg-context-fill & tab-twisty::before {
    background: var(--tab-text);
    mask: url("./icons/ArrowheadDown.svg") no-repeat center / 60%;
  }

  :root.animation & tab-twisty::before {
    transition: transform 0.2s ease-out,
                opacity 0.15s ease-out;
    transform: rotatez(0);
  }
  :root.left
    &.subtree-collapsed tab-twisty::before {
    transform: rotatez(-90deg);
  }
  :root.right
    &.subtree-collapsed tab-twisty::before {
    transform: rotatez(90deg);
  }
}
