@namespace url("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul");

.tabbrowser-tabs[treestyletab-mode="vertical"]
  .tabbrowser-tab:not([pinned="true"])
  .treestyletab-twisty,
.tabbrowser-tabs[treestyletab-mode="horizontal"][treestyletab-allow-subtree-collapse="true"]
  .tabbrowser-tab[treestyletab-allow-subtree-collapse="true"][treestyletab-children]:not([pinned="true"])
  .treestyletab-twisty {
	position: relative;
	margin: 0 -13px 0 -3px;
	max-height: 16px;
	max-width: 16px;
	min-height: 16px;
	min-width: 16px;
	box-pack: start;
	-moz-box-pack: start;
	box-align: center;
	-moz-box-align: center;
	box-flex: 1;
	-moz-box-flex: 1;
}

.tabbrowser-tabs[treestyletab-twisty-style^="modern"][treestyletab-mode="vertical"]
  .tabbrowser-tab:not([pinned="true"])
  .treestyletab-twisty,
.tabbrowser-tabs[treestyletab-twisty-style^="osx"][treestyletab-mode="vertical"]
  .tabbrowser-tab:not([pinned="true"])
  .treestyletab-twisty {
	margin: 0 -2px 0 -5px;
}
.tabbrowser-tabs[treestyletab-twisty-style^="modern"][treestyletab-mode="vertical"][treestyletab-tab-contents-inverted="true"]
  .tabbrowser-tab:not([pinned="true"])
  .treestyletab-twisty,
.tabbrowser-tabs[treestyletab-twisty-style^="osx"][treestyletab-mode="vertical"][treestyletab-tab-contents-inverted="true"]
  .tabbrowser-tab:not([pinned="true"])
  .treestyletab-twisty {
	margin: 0 -5px 0 -2px;
}

.tabbrowser-tabs:not([treestyletab-style])[treestyletab-allow-subtree-collapse="true"]
  .tabbrowser-tab[treestyletab-allow-subtree-collapse="true"][treestyletab-children]:not([pinned="true"])
  .treestyletab-twisty,
.tabbrowser-tabs[treestyletab-tabbar-position="top"][treestyletab-allow-subtree-collapse="true"]
  .tabbrowser-tab[treestyletab-allow-subtree-collapse="true"][treestyletab-children]:not([pinned="true"])
  .treestyletab-twisty {
	margin: 0 -3px 0 -2px;
}
.tabbrowser-tabs[treestyletab-twisty-style^="osx"]:not([treestyletab-style])[treestyletab-allow-subtree-collapse="true"]
  .tabbrowser-tab[treestyletab-allow-subtree-collapse="true"][treestyletab-children]:not([pinned="true"])
  .treestyletab-twisty,
.tabbrowser-tabs[treestyletab-twisty-style^="osx"][treestyletab-tabbar-position="top"][treestyletab-allow-subtree-collapse="true"]
  .tabbrowser-tab[treestyletab-allow-subtree-collapse="true"][treestyletab-children]:not([pinned="true"])
  .treestyletab-twisty {
	margin: 0 -5px 0 1px;
}
.tabbrowser-tabs:not([treestyletab-style])[treestyletab-allow-subtree-collapse="true"][treestyletab-tab-contents-inverted="true"]
  .tabbrowser-tab[treestyletab-allow-subtree-collapse="true"][treestyletab-children]:not([pinned="true"])
  .treestyletab-twisty,
.tabbrowser-tabs[treestyletab-tabbar-position="top"][treestyletab-allow-subtree-collapse="true"][treestyletab-tab-contents-inverted="true"]
  .tabbrowser-tab[treestyletab-allow-subtree-collapse="true"][treestyletab-children]:not([pinned="true"])
  .treestyletab-twisty {
	margin: 0 -2px 0 -3px;
}
.tabbrowser-tabs[treestyletab-twisty-style^="osx"]:not([treestyletab-style])[treestyletab-allow-subtree-collapse="true"][treestyletab-tab-contents-inverted="true"]
  .tabbrowser-tab[treestyletab-allow-subtree-collapse="true"][treestyletab-children]:not([pinned="true"])
  .treestyletab-twisty,
.tabbrowser-tabs[treestyletab-twisty-style^="osx"][treestyletab-tabbar-position="top"][treestyletab-allow-subtree-collapse="true"][treestyletab-tab-contents-inverted="true"]
  .tabbrowser-tab[treestyletab-allow-subtree-collapse="true"][treestyletab-children]:not([pinned="true"])
  .treestyletab-twisty {
	margin: 0 1px 0 -5px;
}


.treestyletab-twisty {
	list-style-image: url("twisty-retro.png");
	-moz-image-region: rect(0, 32px, 16px, 16px);
}

.tabbrowser-tabs[treestyletab-twisty-style="modern-black"]
  .treestyletab-twisty {
	list-style-image: url("twisty-modern-b-l.png");
}
.tabbrowser-tabs[treestyletab-twisty-style="modern-black"][treestyletab-tab-contents-inverted="true"]
  .treestyletab-twisty {
	list-style-image: url("twisty-modern-b-r.png");
}
.tabbrowser-tabs[treestyletab-twisty-style="modern-white"]
  .treestyletab-twisty {
	list-style-image: url("twisty-modern-w-l.png");
}
.tabbrowser-tabs[treestyletab-twisty-style="modern-white"][treestyletab-tab-contents-inverted="true"]
  .treestyletab-twisty {
	list-style-image: url("twisty-modern-w-r.png");
}

.tabbrowser-tabs[treestyletab-twisty-style="osx"]
  .treestyletab-twisty {
	list-style-image: url("twisty-osx-l.png");
	opacity: 0.38;
}
.tabbrowser-tabs[treestyletab-twisty-style="osx"][treestyletab-tab-contents-inverted="true"]
  .treestyletab-twisty {
	list-style-image: url("twisty-osx-r.png");
}
.tabbrowser-tabs[treestyletab-twisty-style="osx"]
  .treestyletab-twisty:active,
.tabbrowser-tabs[treestyletab-twisty-style="osx"]
  .tabbrowser-tab[selected="true"] .treestyletab-twisty {
	opacity: 1;
}

.tabbrowser-tab[treestyletab-subtree-collapsed="true"]
  .treestyletab-twisty {
	-moz-image-region: rect(0, 16px, 16px, 0);
}
.tabbrowser-tabs:not([treestyletab-twisty-style="osx"])
  .tabbrowser-tab[treestyletab-twisty-hover="true"] .treestyletab-twisty,
.tabbrowser-tabs[treestyletab-twisty-style="osx"]
  .tabbrowser-tab[selected="true"] .treestyletab-twisty {
	-moz-image-region: rect(16px, 32px, 32px, 16px);
}
.tabbrowser-tabs:not([treestyletab-twisty-style="osx"])
  .tabbrowser-tab[treestyletab-subtree-collapsed="true"][treestyletab-twisty-hover="true"] .treestyletab-twisty,
.tabbrowser-tabs[treestyletab-twisty-style="osx"]
  .tabbrowser-tab[treestyletab-subtree-collapsed="true"][selected="true"] .treestyletab-twisty {
	-moz-image-region: rect(16px, 16px, 32px, 0);
}


/* horizontal tab bar */
.tabbrowser-tabs[treestyletab-twisty-style^="modern"][treestyletab-mode="horizontal"]
  .tabbrowser-tab .treestyletab-twisty {
	-moz-image-region: rect(0, 16px, 16px, 0);
}
.tabbrowser-tabs[treestyletab-twisty-style^="modern"][treestyletab-mode="horizontal"]
  .tabbrowser-tab[treestyletab-subtree-collapsed="true"] .treestyletab-twisty {
	-moz-image-region: rect(0, 32px, 16px, 16px);
}
.tabbrowser-tabs[treestyletab-twisty-style^="modern"][treestyletab-mode="horizontal"]
  .tabbrowser-tab[treestyletab-twisty-hover="true"] .treestyletab-twisty {
	-moz-image-region: rect(16px, 16px, 32px, 0);
}
.tabbrowser-tabs[treestyletab-twisty-style^="modern"][treestyletab-mode="horizontal"]
  .tabbrowser-tab[treestyletab-subtree-collapsed="true"][treestyletab-twisty-hover="true"] .treestyletab-twisty {
	-moz-image-region: rect(16px, 32px, 32px, 16px);
}
