/* AI-label op afbeeldingen - zie inc/ai-image-label.php */

/* Wrapper die het JS rond elke <img> (of <picture>) legt.
   inline-block + line-height:0 houdt de layout zo dicht mogelijk bij de originele img. */
.ai-img-wrap {
    position: relative;
    display: inline-block;
    max-width: 100%;
    vertical-align: top;
    line-height: 0;
}

/* De chip zelf. Eigen achtergrond -> blijft altijd leesbaar op gelijk welk beeld. */
.ai-img-label {
    position: absolute;
    z-index: 5;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 8px;
    border-radius: 999px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
    font-size: 11px;
    font-weight: 700;
    line-height: 1;
    letter-spacing: 0.04em;
    color: #ffffff;
    background: rgba(13, 22, 18, 0.60);
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.28);
    backdrop-filter: blur(5px) saturate(1.1);
    -webkit-backdrop-filter: blur(5px) saturate(1.1);
    pointer-events: none;
    -webkit-user-select: none;
    user-select: none;
    transition: background-color 0.18s ease, color 0.18s ease;
}

.ai-img-label .ai-img-label__dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: currentColor;
    opacity: 0.85;
    flex: 0 0 auto;
}

/* Hoekposities */
.ai-img-wrap.ai-pos-br .ai-img-label { right: 8px;  bottom: 8px; }
.ai-img-wrap.ai-pos-bl .ai-img-label { left: 8px;   bottom: 8px; }
.ai-img-wrap.ai-pos-tr .ai-img-label { right: 8px;  top: 8px; }
.ai-img-wrap.ai-pos-tl .ai-img-label { left: 8px;   top: 8px; }

/* Auto-contrast: op een licht beeldgedeelte -> donkere chip op lichte pil. */
.ai-img-wrap.ai-on-light .ai-img-label {
    color: #0b1a14;
    background: rgba(255, 255, 255, 0.78);
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.18);
}

/* Enkel voor schermlezers */
.ai-img-label .ai-img-label__sr {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
    border: 0;
}

@media (prefers-reduced-motion: reduce) {
    .ai-img-label { transition: none; }
}
