/**
 * EU AI label badge (bs_ai_label).
 *
 * The label is an overlay in the user interface, not part of the image file.
 * That keeps it the same size on every teaser and stops it from scaling with
 * hover zoom effects on the image. Commission Guidelines C(2026) 5054 and the
 * Code of Practice (sub-measure 1.2.1 c) accept a user interface overlay as
 * equivalent to an icon embedded in the content.
 *
 * The icon is a background image, not an <img>. Components style their images
 * individually (fixed heights, object-fit, hover transforms), and every one of
 * those rules would otherwise apply to the badge too.
 *
 * Width, edge distance, icon and its aspect ratio come from the settings page
 * as custom properties on the element; the values here are only fallbacks.
 */
.ai-label {
  position: absolute;
  right: var(--ai-label-gap, 16px);
  bottom: var(--ai-label-gap, 16px);
  z-index: 2;
  display: block;
  /* Same size everywhere; on an image too narrow to carry it the badge
     shrinks rather than switching layout, capped at the same 60 % share the
     burned-in label uses. */
  width: var(--ai-label-width, 150px);
  max-width: 60%;
  margin: 0;
  padding: 0;
  pointer-events: none;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.6));
}

.ai-label__icon {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: var(--ai-label-ratio, 600 / 190);
  background-image: var(--ai-label-icon);
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
  /* Keep the badge on paper and in PDF exports. */
  print-color-adjust: exact;
  -webkit-print-color-adjust: exact;
}

.ai-label__text {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

@media print {
  .ai-label {
    filter: none;
  }
}
