/*!
 *  Copyright 2022-2023 SenX S.A.S.
 *
 *  Licensed under the Apache License, Version 2.0 (the "License");
 *  you may not use this file except in compliance with the License.
 *  You may obtain a copy of the License at
 *
 *    http://www.apache.org/licenses/LICENSE-2.0
 *
 *  Unless required by applicable law or agreed to in writing, software
 *  distributed under the License is distributed on an "AS IS" BASIS,
 *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 *  See the License for the specific language governing permissions and
 *  limitations under the License.
 */
/*!
*  Copyright 2022  SenX S.A.S.
*
*  Licensed under the Apache License, Version 2.0 (the "License");
*  you may not use this file except in compliance with the License.
*  You may obtain a copy of the License at
*
*    http://www.apache.org/licenses/LICENSE-2.0
*
*  Unless required by applicable law or agreed to in writing, software
*  distributed under the License is distributed on an "AS IS" BASIS,
*  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
*  See the License for the specific language governing permissions and
*  limitations under the License.
*/
:host .tree {
  margin: 1rem;
  list-style: none !important;
}
:host .tree ul {
  list-style: none !important;
}
:host .tree input {
  position: absolute;
  clip: rect(0, 0, 0, 0);
}
:host .tree input ~ ul {
  display: none;
}
:host .tree input:checked ~ ul {
  display: block;
  margin-left: -40px;
}
:host .tree li {
  line-height: 1;
  position: relative;
  padding: 0 0 1rem 1rem;
}
:host .tree ul li {
  padding: 0.5rem 0 0 1rem;
}
:host .tree > li:last-child {
  padding-bottom: 0;
}
:host .tree_label {
  position: relative;
  display: inline-block;
}
:host label.tree_label {
  cursor: pointer;
}
:host label.tree_label:before {
  background: var(--gts-tree-collapsed-bg, #ffffff);
  border-radius: 1rem;
  border: var(--gts-tree-collapsed-border, 1px solid #404040);
  position: relative;
  z-index: 1;
  float: left;
  margin: 0 1rem 0 -2.05rem;
  width: 1rem;
  height: 1rem;
  content: "";
  background-image: var(--gts-tree-collapsed-icon, url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAA0UlEQVQ4T6WTUW7CQAxEPQdozxYb9Qb94Aj9gQSoVCp6lMr21doDZFCQiFCU3YDY//d2PeOFPHnwJC+zAlVdA/jp+/6YmZ+1S0qCPxF5HUAAO3fvSpKS4ENEvm6gfUS0c5JiBma2Ibm/QiQPmbmdSqohquoA7GqSxRaapmkBjBkAeHP336t0UWBmHcnb+VcR4XcJpjDJLjPHkS4tleqZubmNiDHU6gumDQDYuvvh7hpV9V9EXgaA5Ka2jbMjmNk7yZOIfEfE8eFVfuSDLda4JDsD3FNdEckTC0YAAAAASUVORK5CYII=));
  background-position: center center;
  background-size: 100%;
  text-align: center;
  line-height: 0.9rem;
}
:host :checked ~ label.tree_label:before {
  background-image: var(--gts-tree-expanded-icon, url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAA7klEQVQ4T82TMW7CQBBF/0g+QOpINEkVCmpaLoBm5COk5QYoaeAY3MDSei2LGu4QKakiBA1tCpTK8kS2sLVe2xSh8XSrnf9m/s4s4c6gO/UYGEBEXlT1bK396bFGIjIJguA7iqJLkVNbYOZXItoQ0QHAzBhz9CCFeAVgCeAjy7Jpmqa/NUBEEgDzktqGuOKKO47j+KsGhGH4lOf5HsDIg5ycyqVYVd+steuGheLAzM9EtPMgW1VdVGWJ6N0YU1gpozVGH+K+gy/uBHR1crXUqNzbQXXhduJ69sd7cxOZ+UFVH5Mk+exb+YGt8n9+5h8up1sReYC0WAAAAABJRU5ErkJggg==));
  background-color: var(--gts-tree-expanded-bg, #ffffff);
  border: var(--gts-tree-expanded-border, 1px solid #404040);
}
:host .tree li.sub:before {
  position: absolute;
  top: 0;
  bottom: 0;
  left: -0.5rem;
  display: block;
  width: 0;
  border-left: var(--gts-tree-branch, 1px solid #404040);
  content: "";
}
:host .tree_label:after {
  position: absolute;
  top: -0.8rem;
  left: -1.5rem;
  display: block;
  height: 1.45rem;
  width: 1rem;
  border-bottom: var(--gts-tree-branch, 1px solid #404040);
  border-left: var(--gts-tree-branch, 1px solid #404040);
  border-radius: 0 0 0 var(--gts-tree-branch-radius, 0);
  content: "";
}
:host .tree_label.root::after {
  height: 0;
  top: 0.65rem;
}
:host label.tree_label:after {
  border-bottom: 0;
}
:host :checked ~ label.tree_label:after {
  border-radius: 0 var(--gts-tree-branch-radius, 0) 0 0;
  border-top: var(--gts-tree-branch, 1px solid #404040);
  border-right: var(--gts-tree-branch, 1px solid #404040);
  border-bottom: 0;
  border-left: 0;
  bottom: 0;
  top: 0.5rem;
  height: auto;
}
:host :checked ~ span::after {
  position: absolute;
  top: 0;
  left: -0.5rem;
  display: block;
  height: 100%;
  width: 1px;
  border-left: var(--gts-tree-branch, 1px solid #404040);
  border-radius: 0 0 0 var(--gts-tree-branch-radius, 0);
  content: "";
}
:host :checked ~ span.first::after {
  top: 0.5rem;
}
:host :checked ~ span.last::after {
  height: 1rem;
}
:host .tree li:last-child:before {
  height: 1rem;
  bottom: auto;
}
:host .tree > li:last-child:before {
  display: none;
}