/**
 * AI content labelling — EU AI Act Article 50 / Code of Practice on
 * transparency of AI-generated content.
 *
 * The badge artwork is the European Commission's official "AI GENERATED" /
 * "AI MODIFIED" label (white transparent variant: dark text on a translucent
 * white pill, legible over any image). These styles position it on article
 * covers and cards; the registry behind it lives in data/ai-image-provenance.php.
 */

/* --- Badge on cards (blog grid, related posts, homepage featured, about) ---
   The card image containers are flex rows pinned to the top of the image, so
   the badge is a flex sibling pushed to the right-hand corner. */
.blog-card-image > .ai-badge,
.blog-featured-image > .ai-badge {
    position: relative;
    z-index: 1;
    margin-left: auto;
    flex: 0 0 auto;
    line-height: 0;
}

.ai-badge img {
    display: block;
    height: 20px;
    width: auto;
    border-radius: 100px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.35);
}

/* --- Badge on the article hero cover (absolutely positioned top-right) --- */
.article-cover .ai-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 2;
    line-height: 0;
}

.article-cover .ai-badge img {
    height: 30px;
}

/* --- Hero figure wrapper + caption ----------------------------------------
   The cover used to BE the <figure>, so it picked up the UA figure margins
   (1em top, 40px sides). The wrapper keeps those margins so the layout does
   not shift, and the caption sits directly beneath the image. */
.article-cover-wrap {
    margin: 1em 40px 24px;
}

.article-cover-wrap .article-cover {
    margin-bottom: 6px;
}

.article-cover-caption {
    font-size: 0.78rem;
    color: var(--text-muted);
    display: flex;
    flex-wrap: wrap;
    gap: 4px 8px;
    align-items: baseline;
}

.article-cover-caption a {
    color: var(--eu-light);
    text-decoration: none;
}

.article-cover-caption a:hover {
    text-decoration: underline;
}

/* --- /ai-transparency page register --------------------------------------- */
.ai-register {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
    margin: 16px 0 32px;
}

.ai-register th {
    text-align: left;
    color: var(--text-primary);
    font-weight: 600;
    padding: 10px 14px;
    border-bottom: 1px solid var(--glass-border-hover);
}

.ai-register td {
    padding: 10px 14px;
    color: var(--text-secondary);
    border-bottom: 1px solid var(--glass-border);
    vertical-align: middle;
}

.ai-register tr:last-child td {
    border-bottom: none;
}

.ai-register .ai-register-label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
}

.ai-register .ai-register-label img {
    height: 18px;
    width: auto;
    border-radius: 100px;
}

.ai-register .ai-register-confidence {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.ai-label-demo {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    align-items: center;
    margin: 16px 0 8px;
}

.ai-label-demo img {
    height: 34px;
    width: auto;
    border-radius: 100px;
    background: rgba(255, 255, 255, 0.06);
}

@media (max-width: 600px) {
    .article-cover .ai-badge img {
        height: 22px;
    }

    .ai-badge img {
        height: 18px;
    }
}
