@use "sass:math";

.conference-drawer {
    display: flex;
    flex-direction: column;
    height: 100vh;
    overflow: hidden;
    color: $gray;

    .header {
        padding-bottom: 9px;
        border-bottom: 1px solid $light-gray;

        &:nth-child(n+2) {
            margin-top: 25px;
        }

        + .list-group {
            margin-top: -11px;
        }
    }

    .drawer-body {
        display: flex;
        flex-direction: column;
        height: 100%;
        padding: 15px;
        overflow: hidden;
        text-align: left;
    }

    .drawer-log {
        display: flex;
        flex-direction: column;
        overflow: hidden;

        pre {
            background-color: $white;
        }

        .log-entry {
            display: flex;
            padding-bottom: 4px;
            margin-bottom: 4px;
            background-color: $white;
            border-bottom: 1px solid $light-gray;

            .idx {
                display: flex;
                align-items: center;
                padding-right: 8px;
                color: $light-gray;
            }

            &:last-of-type {
                margin-bottom: 0;
                border-bottom: 0 !important;
            }
        }
    }

    .drawer-chat {
        flex: 1 1 auto;
        margin-right: -15px;
        margin-left: -15px;
        overflow: auto;
        scrollbar-width: thin;

        .timestamp-continued {
            display: none;
            min-width: 50px;
            max-width: 50px;
            overflow: hidden;
            font-size: 13px;
            color: $gray888;
            text-align: right;
        }

        .media {
            padding-top: 4px;
            padding-bottom: 4px;
            margin-top: 8px;

            &:hover {
                overflow: visible;
                background-color: $bootstrap-link-hover-bg;
                transition: background .5s;

                > .timestamp-continued {
                    display: table-cell;
                    padding-left: 0;
                }

                &.continued {
                    padding-left:15px;
                    margin-left: 0;
                }
            }
        }

        .media-left {
            padding-left: 15px;
        }

        .media-heading {
            font-size: inherit;
            font-weight: 700;

            span {
                font-weight: normal;
                color: $gray888;
            }
        }

        .media-body {
            word-break: break-word;
            white-space: pre-wrap;
        }

        pre {
            padding: 0;
            margin: 0;
            font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
            font-size: 14px;
            word-break: break-word;
            white-space: pre-wrap;
            background: none;
            border: 0;
        }

        .text-danger {
            pre {
                color: inherit !important;
            }
        }

        .continued {
            margin-top: 0;
            margin-left: 65px;
        }

        .status {
            margin-left: 10px;
            pre {
                font-family: Menlo, Monaco, Consolas, "Courier New", monospace;
                font-size: 9px;
                color: $bootstrap-text-info;

                &::before {
                    content: '\2023';
                }
            }

            .media-right {
                pre {
                    white-space: nowrap;
                    &::before {
                        content: '';
                    }
                }
            }
        }

        .pending {
            color: $lighter-gray;

            pre {
                color: $lighter-gray;
            }
        }
    }

    .editor-row {
        position: relative;
        display: flex;
        flex-direction: row;
        align-items: flex-end;
        max-width: 100%;
    }

    .editor-wrapper {
        position: relative;
        width: 100%;
        padding: 6px 12px;
        margin-right: 10px;
        vertical-align: baseline;
        background-color: $white;
        border: 1px solid $light-gray;
        border-radius: 4px;
        box-shadow: inset 0 1px 1px rgba($black, .075);
        transition: border-color ease-in-out .15s, box-shadow ease-in-out .15s;
    }

    .editor-inner-wrapper {
        position: relative;
        width: 100%;
        overflow: hidden;
    }

    .old-message {
        flex: 1 1 100%;
        padding-left: 4px;
        margin-top: -5px;
        margin-bottom: 4px;
        overflow: hidden;
        color: $gray888;
        border-left: 2px solid $bootstrap-text-info;

        span {
            color: $gray888 !important;
            white-space: nowrap !important;
        }

        .media-heading {
            font-size: inherit;
            font-weight: 500;
            color: $bootstrap-text-info;

            span {
                font-weight: normal;
                color: $gray888;
            }
        }

        pre {
            min-height: math.div(20, 14) * 1em;
            max-height: math.div(20, 14) * 5em;
            padding: 0;
            margin: 0;
            margin-right: 10px;
            overflow: hidden;
            font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
            font-size: 14px;
            color: $gray888;
            text-overflow: ellipsis;
            word-break: break-word;
            white-space: nowrap;
            background: none;
            border: 0;
        }
    }

    .emoji-button {
        flex: none;
        padding: 3px 4px 3px 10px;
        color: $lighter-gray;
    }

    .upload-button {
        flex: none;
        padding: 3px 4px 3px 10px;
        color: $lighter-gray;
    }

    .padding-fixed {
        padding: 3px 4px 3px 4px;
    }

    .pre-editor {
        position: absolute;
        top: 0;
        left: 2px;
        z-index: 2;
        color: $lighter-gray;
        pointer-events: none;
        visibility: visible;
        transition: opacity .08s linear;
    }

    .editor {
        position: relative;
        z-index: 1;
        width: 100%;
        min-height: math.div(20, 14) * 1em;
        max-height: math.div(20, 14) * 5em;
        overflow: auto;
        word-wrap: break-word;
        white-space: pre-wrap;
        outline: none;

        .file-box {
            display: flex;
            align-items: center;
            justify-content: flex-end;
            width: 50%;
            height: math.div(20, 14) * 3em;
            padding-right: 10px;
            font-weight: 600;
            user-select: all;
            background: $light-gray;
            background-repeat: no-repeat;
            background-position: left;
            background-size: contain;
            border-radius: 4px;
        }
    }

    .drawer-files {
        display: flex;
        flex-direction: column;
        max-height: 100%;

        .list-group {
            width: 350px;
            margin-bottom: -15px;
            margin-left: -15px;
            overflow-x: hidden;
            overflow-y: auto;

            .list-group-item {
                margin-left: 0;
            }
        }

        .file-link {
            display: flex;
            justify-content: space-between;

            span {
                padding: 0 2px;
            }
        }

        a {
            width: 250px;
            overflow: hidden;
            font-weight: bold;
            text-overflow: ellipsis;
            white-space: nowrap;
            cursor: pointer;
        }

        .small {
            margin-bottom: 2px;
        }
    }

    h2 {
        font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
        font-size: 18px;
        font-weight: 300;
    }

    .list-group {
        width: 320px;
    }

    .list-group-item {
        margin-right: -15px;
        margin-left: -15px;

        &:first-of-type {
            border-top-left-radius: 0;
            border-top-right-radius: 0;
        }

        &:last-of-type {
            border-bottom-right-radius: 0;
            border-bottom-left-radius: 0;
        }
    }

    .vertical-center {
        vertical-align: middle;

        h4 {
            margin-top: 5px;
        }
    }

    .btn-default {
        color: $gray;
        background-color: $white;
        border-color: $light-gray;

        &:focus {
            &,
            &:active {
                outline: 0;
            }
        }
    }

    label {
        width: 25%;
    }

    .upload-button-label {
        width: unset;
        margin-bottom: unset;
    }
    .form-group {
        margin-bottom: 2px;

        &:last-of-type {
            margin-bottom: 15px;
        }
    }

    .dropdown {
        width: 75%;
    }
}
