$stacking-order: (
  image: 10,
  shadow: 20,
);

.Polaris-Thumbnail {
  position: relative;
  display: block;
  overflow: hidden;
  background: color(white);
  border-radius: border-radius();

  &::after {
    content: '';
    position: absolute;
    z-index: z-index(shadow, $stacking-order);
    top: 0;
    bottom: 0;
    left: 0;
    right: 0;
    display: block;
    box-shadow: inset 0 0 0 1px rgba(33, 43, 54, 0.1);
    border-radius: border-radius();
  }
}

.Polaris-Thumbnail--sizeSmall {
  height: rem(40px);
  width: rem(40px);
}

.Polaris-Thumbnail--sizeMedium {
  height: rem(60px);
  width: rem(60px);
}

.Polaris-Thumbnail--sizeLarge {
  height: rem(80px);
  width: rem(80px);
}

.Polaris-Thumbnail__Image {
  position: absolute;
  z-index: z-index(image, $stacking-order);
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  margin: auto;
  max-width: 100%;
  max-height: 100%;
}
