:host {
  display: block;
  width: 100%;
}

  :host * {
    box-sizing: border-box;
  }

.data-cell-stack {
  display: flex;
  flex-direction: column;
  width: 100%;
  gap: var(--s-space-16);
}

.data-cell-stack__header {
  display: flex;
  align-items: flex-start;
  gap: var(--s-space-8);
  width: 100%;
  justify-content: space-between;
}

.data-cell-stack__header-content {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--s-space-4);
}

.data-cell-stack__label {
  font-size: var(--s-font-size-base);
  line-height: var(--s-line-height-base);
  color: var(--s-text-default);
  font-weight: var(--s-font-weight-semibold);
  margin: 0;
}

.data-cell-stack__description {
  font-size: var(--s-font-size-sm);
  line-height: var(--s-line-height-sm);
  color: var(--s-text-subdued);
  margin: 0;
}

.data-cell-stack__cells {
  display: flex;
  flex-direction: column;
  gap: var(--s-space-2);
}

/* First cell: large top corners, small bottom corners */
.data-cell-stack__cells
  ::slotted(swirl-data-cell:first-of-type:not(:last-of-type)) {
  --swirl-data-cell-border-radius: var(--s-border-radius-l)
    var(--s-border-radius-l) var(--s-border-radius-s) var(--s-border-radius-s);
}

/* Last cell: small top corners, large bottom corners */
.data-cell-stack__cells
  ::slotted(swirl-data-cell:last-of-type:not(:first-of-type)) {
  --swirl-data-cell-border-radius: var(--s-border-radius-s)
    var(--s-border-radius-s) var(--s-border-radius-l) var(--s-border-radius-l);
}

/* Middle cells: small corners on all sides */
.data-cell-stack__cells
  ::slotted(swirl-data-cell:not(:first-of-type):not(:last-of-type)) {
  --swirl-data-cell-border-radius: var(--s-border-radius-s);
}

/* Single cell: large corners on all sides (must come last to override) */
.data-cell-stack__cells ::slotted(swirl-data-cell:first-of-type:last-of-type) {
  --swirl-data-cell-border-radius: var(--s-border-radius-l);
}

.data-cell-stack__cta {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}
