/* ==UserStyle==
@name           Element misc improvements
@namespace      bkil.hu
@version        2023.04.10
@description    Some are subjective and my not always apply
@author         bkil
==/UserStyle== */
@-moz-document domain("app.element.io"),
url-prefix("https://riot."),
url-prefix("https://matrix."),
url-prefix("https://element.") {
    /* hide advertisement toasts */
    .mx_ToastContainer {
        display: none;
    }

    /* Add padding if showing of avatar is disabled */
    .mx_Pill.mx_UserPill {
        padding-left: 0.5em;
    }

    /* Hide the name of a room */
    .mx_Pill:not(.mx_UserPill)[href] {
        font-size: 0;
    }

    /* Show room alias with matrix.to/ chopped off from the beginning of the URL */
    .mx_Pill:not(.mx_UserPill)[href]::after {
        font-size: initial;
        content: attr(href);
        padding-right: 0.5em;
    }

    .mx_Pill:not(.mx_UserPill)[href^="https://matrix.to/#/#"]::after {
        margin-left: -8.9em;
    }

    .mx_Pill:not(.mx_UserPill)[href^="#/room/#"]::after {
        margin-left: -3.7em;
    }

    /* colorize current row in the settings - it's too wide */
    /* room aliases, alt aliases */
    .mx_EditableItemList .mx_EditableItem {
        border: 1px solid white;
    }

    .mx_EditableItemList .mx_EditableItem:hover {
        border: 1px solid black;
        background-color: #eee;
    }

    /* wrap lines in code blocks */
    .mx_EventTile_content .markdown-body pre code {
      white-space: pre-wrap;
    }

    /* make relay bot username more readable */
    .markdown-body > b:first-child {
      font-family: "OCRABold", "OCRA", monospace;
    }
}
