

/* ---------- @mentions ---------- */

/* A reference to a league member reads blue, a reference to an entry green,
   both in a posted memo and while it is still being typed. lexical-editor.js
   classes each mention by what it names. */
.pcf-lexical-mention {
    font-weight: var(--fw4);
}

.pcf-lexical-mention--user {
    color: var(--c2-n10);
}

.pcf-lexical-mention--entry {
    color: var(--c-green);
}

/* The dropdown the names are picked from. It is positioned against the caret by
   script and lives on <body>, clear of the editor's own overflow. */
.pcf-lexical-mention-menu {
    background: var(--c-surface);
    border: 1px solid var(--c1-n4);
    border-radius: var(--r2);
    box-shadow: var(--shadow-dropdown);
    box-sizing: border-box;
    max-height: 260px;
    max-width: calc(100vw - 16px);
    min-width: 220px;
    overflow-y: auto;
    padding: 4px;
    position: fixed;
    text-align: left;
    z-index: 4000;
}

.pcf-lexical-mention-menu[hidden] {
    display: none;
}

.pcf-lexical-mention-option {
    align-items: baseline;
    background: transparent;
    border: 0;
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    font-family: var(--ff-body);
    font-size: var(--fs-small1);
    gap: var(--g2);
    justify-content: space-between;
    padding: 6px 8px;
    text-align: left;
    width: 100%;
}

.pcf-lexical-mention-option.is-active,
.pcf-lexical-mention-option:hover {
    background: var(--c1-n2);
}

.pcf-lexical-mention-option--user .pcf-lexical-mention-option-name {
    color: var(--c2-n10);
}

.pcf-lexical-mention-option--entry .pcf-lexical-mention-option-name {
    color: var(--c-green);
}

.pcf-lexical-mention-option-name {
    font-weight: var(--fw4);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.pcf-lexical-mention-option-kind {
    color: var(--c-text-muted);
    flex: none;
    font-size: var(--fs-small3);
    letter-spacing: var(--ls1);
    text-transform: uppercase;
}

/* ---------- Lexical editor ---------- */

.pcf-lexical-editor {
    background: var(--c-surface);
    border: 1px solid var(--c1-n4);
    border-radius: var(--r2);
    box-sizing: border-box;
    color: #222;
    overflow: hidden;
    text-align: left;
    width: 100%;
}

.pcf-lexical-editor.is-uploading {
    cursor: progress;
}

.pcf-lexical-toolbar {
    align-items: center;
    background: var(--c1-n2);
    border-bottom: 1px solid var(--c1-n4);
    box-sizing: border-box;
    display: flex;
    flex-wrap: wrap;
    gap: 2px;
    min-height: 38px;
    padding: 5px 6px;
}

.pcf-lexical-toolbar-button {
    align-items: center;
    background: transparent;
    border: 1px solid transparent;
    border-radius: 4px;
    color: var(--c-text-primary);
    cursor: pointer;
    display: inline-flex;
    flex: 0 0 28px;
    height: 28px;
    justify-content: center;
    padding: 0;
    width: 28px;
}

.pcf-lexical-toolbar-button:hover,
.pcf-lexical-toolbar-button:focus-visible,
.pcf-lexical-toolbar-button.is-active {
    background: var(--c-surface);
    border-color: var(--c1-n4);
    outline: none;
}

.pcf-lexical-toolbar-separator {
    align-self: stretch;
    background: var(--c1-n4);
    flex: 0 0 1px;
    margin: 4px 5px;
}

.pcf-lexical-surface-wrap {
    background: var(--c-surface);
    box-sizing: border-box;
    position: relative;
}

.pcf-lexical-surface {
    box-sizing: border-box;
    font-family: var(--ff-body);
    font-size: var(--fs-body);
    line-height: 1.45;
    min-height: 200px;
    outline: none;
    overflow-y: auto;
    padding: 12px;
    position: relative;
    text-align: left;
    width: 100%;
}

.pcf-lexical-surface:empty::before,
.pcf-lexical-editor.is-empty .pcf-lexical-surface::before {
    color: var(--c-text-placeholder);
    content: attr(data-placeholder);
    left: 12px;
    pointer-events: none;
    position: absolute;
    top: 12px;
}

.pcf-lexical-paragraph {
    margin: 0 0 0.75em;
    text-align: left;
}

.pcf-lexical-paragraph:last-child {
    margin-bottom: 0;
}

.pcf-lexical-text-bold {
    font-weight: var(--fw4);
}

.pcf-lexical-text-italic {
    font-style: italic;
}

.pcf-lexical-text-underline {
    text-decoration: underline;
}

.pcf-lexical-text-strikethrough {
    text-decoration: line-through;
}

.pcf-lexical-list-ul,
.pcf-lexical-list-ol {
    margin: 0 0 0.75em 1.3em;
    padding-left: 1em;
    text-align: left;
}

.pcf-lexical-list-item {
    margin: 0.2em 0;
}

.pcf-lexical-image {
    border-radius: var(--r2);
    display: block;
    height: auto;
    margin: 10px 0;
    max-width: 100%;
}

/* An avatar drawn from a picture rather than initials - the memo's author's,
   and a chat message's (pcf_message_board_author_avatar_html()). */
.mb-author-avatar--image {
    background: transparent;
    border: 0;
    box-shadow: none;
    outline: 0;
}
