@import '../../styles/common';

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

.Thumbnail {
  position: relative;
  display: block;
  overflow: hidden;
  background: color('white');
  min-width: thumbnail-size(small);
  max-width: 100%;
  border-radius: border-radius();

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

.sizeSmall {
  width: thumbnail-size(small);
}

.sizeMedium {
  width: thumbnail-size(medium);
}

.sizeLarge {
  width: thumbnail-size(large);
}

.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%;
}
