/* AI label overlay (EU badge) on top of an image - see AI-MAERKNING.md and Helpers/AiLabelService.cs.
   Only loaded on pages that show a label (Views/Shared/Partials/_AiLabel.cshtml), and only .ai-label* classes are used.
   The overlay keeps the same size on all screens (Jimmy 19-11-2026), as in the backend preview:
     badge width  = --ai-size x 8px (the size setting 8-30), at least 80px, at most 50 % of the image width
     margin       = 4 % of the shortest side, at most 16px
     left / top   = margin + --ai-x / --ai-y (0-1) x the free space inside the margin
   (A label burned into the image is still a % of the image, see /aiimage/badge.aspx.)
   The layer covers the image (inset: 0) and is a size container, so cqw / cqh / cqmin are the image's own size. */

.ai-label-host {
    position: relative;
}

.ai-label {
    position: absolute;
    inset: 0;
    z-index: 3;
    display: block;
    container-type: size;
    pointer-events: none;
}

.ai-label-badge {
    --ai-bw: min(max(80px, calc(var(--ai-size, 15) * 8px)), 50cqw);
    --ai-m: min(4cqmin, 16px);
    position: absolute;
    width: var(--ai-bw);
    height: auto;
    max-width: none;
    margin: 0;
    left: calc(var(--ai-m) + var(--ai-x, 1) * (100cqw - var(--ai-bw) - 2 * var(--ai-m)));
    top: calc(var(--ai-m) + var(--ai-y, 1) * (100cqh - var(--ai-bw) / var(--ai-ratio, 5.2083) - 2 * var(--ai-m)));
}

/* A header banner with a mobile image (bannermobile): the header image's label on wide screens,
   the mobile image's label on phones (same breakpoint as the mobile image, 749px). */
@media (max-width: 749px) {
    .ai-label.ai-label-wide {
        display: none;
    }
}

@media (min-width: 750px) {
    .ai-label.ai-label-narrow {
        display: none;
    }
}
