@media screen and (max-width: $tablet - 1px) {
    $chat-color: $primary;
    $chat-header-height: 15vw;
    $chat-input-height: 15vw;
    .overflow-hidden {
        overflow: hidden;
        position: fixed;
        width: 100%;
        left: 0;
        top: 0;
    }
    .chat-wrapper {
        font-size: 0.9rem;
    }
    .chat-header {
        background-color: $chat-color;
        display: flex;
        justify-content: space-between;
        height: $chat-header-height;
        align-items: center;
        position: fixed;
        top: 0;
        width: 100%;
        z-index: 10;

        &, a {
            color: $white;
        }

        .close-chat {
            width: 50px;
            text-align: center;
            padding: 0.5em;
            background-color: darken($chat-color, 10%);
            height: 100%;
            display: flex;
            align-items: center;
            justify-content: center;
            margin-left: 0.1em;
        }

        .chat-username, span {
            padding-left: 4vw;
            flex: 1;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
        }

        .chat-actions {
            display: flex;

            a {
                width: 50px;
                text-align: center;
                padding: 0.5em;
                background-color: darken($chat-color, 10%);
                height: $chat-header-height;
                display: flex;
                align-items: center;
                justify-content: center;
                margin-left: 0.1em;
                margin-right: 0.1em;
            }
        }
    }
    .chat-list, .active-chat {
        height: 100%;
        overflow: auto;
        position: fixed;
        top: 0;
        left: 0;
        background-color: $white;
        z-index: 100;
        width: 100%;

        &.is-close {
            display: none;
        }
    }
    .active-chat {
        z-index: 101;
        height: 100%;
        overflow: hidden;
    }
    .chat-history {
        height: calc(100% - #{$chat-header-height} - #{$chat-input-height});
        margin-top: $chat-header-height;
        overflow: auto;
    }
    .chat-input {
        height: $chat-input-height;


        .chat-contenteditable {
            height: $chat-input-height;
            width: 100%;
            padding: 0.3em;
            overflow: auto;
            outline: 0;
            border: 1px solid $grey-light;
            resize: none;
        }

        .button {
            padding: 0.3em 0.9em;
            border-radius: 0;
            height: 100%;
        }
    }
    .chat-content {
        height: calc(100% - #{$chat-header-height});
        margin-top: $chat-header-height;
    }
    .chat-list-item {
        display: flex;
        align-items: center;
        cursor: pointer;
        border-bottom: 1px solid #E6E7EA;
        user-select: none;
        padding: 2.6vw;

        .media-content {
            display: flex;
            justify-content: space-between;
            align-items: center;

        }

        .media-left {
            position: relative;
        }

        .has-unread-messages {
            background-color: $red;
            width: 0.7em;
            height: 0.7em;
            border-radius: 50%;
            position: absolute;
            top: 0;
            right: 0;
        }

        .is-online {
            background-color: $success;
            width: 0.7em;
            height: 0.7em;
            border-radius: 50%;
            flex-shrink: 0;
        }
    }

    .chat-message {
        padding-top: 0.5rem;
        padding-bottom: 0.5rem;


        .media-right {
            margin-left: 0.3rem;
        }

        .media-left {
            margin-right: 0.3rem;
        }

        .media-content {
            padding: 0.4rem 0.8rem;
            border-radius: 20px;
            flex: inherit;

            &.system-msg {
                font-size: 0.8rem;
                font-style: italic;
                text-align: center;
                width: 100%;
                color: #807f7f;
            }
        }

        .date {
            width: 100%;
            font-size: 80%;
            margin-bottom: 5px;
            text-align: right;
        }

        &.partner-message {
            .media-content {
                background-color: #eeeeee;
            }

            .media {
                justify-content: flex-start;
            }

            .date {
                text-align: left;
            }
        }

        &.my-message {
            .media-content {
                background-color: lighten($chat-color, 15%);
                color: $white;
            }

            .media {
                justify-content: flex-end;
            }
        }
    }
    .video-chat {
        position: fixed;
        z-index: 200;
        background: rgba(0, 0, 0, 0.9);
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        overflow: hidden;
        bottom: 0;
        display: flex;
        align-items: center;
        justify-content: center;
        flex-wrap: wrap;

        .partner-video {
            width: 100%;
            height: 100vh;

            .avatar-placeholder {
                width: 320px;
                height: 320px;
                background-repeat: no-repeat;
                background-size: contain;
                background-position: center;
                background-color: #000;
            }

            .video-wrapper {
                width: 100%;
                height: 100%;
                display: flex;
                align-items: center;
                justify-content: center;
            }
        }

        .video-buttons {
            width: 100%;
            text-align: center;
            align-self: flex-start;
            flex: 1;
            position: absolute;
            bottom: 50px;
        }

        .my-video {
            position: absolute;
            width: 150px;
            height: 150px;
            bottom: 0;
            right: 0;

            .video-wrapper {
                width: 100%;
                height: 100%;
            }

            .avatar-placeholder {
                width: 100%;
                height: 100%;
                background-size: cover;
                background-repeat: no-repeat;
                background-position: center;
                background-color: #000;
            }

        }

        #remoteVideo {
            height: 100vh;
            width: 100vw;
            position: absolute;
            top: 0;
            bottom: 0;
            margin: auto;
        }

        #localVideo {
            height: 150px;
            width: 150px;
            position: absolute;
            right: 0;
            bottom: 0;
        }
    }
    .incoming-call-notification {
        position: fixed;
        z-index: 300;
        background: rgba(0, 0, 0, 0.9);
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        overflow: hidden;
        bottom: 0;
        display: flex;
        align-items: center;
        justify-content: center;
        flex-wrap: wrap;
        color: $white;

        .avatar {
            margin-left: auto;
            margin-right: auto;
        }

        .call-notification-container {
            text-align: center;
        }

        .call-notification-buttons {
            margin-top: 1em;
        }
    }
}
