/* League chat - the panel Chat in the sidebar opens; see
   app/helpers/league_chat_helpers.php and assets/js/league-chat.js. The m-site
   Chat tab is this panel standing as the page; mobile.css places it there.

   It stands against the sidebar's right edge for the full height of the window.
   On a screen 1280px or wider the page makes way for it: the score strip, the
   page and everything measured from the content's edge move right by its width
   (--chat-push, in main.css). Narrower, it covers them. It sits one layer under
   the sidebar (40), so it slides out from behind it when it opens and back
   behind it to close. Its width is --chat-panel-width, one number for the panel
   and for the room made for it. */
.chatPanel {
    background: var(--c-surface);
    bottom: var(--db-edge-gap);
    box-shadow: var(--shadow-drawer);
    box-sizing: border-box;
    color: var(--c-text-primary);
    display: flex;
    flex-direction: column;
    font-family: var(--ff-body);
    left: calc(var(--db-edge-gap) + var(--sb-width) + var(--db-sidebar-gap));
    position: fixed;
    top: var(--db-edge-gap);
    transform: translateX(-100%);
    transition: transform 220ms cubic-bezier(.2, .8, .2, 1), width 200ms ease;
    width: min(var(--chat-panel-width), calc(100vw - var(--sb-width) - 24px));
    z-index: 38;
}

.chatPanel[hidden] {
    display: none;
}

.chatPanel.is-open {
    transform: translateX(0);
}

@media (prefers-reduced-motion: reduce) {
    .chatPanel {
        transition: none;
    }
}

/* --- Header: "Chat", the forum's season, and close ------------------------ */
.chatPanelHeader {
    align-items: center;
    background: var(--c1);
    color: var(--c-surface);
    display: flex;
    flex: 0 0 auto;
    padding: 12px 10px 12px 16px;
}

.chatPanelTitleGroup {
    align-items: center;
    display: flex;
    flex: 1 1 auto;
    gap: 4px;
    min-width: 0;
}

.chatPanelTitle {
    font-family: var(--ff-body);
    font-size: var(--fs-big2);
    font-weight: var(--fw4);
    line-height: 1.2;
    margin: 0;
}

.chatPanelHeaderButton {
    appearance: none;
    -webkit-appearance: none;
    align-items: center;
    background: none;
    border: 0;
    border-radius: var(--r2);
    color: rgba(255, 255, 255, .7);
    cursor: pointer;
    display: inline-flex;
    flex: 0 0 auto;
    font-size: var(--fs-body);
    height: 32px;
    justify-content: center;
    width: 32px;
}

/* Pin, beside the close: its glyph over a word, so the control says what it is
   without being pressed. Taller than the round header buttons and so sized to
   its contents rather than to their square. */
.chatPanelPinButton {
    flex-direction: column;
    gap: 1px;
    line-height: 1;
    height: 32px;
    width: 32px;
}

.chatPanelHeaderButtonLabel {
    font-family: var(--ff-body);
    font-size: var(--fs-small3);
    letter-spacing: var(--ls1);
    line-height: 1;
}

/* Pinned: the pin is driven home - filled in, in the site's blue, and tilted
   upright against the glyph's resting lean. */
.chatPanelPinButton[aria-pressed="true"] {
    background: rgba(255, 255, 255, .12);
    color: var(--c-league-theme-ink);
}

.chatPanelPinButton[aria-pressed="true"] > i {
    transform: rotate(-45deg);
}

.chatPanelPinButton > i {
    transition: transform 120ms linear;
}

@media (prefers-reduced-motion: reduce) {
    .chatPanelPinButton > i {
        transition: none;
    }
}

.chatPanelHeaderButton:hover,
.chatPanelHeaderButton:focus-visible,
.chatPanelHeaderButton[aria-expanded="true"] {
    background: rgba(255, 255, 255, .1);
    color: var(--c-surface);
}

/* The League Discussion tab is for longer posts and for a list of topics, each
   with its title and a line about it, so the panel widens there and reads less
   like a column of text - --chat-panel-width is redefined for it in main.css,
   so the room the page makes widens with it. */

/* The season the League Discussion tab holds, beside "Chat" on that tab. */
.chatPanelSeason {
    color: rgba(255, 255, 255, .6);
    font-size: var(--fs-small1);
    padding: 4px 7px;
    white-space: nowrap;
}

.chatPanelSeason[hidden] {
    display: none;
}

/* --- The two tabs ---------------------------------------------------------
   Weekly and League Discussion, under the header on its dark ground, each with
   a count of what is unread in it. The tab on show is underlined in the site's
   blue. */
.chatTabs {
    background: var(--c1);
    display: flex;
    flex: 0 0 auto;
    gap: 4px;
    padding: 0 10px;
}

.chatTabButton {
    appearance: none;
    -webkit-appearance: none;
    align-items: center;
    background: none;
    border: 0;
    border-bottom: 4px solid transparent;
    color: rgba(255, 255, 255, .6);
    cursor: pointer;
    display: inline-flex;
    font-family: var(--ff-body);
    font-size: var(--fs-small1);
    gap: var(--g1);
    padding: 6px 6px 8px;
    transition: color 120ms linear, border-color 120ms linear;
}

.chatTabButton:hover,
.chatTabButton:focus-visible {
    color: var(--c-surface);
    outline: none;
}

.chatTabButton.is-active {
    border-bottom-color: var(--c-league-theme-accent);
    color: var(--c-surface);
    font-weight: var(--fw3);
}

.chatTabWeek {
    white-space: nowrap;
}

/* The weekly tab opens the list of weeks, so it carries a caret that turns over
   while the list is open. The gap before it is the tab's own. */
.chatTabWeekCaret {
    font-size: var(--fs-small3);
    margin-left: -2px;
    transition: transform 160ms ease;
}

/* A closed week's lock, between the week and the caret. On an open week it
   is gone - Font Awesome's display overrides [hidden], so this restores it. */
.chatTabWeekLock {
    font-size: var(--fs-small3);
}

.chatTabWeekLock[hidden] {
    display: none;
}

.chatTabButton[aria-expanded="true"] .chatTabWeekCaret {
    transform: rotate(180deg);
}

.chatTabCount {
    background: var(--c-red);
    border-radius: 999px;
    color: var(--c-surface);
    font-size: var(--fs-small3);
    font-weight: var(--fw4);
    line-height: 1.5;
    min-width: 18px;
    padding: 0 5px;
    text-align: center;
}

.chatTabCount[hidden] {
    display: none;
}

/* --- The weeks ------------------------------------------------------------
   A list under the tabs of every week so far, newest first, each with how many
   messages it holds, opened from the weekly tab. Choosing an earlier one shows
   that week read-only. league-chat.js sets its top to the bottom of the tab
   row as it opens; the value here only stands in until then. */
.chatWeeksMenu {
    background: var(--c-surface);
    border-bottom: 1px solid var(--c1-n7);
    box-shadow: var(--shadow-dropdown);
    display: flex;
    flex-direction: column;
    left: 0;
    max-height: 50%;
    overflow-y: auto;
    padding: 6px;
    position: absolute;
    right: 0;
    top: 56px;
    z-index: 3;
}

.chatWeeksMenu[hidden] {
    display: none;
}

.chatWeekOption {
    appearance: none;
    -webkit-appearance: none;
    align-items: center;
    background: none;
    border: 0;
    border-radius: var(--r2);
    color: var(--c-text-primary);
    cursor: pointer;
    display: flex;
    font-family: var(--ff-body);
    font-size: var(--fs-small1);
    gap: 10px;
    justify-content: space-between;
    padding: 9px 10px;
    text-align: left;
}

.chatWeekOption:hover,
.chatWeekOption:focus-visible {
    background: var(--c1-n3);
}

.chatWeekOption.is-selected {
    font-weight: var(--fw3);
}

.chatWeekOptionCount {
    color: var(--c-text-muted);
    font-size: var(--fs-small3);
    white-space: nowrap;
}

/* --- The bar over the chat and the forum ----------------------------------
   One bar for both views (league_chat_helpers.php), the same size whatever it
   holds: on an earlier week, the way back to this one; in a topic, the way
   back to the list. Its height is set for two lines of text, so the bar does
   not change size between the two. At the right, page top and page bottom. */
.chatSubBar {
    align-items: center;
    border-bottom: 1px solid var(--c1-n7);
    box-sizing: border-box;
    display: flex;
    flex: 0 0 auto;
    font-size: var(--fs-small1);
    gap: 10px;
    justify-content: space-between;
    min-height: calc(2.5em + 14px);
    padding: 6px 12px 6px 16px;
}

.chatSubBar[hidden] {
    display: none;
}

.chatSubBarMain {
    align-items: center;
    display: flex;
    min-width: 0;
}

.chatReadOnlyBanner {
    align-items: flex-start;
    display: flex;
    flex-direction: column;
    gap: 1px;
    justify-content: center;
    line-height: 1.5;
}

.chatReadOnlyBanner[hidden],
.chatDiscussionBack[hidden] {
    display: none;
}

/* A page button with nothing that way keeps its place, so the other one
   does not move when it goes. */
.chatScrollButton[hidden] {
    visibility: hidden;
}

.chatBackButton {
    appearance: none;
    -webkit-appearance: none;
    background: none;
    border: 0;
    color: var(--c-text-primary);
    cursor: pointer;
    font-family: var(--ff-body);
    font-size: var(--fs-small1);
    font-weight: var(--fw3);
    line-height: inherit;
    padding: 0;
    text-decoration: underline;
    text-underline-offset: 2px;
    white-space: nowrap;
}

.chatScrollButtons {
    display: flex;
    flex: 0 0 auto;
    gap: 2px;
    margin-left: auto;
}

.chatScrollButton {
    appearance: none;
    -webkit-appearance: none;
    align-items: center;
    background: none;
    border: 0;
    border-radius: var(--r2);
    color: var(--c-text-primary);
    cursor: pointer;
    display: inline-flex;
    font-size: var(--fs-small1);
    height: 32px;
    justify-content: center;
    padding: 0;
    width: 32px;
}

.chatScrollButton:hover,
.chatScrollButton:focus-visible {
    background: var(--c1-n3);
    outline: none;
}

/* --- The stream ----------------------------------------------------------- */
.chatStream {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    min-height: 0;
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: 12px 0 16px;
}

.chatEmpty,
.chatLoading {
    color: var(--c-text-muted);
    font-size: var(--fs-small1);
    margin: auto 0;
    padding: 24px 12px;
    text-align: center;
}

/* A day's first message is headed by the day, on a hairline. */
.chatDay {
    align-items: center;
    color: var(--c-text-muted);
    display: flex;
    font-size: var(--fs-small3);
    gap: 10px;
    margin: 14px 0 6px;
    text-transform: uppercase;
    white-space: nowrap;
}

.chatDay:first-child {
    margin-top: 0;
}

.chatDay::before,
.chatDay::after {
    background: rgba(23, 33, 54, .12);
    content: "";
    flex: 1 1 auto;
    height: 1px;
}

/* A message: the author's avatar beside their name, the time, and the message.
   A run of messages from one person within a few minutes reads as one - site.js
   marks the follow-ons .chatMessage--continued, which keep the avatar's column
   but drop the avatar and the name. */
.chatMessage {
    column-gap: 10px;
    display: grid;
    grid-template-columns: 32px minmax(0, 1fr);
    padding: 8px;
}

.chatMessage:hover{
    background: var(--c1-n3);   
}

.chatMessage--continued {
    margin-top: 3px;
}

.chatMessage--continued .chatAvatar,
.chatMessage--continued .chatMessageMeta {
    display: none;
}

.chatMessage--continued .chatMessageMain {
    grid-column: 2;
}

.chatAvatar {
    align-items: center;
    background: oklch(var(--avatar-lightness) var(--avatar-chroma) var(--avatar-hue, 0));
    border-radius: 50%;
    color: var(--c-surface);
    display: flex;
    font-size: var(--fs-small1);
    font-weight: var(--fw3);
    height: 32px;
    justify-content: center;
    overflow: hidden;
    width: 32px;
}

.chatAvatar img {
    height: 100%;
    object-fit: cover;
    width: 100%;
}

.chatMessageMain {
    min-width: 0;
    position: relative;
}

/* The quote-and-reply button in a message's top right, shown while the
   message is hovered or the button has the keyboard's focus. It quotes into
   the composer (league-chat.js), so where there is none to write in - a closed
   week, the topic list - it does not show, nor on a message with no text of
   its own to quote. */
.chatMessageQuote {
    appearance: none;
    -webkit-appearance: none;
    background: none;
    border: 0;
    border-radius: var(--r1);
    color: var(--c-text-muted);
    cursor: pointer;
    font-size: var(--fs-small3);
    line-height: 1;
    padding: 4px;
    position: absolute;
    right: -4px;
    top: -4px;
    visibility: hidden;
}

.chatMessage:hover .chatMessageQuote,
.chatMessageQuote:focus-visible {
    visibility: visible;
}

.chatMessageQuote:hover,
.chatMessageQuote:focus-visible {
    color: var(--c-text-primary);
}

.chatPanel:has(#chatComposer[hidden]) .chatMessageQuote,
.chatMessage:not(:has(.chatBody > .chatParagraph)) .chatMessageQuote {
    display: none;
}

.chatMessageMeta {
    align-items: baseline;
    display: flex;
    gap: var(--g2);
    line-height: 1.2;
    margin-bottom: 2px;
}

.chatAuthor {
    font-size: var(--fs-small1);
    font-weight: var(--fw3);
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.chatTime {
    color: var(--c-text-muted);
    flex: 0 0 auto;
    font-size: var(--fs-small3);
}

.chatBody {
    font-size: var(--fs-body);
    line-height: 1.4;
    overflow-wrap: anywhere;
}

/* Each line of a message is a paragraph (pcf_league_chat_body_html()), set
   apart from the one before it by a modest gap. */
.chatParagraph {
    margin: 0;
}

.chatParagraph + .chatParagraph {
    margin-top: 0.45em;
}

/* A quoted message above a reply: its lines set in from a rule, in the muted
   ink. */
.chatQuote {
    border-left: 2px solid var(--c1-n7);
    color: var(--c-text-muted);
    margin: 0 0 0.45em;
    padding-left: 8px;
}

.chatQuote + .chatParagraph {
    margin-top: 0;
}

.chatMention {
    /*background: rgba(30, 144, 255, .12);*/
    border-radius: 3px;
    color: var(--c-league-theme-ink);
    font-weight: var(--fw3);
    padding: 0 2px;
}

.chatImages {
    display: flex;
    flex-wrap: wrap;
    gap: var(--g1);
    margin-top: 6px;
}

.chatImage {
    display: block;
    line-height: 0;
}

.chatImage img {
    border-radius: var(--r2);
    height: auto;
    max-height: 200px;
    max-width: 100%;
    object-fit: cover;
    width: auto;
}

/* Newer messages arrived while you were scrolled up reading older ones. */
.chatNewMessagesButton {
    appearance: none;
    -webkit-appearance: none;
    align-self: center;
    background: var(--c1);
    border: 0;
    border-radius: 999px;
    bottom: 84px;
    box-shadow: var(--shadow-fab);
    color: var(--c-surface);
    cursor: pointer;
    font-family: var(--ff-body);
    font-size: var(--fs-small1);
    left: 50%;
    padding: 7px 14px;
    position: absolute;
    transform: translateX(-50%);
    z-index: 2;
}

.chatNewMessagesButton[hidden] {
    display: none;
}

/* --- Composer ------------------------------------------------------------- */
/* --- The league discussion -------------------------------------------------
   The tab's own column: the topic list's bar - Topics with New Topic - over
   the list of topics, a topic's posts, or the guide to starting one. In a
   topic the bar over the chat (.chatSubBar) takes its place. */
.chatDiscussion {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    min-height: 0;
}

.chatDiscussion[hidden],
.chatStream[hidden] {
    display: none;
}

.chatDiscussionBar {
    align-items: center;
    border-bottom: 1px solid var(--c1-n7);
    display: flex;
    flex: 0 0 auto;
    gap: 10px;
    justify-content: space-between;
    min-height: 44px;
    padding: 6px 12px 6px 16px;
}

.chatDiscussionBar[hidden] {
    display: none;
}

.chatDiscussionHeading {
    color: var(--c-text-muted);
    font-size: var(--fs-small3);
    font-weight: var(--fw3);
    letter-spacing: var(--ls1);
    text-transform: uppercase;
}

.chatDiscussionAction,
.chatDiscussionBack {
    appearance: none;
    -webkit-appearance: none;
    align-items: center;
    background: none;
    border: 0;
    border-radius: var(--r2);
    color: var(--c-text-primary);
    cursor: pointer;
    display: inline-flex;
    font-family: var(--ff-body);
    font-size: var(--fs-small1);
    gap: var(--g1);
    padding: 6px 8px;
}

.chatDiscussionAction {
    font-weight: var(--fw3);
}

.chatDiscussionBack {
    margin-left: -8px;
}

.chatDiscussionAction:hover,
.chatDiscussionAction:focus-visible,
.chatDiscussionBack:hover,
.chatDiscussionBack:focus-visible {
    background: var(--c1-n3);
    outline: none;
}

.chatDiscussionBody {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    overscroll-behavior: contain;
}

/* The chat and the forum scroll with no scrollbar, and say there is more by
   fading at whichever end has something past it - the classes come from
   syncScrollFades() in league-chat.js - so neither end is softened when
   there is nothing past it. */
.chatStream,
.chatDiscussionBody {
    --chat-scroll-fade: 32px;
    scrollbar-width: none;
}

.chatStream::-webkit-scrollbar,
.chatDiscussionBody::-webkit-scrollbar {
    display: none;
}

.chatStream.is-scrollable-up,
.chatDiscussionBody.is-scrollable-up {
    -webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 var(--chat-scroll-fade));
    mask-image: linear-gradient(to bottom, transparent 0, #000 var(--chat-scroll-fade));
}

.chatStream.is-scrollable-down,
.chatDiscussionBody.is-scrollable-down {
    -webkit-mask-image: linear-gradient(to top, transparent 0, #000 var(--chat-scroll-fade));
    mask-image: linear-gradient(to top, transparent 0, #000 var(--chat-scroll-fade));
}

.chatStream.is-scrollable-up.is-scrollable-down,
.chatDiscussionBody.is-scrollable-up.is-scrollable-down {
    -webkit-mask-image: linear-gradient(
        to bottom,
        transparent 0,
        #000 var(--chat-scroll-fade),
        #000 calc(100% - var(--chat-scroll-fade)),
        transparent 100%
    );
    mask-image: linear-gradient(
        to bottom,
        transparent 0,
        #000 var(--chat-scroll-fade),
        #000 calc(100% - var(--chat-scroll-fade)),
        transparent 100%
    );
}

.chatDiscussionBody > .chatEmpty,
.chatDiscussionBody > .chatLoading,
.chatDiscussionGuide {
    padding: 24px 20px;
}

.chatDiscussionGuide {
    color: var(--c-text-muted);
    font-size: var(--fs-small1);
    line-height: 1.5;
    margin: 0;
}

/* A topic in the list: its title over who started it and how many replies it
   has, with when it was last posted to - and, if anything in it is unread, how
   much - at the right. The whole row opens it. */
.chatTopicList {
    display: flex;
    flex-direction: column;
}

.chatTopicRow {
    appearance: none;
    -webkit-appearance: none;
    align-items: center;
    background: none;
    border: 0;
    border-bottom: 1px solid var(--c1-n7);
    color: var(--c-text-primary);
    cursor: pointer;
    display: flex;
    font-family: var(--ff-body);
    gap: var(--g3);
    padding: 11px 16px;
    text-align: left;
    width: 100%;
}

.chatTopicRow:hover,
.chatTopicRow:focus-visible {
    background: var(--c1-n3);
    outline: none;
}

.chatTopicRowMain {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    gap: 3px;
    min-width: 0;
}

.chatTopicTitle {
    font-size: var(--fs-body);
    line-height: 1.3;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.chatTopicRow--unread .chatTopicTitle {
    font-weight: var(--fw3);
}

.chatTopicMeta,
.chatTopicLast {
    color: var(--c-text-muted);
    font-size: var(--fs-small3);
    white-space: nowrap;
}

.chatTopicMeta {
    overflow: hidden;
    text-overflow: ellipsis;
}

.chatTopicSide {
    align-items: flex-end;
    display: flex;
    flex: 0 0 auto;
    flex-direction: column;
    gap: 4px;
}

.chatTopicUnread {
    background: var(--c-league-theme-accent);
    border-radius: 999px;
    color: var(--c-surface);
    font-size: var(--fs-small3);
    font-weight: var(--fw4);
    line-height: 1.5;
    min-width: 18px;
    padding: 0 5px;
    text-align: center;
}

/* An open topic: its title and who started it, then the posts, each with its
   author, the day and time, and a rule between one post and the next - every
   post stands on its own, not run together the way the weekly stream groups a
   burst of messages. */
.chatTopicHeader {
    border-bottom: 1px solid var(--c1-n7);
    padding: 14px 16px 12px;
}

.chatTopicHeading {
    font-family: var(--ff-body);
    font-size: var(--fs-big1);
    font-weight: var(--fw4);
    line-height: 1.3;
    margin: 0;
    overflow-wrap: anywhere;
}

.chatTopicByline {
    color: var(--c-text-muted);
    font-size: var(--fs-small3);
    margin: 3px 0 0;
}

.chatTopicPosts {
    display: flex;
    flex-direction: column;
}

.chatTopicPosts > .chatMessage {
    border-bottom: 1px solid var(--c1-n7);
    margin-top: 0;
    padding: 12px;
}

.chatTopicPosts > .chatMessage:last-child {
    border-bottom: 0;
}

/* The new topic's title, over the message box, only while one is being
   written. */
.chatTopicTitleInput {
    background: var(--c1-n2);
    border: 1px solid var(--c1-n7);
    border-radius: var(--r3);
    box-sizing: border-box;
    color: var(--c-text-primary);
    font-family: var(--ff-body);
    font-size: var(--fs-body);
    font-weight: var(--fw3);
    margin-bottom: 8px;
    padding: 8px 12px;
    width: 100%;
}

.chatTopicTitleInput:focus {
    border-color: var(--c-league-theme-accent);
    outline: none;
}

.chatTopicTitleInput[hidden] {
    display: none;
}

/* A discussion post is longer than a chat message, so its box starts taller. */
.chatPanel.is-discussion .chatInput {
    min-height: 64px;
}

.chatComposer {
    border-top: 1px solid var(--c1-n7);
    flex: 0 0 auto;
    padding: 10px 12px 12px;
    position: relative;
}

.chatComposer[hidden] {
    display: none;
}

.chatComposerRow {
    align-items: flex-end;
    display: flex;
    gap: var(--g1);
}

.chatInput {
    background: var(--c1-n2);
    border: 1px solid var(--c1-n7);
    border-radius: var(--r3);
    box-sizing: border-box;
    color: var(--c-text-primary);
    flex: 1 1 auto;
    font-family: var(--ff-body);
    font-size: var(--fs-body);
    line-height: 1.35;
    max-height: 140px;
    min-height: 38px;
    min-width: 0;
    padding: 8px 12px;
    resize: none;
}

.chatInput:focus {
    border-color: var(--c-league-theme-accent);
    outline: none;
}

.chatComposerButton {
    appearance: none;
    -webkit-appearance: none;
    align-items: center;
    background: none;
    border: 0;
    border-radius: var(--r2);
    color: var(--c-text-muted);
    cursor: pointer;
    display: inline-flex;
    flex: 0 0 auto;
    font-size: var(--fs-big1);
    height: 38px;
    justify-content: center;
    width: 36px;
}

.chatComposerButton:hover,
.chatComposerButton:focus-visible {
    color: var(--c-text-primary);
}

.chatSendButton {
    color: var(--c-league-theme-ink);
}

.chatComposerButton:disabled {
    cursor: default;
    opacity: .4;
}

/* Images waiting to go with the message, each with a button to take it off. */
.chatAttachments {
    display: flex;
    flex-wrap: wrap;
    gap: var(--g1);
    margin-bottom: 8px;
}

.chatAttachments[hidden] {
    display: none;
}

.chatAttachment {
    border-radius: var(--r2);
    height: 56px;
    overflow: hidden;
    position: relative;
    width: 56px;
}

.chatAttachment img {
    height: 100%;
    object-fit: cover;
    width: 100%;
}

.chatAttachment.is-uploading img {
    opacity: .4;
}

.chatAttachmentRemove {
    appearance: none;
    -webkit-appearance: none;
    align-items: center;
    background: rgba(17, 31, 51, .75);
    border: 0;
    border-radius: 50%;
    color: var(--c-surface);
    cursor: pointer;
    display: flex;
    font-size: 10px;
    height: 18px;
    justify-content: center;
    position: absolute;
    right: 3px;
    top: 3px;
    width: 18px;
}

/* The @ list: the league's members and entries matching what follows the @,
   opening above the message box. */
.chatMentionMenu {
    background: var(--c-surface);
    border: 1px solid var(--c1-n7);
    border-radius: var(--r3);
    bottom: calc(100% - 4px);
    box-shadow: var(--shadow-dropdown);
    left: 12px;
    padding: 4px;
    position: absolute;
    right: 12px;
    z-index: 3;
}

.chatMentionMenu[hidden],
.chatMentionList[hidden] {
    display: none;
}

/* The names scroll; the Users and Entries row under them stays put, across
   the menu's width. */
.chatMentionList {
    max-height: 220px;
    overflow-y: auto;
}

.chatMentionModes {
    display: flex;
    margin-top: 4px;
}

.chatMentionList[hidden] + .chatMentionModes {
    margin-top: 0;
}

.chatMentionModes > * {
    flex: 1 1 0;
}

.chatMentionOption {
    align-items: center;
    border-radius: var(--r2);
    cursor: pointer;
    display: flex;
    font-size: var(--fs-small1);
    gap: var(--g2);
    padding: 7px 9px;
}

.chatMentionOption.is-active {
    background: var(--c1-n2);
}

.chatMentionOption i {
    color: var(--c-text-muted);
    width: 14px;
}

.chatComposerError {
    color: var(--c-red);
    font-size: var(--fs-small3);
    margin-top: 6px;
}

.chatComposerError[hidden] {
    display: none;
}
