.canvas-list {
  width: 100%;
  max-width: 760px;
  margin-inline: auto;
}

.canvas-list__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--ms-space-4);
  margin-bottom: 24px;
}

.canvas-list__header-text {
  min-width: 0;
}

.canvas-list__title {
  margin: 0;
  color: var(--ms-color-foreground);
  font-size: var(--ms-text-section);
  font-weight: 650;
  line-height: var(--ms-leading-section);
}

.canvas-list__description {
  margin: 2px 0 0;
  color: var(--ms-color-muted-foreground);
  font-size: var(--ms-text-label);
  line-height: var(--ms-leading-label);
}

.canvas-list__create-button {
  flex-shrink: 0;
}

.canvas-list__loading {
  margin: 0;
  color: var(--ms-color-muted-foreground);
  font-size: var(--ms-text-body);
  line-height: var(--ms-leading-body);
}

.canvas-list__toolbar {
  display: grid;
  gap: var(--ms-space-2);
  margin-bottom: var(--ms-space-3);
}

.canvas-list-search {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: var(--ms-space-2);
}

.canvas-list-search__icon {
  display: inline-flex;
  flex-shrink: 0;
  color: var(--ms-color-muted-foreground);
}

.canvas-list-search__input {
  min-width: 0;
  height: 32px;
  flex: 1;
  font-size: var(--ms-text-label);
  line-height: var(--ms-leading-label);
}

.canvas-list-filter {
  display: flex;
  flex-wrap: wrap;
  gap: var(--ms-space-1);
}

.canvas-list-filter__button {
  min-width: 0;
  height: 30px;
  padding-inline: 10px;
  font-size: var(--ms-text-label);
  line-height: var(--ms-leading-label);
}

.canvas-list__summary {
  margin: 0 0 var(--ms-space-2);
  color: var(--ms-color-muted-foreground);
  font-size: var(--ms-text-caption);
  line-height: var(--ms-leading-caption);
}

.canvas-list-empty {
  padding-block: 64px;
}

.canvas-list-empty__action {
  height: auto;
  padding-inline: 0;
  color: var(--ms-color-muted-foreground);
  font-size: var(--ms-text-label);
  line-height: var(--ms-leading-label);
}

.canvas-list-empty__action:hover {
  color: var(--ms-color-foreground);
}

.canvas-list-error {
  padding: var(--ms-space-4);
  font-size: var(--ms-text-label);
  line-height: var(--ms-leading-label);
}

.canvas-list__items {
  display: grid;
  gap: var(--ms-space-2);
}

.canvas-list-pagination {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: var(--ms-space-2);
  margin-top: var(--ms-space-3);
}

.canvas-list-pagination__status {
  margin: 0;
  color: var(--ms-color-muted-foreground);
  font-size: var(--ms-text-caption);
  line-height: var(--ms-leading-caption);
}

.canvas-list-pagination__button {
  min-width: 28px;
}

.canvas-list-item {
  display: flex;
  align-items: center;
  gap: var(--ms-space-3);
  padding: var(--ms-space-3) var(--ms-space-4);
  box-shadow: var(--ms-shadow-sm);
}

.canvas-list-item__icon,
.canvas-list-item__type-icon {
  display: inline-flex;
  flex-shrink: 0;
}

.canvas-list-item__icon {
  color: var(--ms-color-muted-foreground);
}

.canvas-list-item__icon[data-canvas-type="inspiration"] {
  color: var(--ms-color-warning, var(--ms-color-primary));
}

.canvas-list-item__icon[data-canvas-type="workflow"] {
  color: var(--ms-color-primary);
}

.canvas-list-item__body {
  min-width: 0;
  flex: 1;
}

.canvas-list-item__name {
  overflow: hidden;
  margin: 0;
  color: var(--ms-color-foreground);
  font-size: var(--ms-text-body);
  font-weight: 500;
  line-height: var(--ms-leading-body);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.canvas-list-item__meta {
  overflow: hidden;
  margin: 2px 0 0;
  color: var(--ms-color-muted-foreground);
  font-size: var(--ms-text-caption);
  line-height: var(--ms-leading-caption);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.canvas-list-item__name-input {
  height: 32px;
  font-size: var(--ms-text-body);
  line-height: var(--ms-leading-body);
}

.canvas-list-item__type {
  flex-shrink: 0;
  gap: var(--ms-space-1);
  padding: 2px var(--ms-space-2);
  font-size: var(--ms-text-caption);
  font-weight: 500;
  line-height: var(--ms-leading-caption);
}

.canvas-list-item__actions {
  display: flex;
  flex-shrink: 0;
  align-items: center;
  gap: var(--ms-space-2);
}

.canvas-list-item__action {
  flex-shrink: 0;
}

.canvas-list-item__action[data-muted="true"] {
  color: var(--ms-color-muted-foreground);
}

.canvas-list-create-dialog {
  width: 480px;
  max-width: 90vw;
}

.canvas-list-create-dialog__body {
  display: grid;
  gap: var(--ms-space-4);
}

.canvas-list-create-dialog__field {
  min-width: 0;
}

.canvas-list-create-dialog__label {
  margin-bottom: 6px;
  color: var(--ms-color-muted-foreground);
  font-size: var(--ms-text-label);
  font-weight: 500;
  line-height: var(--ms-leading-label);
}

.canvas-list-create-dialog__type-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--ms-space-2);
}

.canvas-list-create-type {
  align-items: flex-start;
  height: auto;
  text-align: left;
}

.canvas-list-create-type .ms-button__content {
  display: block;
  min-width: 0;
}

.canvas-list-create-type__label {
  display: flex;
  align-items: center;
  gap: 6px;
  color: inherit;
  font-size: var(--ms-text-label);
  font-weight: 500;
  line-height: var(--ms-leading-label);
}

.canvas-list-create-type__description {
  display: block;
  margin-top: var(--ms-space-1);
  color: var(--ms-color-muted-foreground);
  font-size: var(--ms-text-caption);
  line-height: var(--ms-leading-caption);
}

.canvas-list-create-type__description[data-selected="true"] {
  color: color-mix(in srgb, var(--ms-color-background) 75%, transparent);
}

.canvas-list-create-dialog__actions {
  display: flex;
  gap: var(--ms-space-2);
  padding-top: var(--ms-space-1);
}

.canvas-list-create-dialog__action[data-stretch="true"] {
  flex: 1;
}

@media (min-width: 720px) {
  .canvas-list__toolbar {
    grid-template-columns: minmax(240px, 1fr) auto;
    align-items: center;
  }

  .canvas-list__summary {
    text-align: right;
  }
}

@media (max-width: 640px) {
  .canvas-list__header,
  .canvas-list-item,
  .canvas-list-create-dialog__actions {
    align-items: stretch;
  }

  .canvas-list__header,
  .canvas-list-item {
    flex-direction: column;
  }

  .canvas-list__create-button,
  .canvas-list-item__actions,
  .canvas-list-item__action {
    width: 100%;
  }

  .canvas-list-item__actions {
    justify-content: stretch;
  }

  .canvas-list-item__actions .ms-button--icon,
  .canvas-list-item__actions .ms-button--icon-sm {
    width: 34px;
  }

  .canvas-list-item__type {
    align-self: flex-start;
  }

  .canvas-list-pagination {
    justify-content: space-between;
  }
}
