/* ==========================================================================
   AI Article Builder 2.0 — front-end styles
   Deliberately minimal and theme-friendly: colours inherit from the theme,
   only spacing, shape and rhythm are defined here.
   ========================================================================== */

.aia-article-content {
    --aia-front-radius: 14px;
    --aia-front-border: rgba(16, 24, 40, .12);
    --aia-front-font: "Changa", -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Kufi Arabic", Tahoma, Roboto, sans-serif;
    overflow-wrap: break-word;
}

/* The plugin's own widgets use the plugin font; the article body keeps the
   theme typography. */
.aia-related-articles,
.aia-author-box,
.aia-read-more {
    font-family: var(--aia-front-font, "Changa", Tahoma, sans-serif);
}

.aia-article-content figure.aia-figure {
    margin: 26px 0;
    text-align: center;
}

.aia-article-content figure.aia-figure img {
    display: block;
    max-width: 100%;
    height: auto;
    margin: 0 auto;
    border-radius: var(--aia-front-radius);
}

/* AI disclosure under a generated illustration: quiet, honest, readable. */
.aia-article-content figure.aia-figure figcaption.aia-figcaption {
    margin: 8px auto 0;
    max-width: 46em;
    font-size: .82em;
    line-height: 1.5;
    font-style: italic;
    opacity: .72;
    text-align: center;
}

.aia-ad {
    margin: 26px 0;
    text-align: center;
    clear: both;
    overflow: hidden;
}

.aia-ad + .aia-ad {
    margin-top: 18px;
}

.aia-read-more {
    margin: 26px 0 0;
    font-weight: 600;
}

.aia-internal-link {
    text-decoration-thickness: 1px;
    text-underline-offset: 2px;
}

/* Source credit: small, quiet, clearly secondary. */
.aia-source-credit {
    margin: 24px 0 0;
    font-size: .82em;
    line-height: 1.6;
    opacity: .7;
}

.aia-source-credit a {
    text-decoration: underline;
    text-underline-offset: 2px;
}

/* ---------------------------------------------------------- related box */
.aia-related-articles {
    margin: 34px 0;
    padding: 20px 22px;
    border: 1px solid var(--aia-front-border, rgba(16, 24, 40, .12));
    border-radius: 14px;
    background: rgba(16, 24, 40, .025);
}

.aia-related-title {
    margin: 0 0 12px !important;
    font-size: 1.05em;
    letter-spacing: .01em;
}

.aia-related-list {
    margin: 0 !important;
    padding-inline-start: 20px !important;
}

.aia-related-list li {
    margin: 0 0 8px;
    line-height: 1.5;
}

.aia-related-list li:last-child {
    margin-bottom: 0;
}

/* ----------------------------------------------------------- author box */
.aia-author-box {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    margin: 34px 0;
    padding: 18px 20px;
    border: 1px solid var(--aia-front-border, rgba(16, 24, 40, .12));
    border-radius: 14px;
    background: rgba(16, 24, 40, .025);
}

.aia-author-avatar {
    flex: 0 0 auto;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    object-fit: cover;
    display: block;
}

.aia-author-body {
    min-width: 0;
}

.aia-author-label {
    display: block;
    font-size: .72em;
    letter-spacing: .08em;
    text-transform: uppercase;
    opacity: .65;
    margin-bottom: 2px;
}

.aia-author-name {
    display: block;
    font-size: 1.02em;
    margin-bottom: 4px;
}

.aia-author-bio {
    margin: 0 !important;
    font-size: .92em;
    line-height: 1.55;
    opacity: .85;
}

@media (max-width: 600px) {
    .aia-author-box {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
}
