/* Forum read state: which threads a member has read (ForumThreadsContentView, ForumActivityList).

   The server says what each thread is to the member (ForumThreadReadRules) and the components put a class on
   it. An unread thread keeps its bold title. A read thread's title is regular weight in the secondary text
   colour. A thread with replies since the member last opened it stays bold and gets a small dot.

   Global rather than local because a client (WASM) component's scoped .razor.css never loads, and an in-body
   <style> misses the prerender first paint. */

/* Thread list row. The component's own in-body rule sets ".thread-title-text { font-weight: 700; }" (also inside
   its 900px media query), so this needs two classes to win. */
.row-container--read .thread-title-text {
    font-weight: 400;
    color: var(--mud-palette-text-secondary);
}

/* The dot before the words of the title of a thread with new replies. It is inside the title and flows with its
   text, so it stays on the title's first line however the row wraps. A still dot, in the same blue as the
   latest-activity dot in both themes. Raised above the row's stretched link so its hover text shows; a click on
   it still opens the thread, because it is inside the link. */
.thread-new-dot {
    display: inline-block;
    width: 0.55rem;
    height: 0.55rem;
    border-radius: 50%;
    background: var(--mud-palette-secondary);
    margin-right: 0.4rem;
    vertical-align: middle;
    position: relative;
    top: -0.08em;
    z-index: 1;
}

/* Activity feed title. Its weight used to be an inline style on the MudLink, which the read rule could not lower.
   Two classes, so it beats MudBlazor's one-class ".mud-typography-body2" weight whatever order the stylesheets are
   linked in. */
.activity-item-header .activity-thread-title {
    font-weight: 600;
}

/* The title is a MudLink with Color.Inherit, and MudBlazor's class for that sets "color: inherit !important",
   so only an !important rule with more classes can give a read title its colour. Three classes, so it also beats
   the rule above. */
.activity-item-header.activity-item--read .activity-thread-title {
    font-weight: 400;
    color: var(--mud-palette-text-secondary) !important;
}

/* Words for screen readers only: an unread row's title starts with a hidden "Unread: ". The app has no such
   utility class, so this is the standard clip pattern. */
.forum-sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Windows forced colours drops author backgrounds, and both dots are a background only, so they vanished. Keep
   them, in the text colour. The feed dot is scoped to the avatar column because MyNotifications.razor has its own
   local ".unread-dot". */
@media (forced-colors: active) {
    .thread-new-dot {
        forced-color-adjust: none;
        background: CanvasText;
    }

    .activity-header-avatar .unread-dot {
        forced-color-adjust: none;
        background: CanvasText;
    }
}
