sparkle-card {
  display: block;
  font-size: 12px;
  max-width: 30em;
}

.Card {
  background-color: var(--background);
  border-radius: 4px;
  box-shadow: 0px 0.175em 0.5em rgba(2, 8, 20, 0.1), 0px 0.085em 0.175em rgba(2, 8, 20, 0.08);
  color: var(--text-color--light);
  display: flex;
  flex-direction: column;
  font-size: inherit;
  font-weight: normal;
  height: 100%;
  justify-content: flex-start;
  line-height: 1.6;
  transition: box-shadow 150ms ease, transform 150ms ease;
  width: 100%;
  overflow: hidden;
}

.Card-with-image {
  grid-row: span 2;
}

.Card-without-image {
  font-size: 12px;
}

.Card-container {
  padding: 1.65em 2em 1.65em;
}

.Card-image {
  width: 100%;
  height: auto;
}

.Card-icon,
.Card-iconset__container {
  width: 48px;
  height: 48px;

  margin-bottom: 1.2em;

  border-radius: 50%;
  object-fit: cover;
  background: rgb(246, 248, 251);
}

.Card-icon-hover {
  display: none;
}

.Card-iconset__container {
  position: relative;
}

.Card-iconset__container .Card-icon {
  position: absolute;
  opacity: 0;
  transition: 0.8s opacity;
}

.Card-iconset__container .Card-icon--active {
  opacity: 1;
}

.Card-ionicon {
  width: 48px;
  height: 48px;
  float: left;
  margin-right: 1em;
}

@media (hover: hover) {
  .Card[href]:hover {
    box-shadow: 0 0.35em 1.175em rgba(2, 8, 20, 0.1), 0 0.175em 0.5em rgba(2, 8, 20, 0.08);
    transform: translateY(-1px);
  }

  .Card[href]:hover .Card-icon-default {
    display: none;
  }

  .Card[href]:hover .Card-icon-hover {
    display: block;
  }
}

.Card-content > *:first-child {
  margin-top: 0;
}

.Card-content > *:last-child {
  margin-bottom: 0;
}

.Card-content > * {
  margin: 0 0 0.65em;
}

.Card-header {
  color: var(--text-color--dark);
  font-size: 1.4em;
  font-weight: 500;
  line-height: 1.4;
  margin-bottom: 0.45em;
}

.Card-without-image .Card-header {
  margin-bottom: 0.3em;
}

.Card-header > svg {
  fill: currentColor;
  height: 1em;
  margin-bottom: -0.125em;
  width: auto;
}

.Card-size-lg {
  font-size: 14px;
}

.Card-size-lg .Card-icon,
.Card-size-lg .Card-ionicon,
.Card-size-lg .Card-iconset__container {
  width: 80px;
  height: 80px;
}

.Card-size-lg.Card-without-image .Card-header {
  font-size: 20px;
}

sparkle-card.disabled,
sparkle-card[disabled] {
  position: relative;
}

sparkle-card.disabled::after,
sparkle-card[disabled]::after {
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  bottom: 0;
  background: rgba(232, 232, 232, 0.5);
  pointer-events: none;
  content: '';
}

aside sparkle-card {
  max-width: 240px;
}

aside .Card-container {
  display: grid;
  grid-template-columns: minmax(0, max-content) 1fr;
  grid-template-rows: minmax(0, min-content);
  grid-template-areas:
    'icon title'
    'icon body';
}

aside .Card-icon {
  width: 32px;
  height: 32px;
  margin-right: 16px;
  margin-bottom: 0;
  grid-area: icon;
}

aside .Card-header {
  grid-area: title;
}

aside .Card-header::after {
  background-image: url('/docs/assets/img/new-tab.svg');
  display: inline-block;
  height: 13px;
  width: 13px;
  background-size: 13px 13px;
  margin-left: 4px;
  content: '';
}

aside .Card-content {
  grid-area: body;
  /* https://stackoverflow.com/questions/5269713/css-ellipsis-on-second-line */
  max-height: 42px;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

aside .Card-icon + .Card-content {
  margin-top: -6px;
}

.markdown-content p sparkle-card {
  margin-top: 1em;
}
