/**
 * @file
 * Styles for taxonomy background swap region.
 *
 * Background images render through a real <img> element.
 * The full width is preserved and vertical cropping is handled
 * by the display behavior using the saved focal point.
 */

.region-highlighted {
  position: relative;
  overflow: hidden;
  width: 100vw !important;
  margin-left: calc(-50vw + 50%) !important;
}

.region-highlighted:not(:has(.highlights-background img)) {
  min-height: 400px !important;
}

/* <img> rendered by block view mode */
.region-highlighted .highlights-background {
  position: relative !important;
  width: 100% !important;
  max-height: 400px !important;
  overflow: hidden !important;
  z-index: 0;
}

.region-highlighted .highlights-background img {
  width: 100% !important;
  height: auto !important;
  display: block !important;
  transform: translateY(var(--taxonomy-background-offset-y, 0px));
}

.region-highlighted::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.4);
  z-index: 1;
  pointer-events: none;
}
