/* paste this as Extra Styles in Advanced section of Tree Style Tab addon preferences */

#tabbar-container {
	margin: calc(var(--tab-size) / 3) calc(var(--tab-size) / 6);
}

/* tab shape and semi-transparent background (looks well on both dark and light mode) */
tab-item tab-item-substance {
	border-radius: 10px;
	background-color: #00000033;
}
tab-item.pinned tab-item-substance {
	border-radius: 0;
}

/* hide close button when not hovered */
tab-item .closebox {
	visibility: collapse;
}
tab-item:hover .closebox {
	visibility: visible;
}

/* tab active opacity and bold */
tab-item {
	opacity: 0.7 !important;
}
tab-item.active {
	opacity: 1 !important;
	font-weight: bold;
}

/* tab active / hovered styling */
tab-item.active .background {
  margin-left: 0;
  margin-right: 0;
  border-radius: 10px 0 0 10px;
  background: #0000 !important;
  border: none !important;
  box-shadow: 0 0 0.6em var(--theme-colors-tab_background_text) inset;
  opacity: 0.4;
  
  bottom: 0;
  left: 0;
  right: 0;
  top: 0;
}
tab-item.pinned.active .background {
	border-radius: 0;
}
tab-item .background,
.after-tabs button:hover::before,
.after-tabs [role="button"]:hover::before {
  bottom: 0;
  left: 0;
  right: 0;
  top: 0;
}
tab-item tab-item-substance:hover {
  background: #0000 !important;
  box-shadow: 0 0 0.6em var(--theme-colors-tab_background_text) inset;
  opacity: 0.9;
}

/* space between trees */

tab-item[data-level="0"] {
  margin-top: calc(var(--tab-size) / 3);
}
tab-item[data-level="0"].pinned,
tab-item[data-level="0"].pinned + tab-item[data-level="0"],
tab-item[data-level="0"] + tab-item[data-level="0"]:not([data-child-ids]) {
  margin-top: 0;
}


/* custom indents for tree branches */

tab-item[data-level][data-level="0"] tab-item-substance {
  margin-left: 0 !important;
}
tab-item[data-level][data-level="1"] tab-item-substance {
  margin-left: calc(var(--tab-size) / 3) !important;
}
tab-item[data-level][data-level="2"] tab-item-substance {
  margin-left: calc(var(--tab-size) / 1.5) !important;
}
tab-item[data-level][data-level="3"] tab-item-substance {
  margin-left: calc(var(--tab-size) / 1) !important;
}
tab-item[data-level][data-level="4"] tab-item-substance {
  margin-left: calc(var(--tab-size) / 0.7) !important;
}
tab-item[data-level][data-level="5"] tab-item-substance {
  margin-left: calc(var(--tab-size) / 0.6) !important;
}
tab-item[data-level][data-level="6"] tab-item-substance {
  margin-left: calc(var(--tab-size) / 0.5) !important;
}
tab-item[data-level][data-level="7"] tab-item-substance {
  margin-left: calc(var(--tab-size) / 0.4) !important;
}


/* colourfull tabs for diffrent domains */
/* xxxxxx40 mean 25% transparency */
tab-item[data-current-uri^="https://github.com"] tab-item-substance { background-color: #f5f5f540; }
tab-item[data-current-uri^="https://gitlab.com"] tab-item-substance { background-color: #55448840; }
tab-item[data-current-uri^="https://bitbucket.org"] tab-item-substance { background-color: #20508140; }
tab-item[data-current-uri^="https://aur.archlinux.org"] tab-item-substance,
tab-item[data-current-uri^="https://wiki.archlinux.org/"] tab-item-substance { background-color: #1793d140; }
tab-item[data-current-uri^="https://www.youtube.com"] tab-item-substance { background-color: #ff000040; }
tab-item[data-current-uri^="https://www.google.com"] tab-item-substance { background-color: #ea433540; }
tab-item[data-current-uri^="https://www.facebook.com"] tab-item-substance,
tab-item[data-current-uri^="https://www.messenger.com"] tab-item-substance { background-color: #1877f240; }
tab-item[data-current-uri^="https://www.instagram.com/"] tab-item-substance { background-color: #c1358440; }
tab-item[data-current-uri^="https://twitter.com"] tab-item-substance { background-color: #1da1f240; }
tab-item[data-current-uri^="https://www.twitch.tv"] tab-item-substance { background-color: #9146ff40; }
tab-item[data-current-uri^="https://www.reddit.com"] tab-item-substance { background-color: #ff450040; }
tab-item[data-current-uri^="https://www.wikiwand.com"] tab-item-substance { background-color: #93959840; }
tab-item[data-current-uri^="https://vk.com"] tab-item-substance { background-color: #45668e40; }
tab-item[data-current-uri^="https://stackoverflow.com"] tab-item-substance { background-color: #f4802440; }
tab-item[data-current-uri^="https://asana.com"] tab-item-substance { background-color: #ffb90040; }
tab-item[data-current-uri^="https://www.netflix.com"] tab-item-substance { background-color: #e5091440; }
tab-item[data-current-uri^="https://www.amazon.com"] tab-item-substance { background-color: #ff990040; }
tab-item[data-current-uri^="https://allegro.pl"] tab-item-substance { background-color: #93450040; }
tab-item[data-current-uri^="https://www.olx.pl"] tab-item-substance { background-color: #cbf7ee40; }
tab-item[data-current-uri^="https://duckduckgo.com"] tab-item-substance { background-color: #fc4c0240; }
tab-item[data-current-uri^="http://localhost"] tab-item-substance { background-color: hsla(120,99%,27%,0.25); }
