/* Real DarkerDB item artwork layered over the existing category-icon fallback. */

.alert-card .card-header {
  min-height: 96px;
  padding-left: 108px !important;
}

/* Keep the visible category fallback and loaded item artwork the same size. */
.alert-card .card-header > .alert-item-icon,
.alert-card .card-header > .alert-item-artwork-image {
  position: absolute;
  top: 0;
  left: 0;
  width: 96px !important;
  height: 96px !important;
  box-sizing: border-box;
}

.alert-card .card-header > .alert-item-icon {
  display: grid;
  place-items: center;
  font-size: 2rem !important;
}

.alert-card .card-header > .alert-item-artwork-image {
  z-index: 2;
  display: block;
  margin: 0 !important;
  padding: 6px;
  object-fit: contain;
  /* Keep source artwork and its shadow inside the fallback icon frame. */
  clip-path: inset(0 round 4px);
  opacity: 0;
  pointer-events: none;
  filter: drop-shadow(0 3px 5px rgba(0, 0, 0, 0.48));
  transition: opacity 140ms ease;
}

.alert-card .card-header > .alert-item-artwork-image.is-loaded {
  opacity: 1;
}

.alert-card.has-item-artwork .alert-item-icon {
  color: transparent !important;
  text-shadow: none !important;
}

.alerts-grid.is-compact .alert-card .card-header {
  min-height: 72px !important;
  padding-left: 82px !important;
}

.alerts-grid.is-compact .alert-card .card-header > .alert-item-icon,
.alerts-grid.is-compact .alert-card .card-header > .alert-item-artwork-image {
  width: 72px !important;
  height: 72px !important;
}

@media (max-width: 560px) {
  .alert-card .card-header {
    min-height: 112px !important;
    padding-left: 124px !important;
  }

  .alert-card .card-header > .alert-item-icon,
  .alert-card .card-header > .alert-item-artwork-image {
    width: 112px !important;
    height: 112px !important;
  }

  .alert-card .card-header > .alert-item-icon {
    font-size: 2.35rem !important;
  }

  .alerts-grid.is-compact .alert-card .card-header {
    min-height: 72px !important;
    padding-left: 82px !important;
  }

  .alerts-grid.is-compact .alert-card .card-header > .alert-item-icon,
  .alerts-grid.is-compact .alert-card .card-header > .alert-item-artwork-image {
    width: 72px !important;
    height: 72px !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  .alert-card .card-header > .alert-item-artwork-image {
    transition: none;
  }
}
