.panel {
  display: grid;
  min-width: 0;
}

.header {
  display: grid;
  width: 100%;
  min-width: 0;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: var(--space-2);
  align-items: center;
  border: 0;
  border-bottom: 1px solid var(--composer-glass-divider);
  background: transparent;
  color: var(--text-primary);
  cursor: pointer;
  font: inherit;
  opacity: 0.68;
  padding: var(--space-2) var(--composer-inner-padding-inline);
  text-align: left;
  transition:
    opacity 140ms ease,
    background-color 140ms ease;
}

.header[data-has-icon="false"] {
  grid-template-columns: minmax(0, 1fr) auto;
}

.header[data-has-summary="true"] {
  grid-template-columns: auto auto minmax(0, 1fr) auto;
}

.header[data-has-icon="false"][data-has-summary="true"] {
  grid-template-columns: auto minmax(0, 1fr) auto;
}

.header:focus-visible {
  outline: 1px solid var(--focus-ring);
  outline-offset: -2px;
}

.header:hover {
  opacity: 0.82;
}

.icon {
  display: grid;
  width: 1lh;
  height: 1lh;
  place-items: center;
  color: var(--text-tertiary);
}

.heading {
  overflow: hidden;
  min-width: 0;
  color: inherit;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.summary {
  overflow: hidden;
  min-width: 0;
  color: var(--text-tertiary);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chevron {
  display: grid;
  width: 1lh;
  height: 1lh;
  place-items: center;
  color: var(--text-tertiary);
  transform-origin: center;
  transition: transform 160ms ease;
}

.chevron[data-collapsed="true"] {
  transform: rotate(-90deg);
}

.body {
  display: grid;
  min-width: 0;
  grid-template-rows: 1fr;
  opacity: 1;
  padding: var(--space-2) var(--composer-inner-padding-inline)
    var(--composer-inner-padding-block);
  transition:
    grid-template-rows 180ms cubic-bezier(0.2, 0.8, 0.2, 1),
    opacity 140ms ease,
    padding-block 180ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

.body[data-collapsed="true"] {
  grid-template-rows: 0fr;
  opacity: 0;
  padding-top: 0;
  padding-bottom: 0;
  pointer-events: none;
}

.bodyInner {
  overflow: hidden;
  min-height: 0;
}

@media (prefers-reduced-motion: reduce) {
  .header,
  .chevron,
  .body {
    transition: none;
  }
}
