layout.scss 3.77 KB
html,
body {
    height: 100%;
    width: 100%;
}

.service-chat {
    /* -------------------------------- *\
        atom, util
    \* -------------------------------- */
    .table {
        display: table;
        width: 100%;
    }

    .table-cell {
        display: table-cell;
        vertical-align: middle;

        &.cell-max {
            width: 6666px;
        }
    }

    .main-wrap {
        position: static;
    }

    #chat-window,
    #chat-footer {
        max-width: 750px;
    }

    .chat-header {
        color: #fff;

        .title {
            width: 400px;
            margin: 0 auto;
            font-size: 34px;
            text-align: center;
        }

        .chat-status {
            display: inline-block;
            height: 12px;
            width: 12px;
            margin-right: 5px;
            background: #fff;
            border-radius: 50%;
            vertical-align: middle;
        }

        .service-name {
            vertical-align: middle;
        }

        .header-right {
            position: absolute;
            top: 0;
            right: 30px;
            font-size: 28px;
            vertical-align: middle;
        }
    }

    #chat-history-loader {
        display: none;
        text-align: center;
        margin-bottom: 10px;
        color: grey;
        text-decoration: underline;

        i {
            display: none;
            background: url("img/service/chat/loading.gif") no-repeat;
            background-size: contain;
            width: 20px;
            height: 20px;
            vertical-align: middle;
        }
    }

    .chat-history-loading i {
        display: inline-block !important;
    }

    #chat-window {
        position: absolute;
        top: 105px;
        bottom: 100px;
        width: 100%;
        background-color: #f0f0f0;
        padding: 40px 30px 0;
        overflow: scroll;
        -webkit-overflow-scrolling: touch;

        &::-webkit-scrollbar {
            display: none;
        }
    }

    #chat-footer {
        position: absolute;
        bottom: 0;
        width: 100%;
        background-color: #f7f7f7;
    }

    .chat-page {
        position: fixed;
        top: 0;
        right: 0;
        bottom: 0;
        left: 0;
        z-index: 100;
        background-color: #f0f0f0;
        transition: 0.3s;

        .main {
            position: absolute;
            width: 100%;
            top: 105px;
            bottom: 0;
            overflow: auto;
        }

        .main::-webkit-scrollbar {
            width: 0;
        }
    }

    .chat-page-hide {
        transform: translate3d(100%, 0, 0);
    }

    .chat-rating-trigger {
        display: none;
        min-width: 80px;
        text-align: right;
    }

    /* 客服在线 */
    .online {
        .chat-status {
            background-color: #4cd964 !important;
        }

        .menu-trigger {
            display: block !important;
        }

        .chat-rating-trigger {
            display: inline-block;
        }
    }

    .menu-open {
        .menu {
            display: block;
        }

        #chat-window {
            bottom: 360px;
        }

        #chat-send-box {
            padding-right: 0;
        }
    }
}

body.app-ios {
    .nav-back {
        text-align: left;
    }

    #chat-window,
    .connection-failed,
    .chat-page {
        margin-top: 20PX;
    }

    .ios-gap {
        height: 20PX;
    }
}

body.boys,
.boys .chat-header {
    background-color: #414141 !important;
    background-image: none;
}

body.girls,
.girls .chat-header {
    background-color: #ff88ae !important;
    background-image: none;
}

body.kids,
.kids .chat-header {
    background-color: #7ad9f9 !important;
    background-image: none;
}

body.lifestyle,
.lifestyle .chat-header {
    background-color: #4f4138 !important;
    background-image: none;
}