:host {
  display: contents;
}

:host > div.content {
  grid-column: span var(--smoothly-table-cell-span, 1);
  display: flex;
  padding-inline: var(--smoothly-table-cell-padding-inline, 1.1rem);
  min-height: var(--smoothly-table-cell-min-height, 2.75rem);
  box-sizing: border-box;
  align-items: center;
  white-space: nowrap;
  position: relative;
  padding-left: 1.1rem;
}
:host > div.content::before {
  content: "";
  display: flex;
  position: absolute;
  top: 50%;
  translate: 0 -50%;
  height: 0.4rem;
  width: 0.4rem;
  left: 0.3rem;
  border-bottom: 1px solid rgb(var(--smoothly-table-foreground));
  border-right: 1px solid rgb(var(--smoothly-table-foreground));
  transition: rotate 200ms ease-in-out;
  rotate: -45deg;
  opacity: 0.3;
}
:host > div.content:hover::before {
  border-bottom: 1px solid rgb(var(--smoothly-table-hover-foreground));
  border-right: 1px solid rgb(var(--smoothly-table-hover-foreground));
  opacity: 1;
}
:host > div.content:hover {
  background-color: rgb(var(--smoothly-table-hover-background));
  color: rgb(var(--smoothly-table-hover-foreground));
  stroke: rgb(var(--smoothly-table-hover-foreground));
  fill: rgb(var(--smoothly-table-hover-foreground));
}

:host[open] > div.content::before {
  rotate: 45deg;
}

:host > div:first-child {
  cursor: pointer;
}

:host > div.smoothly-table-detail {
  grid-column: 1/-1;
  grid-row: 2;
  position: relative;
  padding-block: var(--smoothly-table-detail-padding-block, 0.5rem);
  padding-inline: var(--smoothly-table-detail-padding-inline, 1.1rem);
}

:host[open] > div.content {
  box-shadow: 1px 1px 1px -1px rgb(var(--smoothly-table-border)) inset, -3px -1px 1px -3px rgb(var(--smoothly-table-border)) inset;
}

:host[open] > div {
  background-color: rgb(var(--smoothly-table-expanded-background));
  color: rgb(var(--smoothly-table-expanded-foreground));
  stroke: rgb(var(--smoothly-table-expanded-foreground));
  fill: rgb(var(--smoothly-table-expanded-foreground));
}

:host:not([open]) > div.smoothly-table-detail {
  display: none;
}

:host > div.smoothly-table-detail::before {
  content: "";
  position: absolute;
  display: flex;
  box-sizing: border-box;
  top: 0;
  bottom: 0;
  left: -1em;
  width: 1em;
  background-color: rgb(var(--smoothly-table-expanded-background));
  border-left: 0.3em solid rgb(var(--smoothly-table-detail-border, var(--smoothly-table-border)));
  box-shadow: 2px 0px 0px 0px rgb(var(--smoothly-table-expanded-background)), 0px 0px 1px 0px rgb(var(--smoothly-table-border));
}

:host > div.smoothly-table-detail::after {
  content: "";
  position: absolute;
  display: flex;
  top: 0;
  bottom: 0;
  right: -1em;
  width: 1em;
  background-color: rgb(var(--smoothly-table-expanded-background));
  box-shadow: -2px 0px 0px 0px rgb(var(--smoothly-table-expanded-background)), 0px 0px 1px 0px rgb(var(--smoothly-table-border));
}