:host {
  grid-column: 1/-1;
  display: grid;
  grid-template-columns: subgrid;
  margin-top: 1px;
}

:host > div:first-child {
  grid-column: 1/-1;
  display: grid;
  position: relative;
  cursor: pointer;
  padding-inline: var(--smoothly-table-cell-padding-inline, 1.1rem);
  min-height: var(--smoothly-table-cell-min-height, 2.75rem);
  background-color: rgb(var(--smoothly-default-tint));
  border-bottom: 1px solid rgb(var(--smoothly-default-shade));
  position: relative;
  padding-left: 1.1rem;
}
:host > div:first-child::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:first-child: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:first-child:hover {
  color: rgb(var(--smoothly-table-hover-foreground));
  background-color: rgb(var(--smoothly-table-hover-background));
}

:host[open] > div:first-child::before {
  rotate: 45deg;
}

:host > div:last-child {
  grid-column: 1/-1;
  display: grid;
  grid-template-columns: subgrid;
}

:host[align] > div:first-child {
  grid-template-columns: subgrid;
}

:host[align] > div:first-child > div {
  display: contents;
}

:host[align] > div:first-child > div > * {
  display: flex;
  align-items: center;
  padding-inline: var(--smoothly-table-cell-padding-inline, 1.1rem);
  min-height: var(--smoothly-table-cell-min-height, 2.75rem);
}

:host:not([align]) > div:first-child {
  grid-column: 1/-1;
  display: grid;
  align-items: center;
  grid-template-columns: repeat(2, auto);
  justify-content: space-between;
}

:host:not([align]) > div:first-child > div:first-child {
  justify-self: start;
  display: flex;
  gap: 1rem;
}

:host:not([align]) > div:first-child > div:last-child {
  justify-self: end;
  display: flex;
  gap: 1rem;
}

:host:not([open]) {
  grid-template-rows: auto 0fr;
}

:host:not([open]) > div:last-child {
  grid-row: 2;
  overflow: hidden;
}