html {
    height: 100%;
    overflow: hidden;
    background-color: var(--cpd-color-bg-canvas-default);
    scrollbar-color: rgba(255, 255, 255, 0.2) transparent;
}

body {
    width: 100%;
    height: 100%;
    margin: 0px;
}

#root {
    height: 100%;
}

.mx_App {
    display: flex;
    flex-direction: column;
    width: 100%;
    height: 100%;
    background-color: var(--cpd-color-bg-canvas-default);
    color: var(--cpd-color-text-primary);
}

.mx_LoadingSession {
    display: flex;
    flex-direction: column;
    width: 100%;
    height: 100%;
    align-items: center;
    justify-content: center;
}

/* room for the tauri window header */
.mx_Header {
    flex: 0 0 auto;
    height: 0px;
}

.mx_Client {
    display: flex;
    flex: 1 1 auto;
    flex-direction: row;
    width: 100%;
    height: 100%;
}

.mx_LoginPage {
    background-image: url("assets/backgroundGradient.svg");
    background-position: center;
    background-size: cover;

    display: flex;
    width: 100%;
    height: 100%;
    align-items: center;
    justify-content: center;
}

.mx_Login {
    width: 400px;
}

.mx_Login_dialog {
    background: var(--cpd-color-bg-canvas-default);
}

.mx_RoomList {
    display: flex;
    /* this is important, to stop roomlist pushing the composer off the bottom */
    flex-direction: column;
    flex: 0 0 auto;
    border-right: 1px solid #262628;
}

.mx_RoomList ol {
    overflow: scroll;
    /* this is important, to stop roomlist pushing the composer off the bottom */
    flex: 1 1 0;
    margin: 0px;
    padding: 0px;
}

.mx_RoomList li {
    list-style-type: none;
}

.mx_RoomTile {
    position: relative;
    max-width: 300px;
    cursor: pointer;
    background-color: #0f0f12bf;
    padding-top: var(--cpd-space-2x);
    padding-bottom: var(--cpd-space-2x);
    border-bottom: 1px solid #262628;
}

.mx_RoomTile_selected {
    background-color: #a0a0a088;
}

.mx_RoomTile_avatar {
    top: var(--cpd-space-2x);
    left: var(--cpd-space-4x);
    position: absolute;
}

.mx_RoomTile_name {
    margin-left: var(--cpd-space-14x);
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: var(--cpd-font-size-body-sm);
    font-weight: var(--cpd-font-weight-semibold);
    white-space: nowrap;
}

.mx_RoomTile_preview {
    margin-left: var(--cpd-space-14x);
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: var(--cpd-font-size-body-xs);
    font-weight: var(--cpd-font-weight-normal);
    white-space: nowrap;
}

.mx_MainPanel {
    flex: 1 1 auto;
    display: flex;
    height: 100%;
    flex-direction: column;
    margin-bottom: var(--cpd-space-1x);
}

.mx_Timeline {
    /* important to stop the header pushing the composer off the bottom */
    flex: 1 1 0;
    display: flex;
}

.mx_Timeline ol {
    padding-left: var(--cpd-space-2x);
    padding-right: var(--cpd-space-2x);
    width: 100%;
    margin: 0px;
    list-style: none;
}

.mx_Timeline ol li::marker {
    color: var(--cpd-color-text-placeholder);
}

.mx_TimelineSpinner {
    text-align: center;
}

.mx_Timestamp {
    display: none;
    position: absolute;
    left: 1em;
}

.mx_EventTile .mx_Avatar {
    position: absolute;
    padding-left: var(--cpd-space-2x);
}

.mx_Sender {
    display: block;
    padding-left: var(--cpd-space-14x);
    font-size: var(--cpd-font-size-body-sm);
    font-weight: var(--cpd-font-weight-semibold);
    color: var(--cpd-color-text-secondary);
    position: relative;
}

.mx_Sender::after {
    content: "";
    display: block;
    height: var(--cpd-space-1x);
    width: 100%;
}

.mx_Content {
    display: block;
    padding-left: var(--cpd-space-14x);
    font-size: var(--cpd-font-size-body-md);
    color: var(--cpd-color-text-primary);
}

.mx_EventTile:not(.mx_EventTile_continuation)::before {
    content: "";
    display: block;
    height: var(--cpd-space-2x);
}

.mx_EventTile {
    display: block;
    overflow-wrap: anywhere;
}

.mx_EventTile_continuation {
    margin: 0px;
}

.mx_StateEventTile {
    display: block;
    font-weight: var(--cpd-font-weight-semibold);
    color: var(--cpd-color-text-secondary);
    font-size: var(--cpd-font-size-body-xs);
    position: relative;
}

.mx_StateEventTile::before {
    content: "";
    display: block;
    height: var(--cpd-space-0-5x);
}

.mx_StateEventTile::after {
    content: "";
    display: block;
    height: var(--cpd-space-0-5x);
}

.mx_StateEventTile {
    padding-left: var(--cpd-space-14x);
}

.mx_StateAvatar {
    position: relative;
    top: var(--cpd-space-1x);
}

.mx_Separator {
    width: 100%;
    display: flex;
    align-items: center;
    font-size: var(--cpd-font-size-body-sm);
    color: var(--cpd-color-text-secondary);
    text-align: center;
    padding-top: var(--cpd-space-4x);
}

.mx_Separator::before,
.mx_Separator::after {
    content: "";
    flex: 1;
    border-top: 1px solid var(--cpd-color-border-interactive-primary);
    height: 0;
}

.mx_Separator span {
    padding: 0 em;
    /* background-color: var(--cpd-color-bg-canvas-default); */
}

.mx_ReadMarker {
    border-color: var(--cpd-color-icon-accent-tertiary);
}

.mx_ReadMarker span {
    color: var(--cpd-color-icon-accent-tertiary);
}

/* hack for iamb content */
.mx_EventTile > .mx_Content > span > p {
    margin: 0px;
}

.mx_EventTile_redacted {
    color: var(--cpd-color-text-secondary);
    font-style: italic;
}

.mx_Composer {
    flex: 0 0 auto;
    display: flex;
    flex-direction: row;
    width: 100%;
}

.mx_Composer_wrapper {
    border: 1px solid var(--cpd-color-border-interactive-secondary);
    border-radius: var(--cpd-space-12x);
    height: var(--cpd-space-12x);
    margin: var(--cpd-space-4x);
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    justify-content: center;
}

#mx_Composer_textarea {
    border: 0px;
    font: var(--cpd-font-body-md-regular);
    background-color: var(--cpd-color-bg-canvas-default);
    color: var(--cpd-color-text-primary);
    margin-left: var(--cpd-space-3x);
    margin-right: var(--cpd-space-3x);
    outline: none;
    resize: none;
}

#mx_Composer_textarea::placeholder {
    color: var(--cpd-color-text-secondary);
}

#mx_Composer_send {
    display: none;
    width: 4em;
    flex: 0 0 auto;
    font-size: 16px;
    margin: 4px;
}
