.dialog-wrapper {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    flex-direction: column;
    background-color: #ffffff;
    z-index: 1;
    .dialog-title {
        display: flex;
        flex-direction: column;
        justify-content: center;
        padding: 0 30px;
        height: 68px;
        position: relative;
        &:after {
            content: "";
            position: absolute;
            left: 0;
            bottom: 0;
            width: 100%;
            height: 1px;
            background-color: #f4f5f5;
        }
        .main-title {
            display: flex;
            align-items: center;
            line-height: 22px;
            max-width: 100%;
            > h2 {
                font-size: 17px;
                font-weight: 600;
                overflow: hidden;
                text-overflow: ellipsis;
                white-space: nowrap;
            }
            > em {
                font-style: normal;
                font-size: 17px;
                font-weight: 500;
                padding-left: 6px;
            }
        }
        .sub-title {
            flex-shrink: 0;
            font-size: 12px;
            line-height: 20px;
            color: #aaaaaa;
            &.pointer {
                cursor: pointer;
                &:hover {
                    color: #888888;
                }
            }
        }
    }
    .dialog-scroller {
        position: relative;
        flex: 1;
        padding: 0 32px;
        overflow: auto;
        .dialog-list {
            > ul {
                > li {
                    display: flex;
                    flex-direction: row;
                    align-items: flex-end;
                    list-style: none;
                    margin-bottom: 16px;
                    &:first-child {
                        margin-top: 16px;
                    }
                    .dialog-avatar {
                        position: relative;
                        margin-bottom: 20px;
                        flex-shrink: 0;
                        width: 30px;
                        height: 30px;
                    }
                    .dialog-view {
                        max-width: 70%;
                        display: flex;
                        flex-direction: column;
                        align-items: flex-start;
                        margin: 0 0 0 8px;
                        .dialog-content {
                            color: #333333;
                            background-color: #F4F5F7;
                            padding: 8px;
                            min-width: 32px;
                            border-radius: 6px 6px 6px 0;
                            &.loading {
                                display: flex;
                                .common-loading {
                                    width: 20px;
                                    height: 20px;
                                    margin: 4px;
                                }
                            }
                            &.file {
                                display: inline-block;
                                .file-box {
                                    background-color: #ffffff;
                                    display: flex;
                                    align-items: center;
                                    padding: 10px 14px;
                                    border-radius: 3px;
                                    width: 220px;
                                    .file-thumb {
                                        width: 36px;
                                    }
                                    .file-info {
                                        margin-left: 12px;
                                        display: flex;
                                        flex-direction: column;
                                        justify-content: center;
                                        .file-name {
                                            color: #333333;
                                            font-size: 14px;
                                            line-height: 18px;
                                            word-break: break-all;
                                            text-overflow: ellipsis;
                                            overflow: hidden;
                                            display: -webkit-box;
                                            -webkit-line-clamp: 2;
                                            -webkit-box-orient: vertical;
                                        }
                                        .file-size {
                                            padding-top: 4px;
                                            color: #666666;
                                            font-size: 14px;
                                        }
                                    }
                                }
                            }
                            &.img {
                                padding: 0;
                                display: flex;
                                max-width: 220px;
                                max-height: 220px;
                                border-radius: 6px;
                                background-color: transparent;
                                overflow: hidden;
                                .file-img {
                                    display: flex;
                                }
                            }
                            &.unknown {
                                text-decoration: underline;
                            }
                        }
                        .dialog-foot {
                            display: flex;
                            align-items: center;
                            padding-top: 4px;
                            height: 21px;
                            line-height: 1;
                            .common-loading {
                                margin: 0 2px;
                                width: 10px;
                                height: 10px;
                            }
                            .time {
                                color: #bbbbbb;
                                font-size: 12px;
                            }
                            .done {
                                display: none;
                                margin-left: 4px;
                                transform: scale(0.9);
                                font-size: 12px;
                                color: $primary-color;
                            }
                            .percent {
                                display: none;
                                margin-left: 4px;
                                cursor: pointer;
                            }
                        }
                    }
                    &.history {
                        cursor: pointer;
                        justify-content: center;
                        font-size: 13px;
                        padding: 3px 0;
                        margin: 12px 0;
                        opacity: 0.6;
                        transition: opacity 0.2s;
                        &:hover {
                            opacity: 1;
                        }
                    }
                    &.history-tip {
                        position: relative;
                        padding-top: 60px;
                        .history-text {
                            font-style: normal;
                            position: absolute;
                            top: 10px;
                            left: 50%;
                            height: 22px;
                            line-height: 22px;
                            padding: 0 48px;
                            text-align: center;
                            font-size: 12px;
                            border-radius: 2px;
                            background: #f5f5f5;
                            transform: translateX(-50%);
                        }
                    }
                    &.loading {
                        padding: 12px 0;
                        justify-content: center;
                        .common-loading {
                            margin: 0;
                            width: 18px;
                            height: 18px;
                        }
                    }
                    &.nothing {
                        position: absolute;
                        top: 50%;
                        left: 50%;
                        transform: translate(-50%, -50%);
                        color: #999999;
                    }
                    &.bottom {
                        height: 0;
                        margin: 0;
                        padding: 0;
                    }
                    &.self {
                        flex-direction: row-reverse;
                        .dialog-view {
                            align-items: flex-end;
                            margin: 0 8px 0 0;
                            .dialog-content {
                                color: #ffffff;
                                background-color: $primary-color;
                                border-radius: 6px 6px 0 6px;
                                &.file {
                                    background-color: #F4F5F7;
                                }
                                &.img {
                                    border-radius: 6px;
                                    background-color: transparent;
                                }
                            }
                            .dialog-foot {
                                .done {
                                    display: inline-block;
                                }
                                .percent {
                                    display: inline-block;
                                }
                            }
                        }
                    }
                }
            }
        }
    }
    .dialog-footer {
        display: flex;
        flex-direction: column;
        align-items: flex-end;
        padding: 0 28px;
        margin-bottom: 20px;
        position: relative;
        .dialog-newmsg {
            display: none;
            height: 30px;
            line-height: 30px;
            color: #ffffff;
            font-size: 12px;
            background-color: rgba(0, 0, 0, 0.6);
            padding: 0 12px;
            margin-bottom: 20px;
            margin-right: 10px;
            border-radius: 16px;
            cursor: pointer;
            z-index: 2;;
        }
        .dialog-input {
            background-color: #F4F5F7;
            padding: 10px 52px 10px 12px;
            border-radius: 10px;
            .ivu-input {
                border: 0;
                resize: none;
                background-color: transparent;
                &:focus {
                    box-shadow: none;
                }
            }
        }
        .dialog-send {
            position: absolute;
            top: 0;
            right: 28px;
            bottom: 0;
            font-size: 18px;
            width: 46px;
            display: flex;
            align-items: center;
            justify-content: center;
        }
        .chat-upload {
            display: none;
            width: 0;
            height: 0;
            overflow: hidden;
        }
        &.newmsg {
            margin-top: -50px;
            .dialog-newmsg {
                display: block;
            }
        }
    }
    .drag-over {
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 3;
        background-color: rgba(255, 255, 255, 0.78);
        display: flex;
        align-items: center;
        justify-content: center;
        &:before {
            content: "";
            position: absolute;
            top: 16px;
            left: 16px;
            right: 16px;
            bottom: 16px;
            border: 2px dashed #7b7b7b;
            border-radius: 12px;
        }
        .drag-text {
            padding: 12px;
            font-size: 18px;
            color: #666666;
        }
    }
}
.dialog-wrapper-read-poptip-content {
    display: flex;
    position: relative;
    .read,
    .unread {
        flex: 1;
        max-height: 300px;
        overflow: auto;
        > li {
            list-style: none;
            margin-bottom: 12px;
            .common-avatar {
                width: 100%;
            }
            &:last-child {
                margin-bottom: 6px;
            }
            &.read-title {
                > em {
                    font-size: 18px;
                    font-weight: 600;
                    font-style: normal;
                    padding-right: 6px;
                }
            }
        }
    }
    .unread {
        > li {
            padding-left: 16px;
        }
    }
    &:before {
        content: "";
        position: absolute;
        left: 50%;
        top: 0;
        bottom: 0;
        width: 1px;
        background-color: #F4F4F5;
    }
}

@media (max-width: 768px) {
    .dialog-wrapper {
        .dialog-footer {
            padding: 0 20px;
            margin-bottom: 16px;
            .dialog-send {
                right: 20px;
            }
        }
    }
}
