/* PGA / Elxis 5.6 — Consistent caption + inline attribution (v2.6)
   Intentionally uses a NEW filename to bypass stale v2.4 CDN/browser caches.
   Applies to both credited and caption-only primary-image figures generated by v2.6 article view.
   Existing manually-authored figure + p.attribution content is unaffected.
*/

/* An ordinary image caption gets the same quiet visual treatment as the
   caption section of a credited image, without an empty credit section. */
.elx_article_page figure.elx5_content_imagebox.pga-image-caption-only > figcaption {
    display: block;
    margin: 13px 0 0 !important;
    padding: 11px 16px 10px !important;
    background: #f4f6f8;
    border: 0 !important;
    border-radius: 12px !important;
    color: #465566;
    font-size: 15px;
    font-weight: 400;
    line-height: 1.5;
    text-align: left !important;
    box-sizing: border-box;
}

/* Shared panel, preserving caption and credit within semantic figcaption. */
.elx_article_page figure.elx5_content_imagebox.pga-image-has-credit > figcaption.pga-image-details {
    display: block;
    margin: 13px 0 0 !important;
    padding: 0 !important;
    background: #f4f6f8;
    color: #465566;
    text-align: left !important;
    font-weight: 400;
    line-height: 1.5;
    border: 0;
    border-radius: 12px;
    overflow: hidden;
}

/* Editorial caption retains priority over the copyright credit. */
.elx_article_page figure.elx5_content_imagebox.pga-image-has-credit > figcaption.pga-image-details > p.image-caption {
    display: block;
    margin: 0 !important;
    padding: 11px 16px 10px;
    background: transparent;
    border: 0;
    border-bottom: 1px solid #d8e0e8;
    border-radius: 0;
    color: #465566;
    font-size: 15px;
    font-weight: 400;
    line-height: 1.5;
    text-align: left !important;
}

/* Compact, always-visible copyright credit. */
.elx_article_page figure.elx5_content_imagebox.pga-image-has-credit > figcaption.pga-image-details > p.attribution {
    display: block;
    margin: 0 !important;
    padding: 8px 16px 10px;
    background: transparent;
    border: 0;
    border-radius: 0;
    color: #596779;
    font-size: 13px !important;
    font-weight: 400;
    line-height: 1.5;
    text-align: left !important;
}

/* Explicitly override v2.4/global rules that display CREDIT as a block. */
.elx_article_page figure.elx5_content_imagebox.pga-image-has-credit > figcaption.pga-image-details > p.attribution > span.pga-credit-label {
    display: inline !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0;
    color: inherit;
    font-size: inherit;
    font-weight: 600;
    line-height: inherit;
    letter-spacing: normal !important;
    text-transform: none !important;
    vertical-align: baseline;
}

/* Muted, readable links with ordinary weight. */
.elx_article_page figure.elx5_content_imagebox.pga-image-has-credit > figcaption.pga-image-details > p.attribution a {
    color: #245b89;
    font-size: inherit !important;
    font-weight: 400 !important;
    text-decoration: underline;
    text-decoration-color: #a8bbcf;
    text-underline-offset: 2px;
}
.elx_article_page figure.elx5_content_imagebox.pga-image-has-credit > figcaption.pga-image-details > p.attribution a:hover,
.elx_article_page figure.elx5_content_imagebox.pga-image-has-credit > figcaption.pga-image-details > p.attribution a:focus-visible {
    color: #003d70;
    text-decoration-color: currentColor;
}

/* Retain small licence badges/icons inside the credit. */
.elx_article_page figure.elx5_content_imagebox.pga-image-has-credit > figcaption.pga-image-details > p.attribution img {
    display: inline-block;
    width: auto;
    height: 12px !important;
    max-width: none;
    margin: 0 2px 0 0 !important;
    vertical-align: -1px;
    opacity: 0.85;
}

/* Do not generate duplicate CREDIT headings from older custom styles. */
.elx_article_page figure.elx5_content_imagebox.pga-image-has-credit > figcaption.pga-image-details > p.attribution::before {
    content: none !important;
    display: none !important;
}
