/* ==========================================================================
   NEWS POST INFO - date | categories | authors
   ========================================================================== */

/* Printed at the top of the news article, it waits hidden until the script after the content blocks moves it
   before the first element (framework/includes/news-post-info.php). With no element (or no JS) it is never shown */
.pg-sin-npi {
    display: none;
}

/* Space between the parts. The separator is drawn in the middle of it */
.fce-news-post-info {
    --npi-gap: 19px;
}

.fce-news-post-info .fce-npi-1 {
    margin-bottom: 10px;
}

.fce-news-post-info .fce-npi-2 {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    row-gap: 4px;
}

/* Separator - after a part that is followed by another visible part. It flows with the text, so it always sits
   right after the last word, also when a part wraps onto more lines; the next line starts without one.
   Hidden parts (switched off, or empty) are skipped, also in the editor where they stay in the page */
.fce-news-post-info .fce-npi-item:has(~ .fce-npi-item:not(:empty):not([data-show="false"]))::after {
    content: '\2060';                       /* invisible word joiner: keeps the separator on the same line as the last word */
    padding: 0 calc(var(--npi-gap) / 2);    /* the gap, split evenly around the line */
    background: linear-gradient(currentColor, currentColor) center / 1px 10px no-repeat;   /* the 1px x 10px line, centred */
    opacity: 0.5;
}

/* Empty or switched off parts take no space, so no separator is left behind */
.fce-news-post-info .fce-npi-item:empty,
.fce-news-post-info .fce-npi-item[data-show="false"] {
    display: none;
}

.fce-news-post-info .fce-npi-author-link {
    font-weight: 700;
    text-decoration: underline;
    text-underline-offset: 1px;
}

/* Text colors - follow the page color theme. Date, categories and authors share one color.
   This is also the author link's Default state, and how the editor and its preview show the names */
.fce-news-post-info.dark,
.fce-news-post-info.dark .fce-npi-author-link {
    color: var(--bagels-dark);
}

.fce-news-post-info.light,
.fce-news-post-info.light .fce-npi-author-link {
    color: #ffffff;
}

/* Author link states - only the live site's names are links (a); the editor and its preview show plain names */

/* Hover (desktop, like the theme's other links) */
@media (min-width: 992px) {
    .fce-news-post-info.dark a.fce-npi-author-link:hover {
        color: var(--bagels-bright_color_a_600);
    }

    .fce-news-post-info.light a.fce-npi-author-link:hover {
        color: var(--bagels-bright_color_a_400);
    }
}

/* Disabled */
.fce-news-post-info.dark a.fce-npi-author-link.disabled,
.fce-news-post-info.dark a.fce-npi-author-link[aria-disabled="true"] {
    color: var(--bagels-neutral_500);
    text-decoration: none;
    pointer-events: none;
}

.fce-news-post-info.light a.fce-npi-author-link.disabled,
.fce-news-post-info.light a.fce-npi-author-link[aria-disabled="true"] {
    color: var(--bagels-neutral_600);
    text-decoration: none;
    pointer-events: none;
}

@media (max-width: 992px){
 .fce-news-post-info.dark a.fce-npi-author-link:active:hover {
        color: var(--bagels-bright_color_a_600);
    }

    .fce-news-post-info.light a.fce-npi-author-link:active:hover {
        color: var(--bagels-bright_color_a_400);
    }
}
