*, *:before, *:after {
    box-sizing: border-box;
}

:root {
    --white: #fff;
    --black: #000;
    --bg: #f8f8f8;
    --grey: #999;
    --dark: #1a1a1a;
    --light: #e6e6e6;
    --wrapper: 300px;
    --blue: #00b0ff;
}

body {
    background-color: var(--bg);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
    font-family: 'Source Sans Pro', sans-serif;
    font-weight: 400;
    background-size: cover;
    background-repeat: none;
}

.wrapper {
    position: relative;
    left: 50%;
    width: 100%;
    height: 912px;
    -webkit-transform: translate(-50%, 0);
    transform: translate(-50%, 0);
}

.container {
    position: relative;
    top: 50%;
    left: 50%;
    width: 100%;
    height: 100%;
    background-color: var(--white);
    -webkit-transform: translate(-50%, -50%);
    transform: translate(-50%, -50%);
}


.container .right {
    position: relative;
    float: left;
    width: 100%;
    height: 100%;
}

.container .right .top {
    width: 100%;
    height: 39px;
    padding: 15px 29px;
}

.container .right .top span {
    font-size: 15px;
    color: var(--grey);
}

.container .right .top span .name {
    color: var(--dark);
    font-family: 'Source Sans Pro', sans-serif;
    font-weight: 600;
}

.container .right .chat {
    position: relative;
    display: none;
    overflow: hidden;
    padding: 0 35px 92px;
    border-width: 1px 1px 1px 0;
    border-style: solid;
    border-color: var(--light);
    height: calc(100% - 48px);
    /*justify-content: flex-end;*/
    flex-direction: column;
}

.container .right .chat.active-chat {
    display: block;
    display: flex;
}

/*.container .right .chat.active-chat .bubble {*/
    /*transition-timing-function: cubic-bezier(0.4, -0.04, 1, 1);*/
/*}*/

/*.container .right .chat.active-chat .bubble:nth-of-type(1) {*/
    /*-webkit-animation-duration: 0.15s;*/
    /*animation-duration: 0.15s;*/
/*}*/

/*.container .right .chat.active-chat .bubble:nth-of-type(2) {*/
    /*-webkit-animation-duration: 0.3s;*/
    /*animation-duration: 0.3s;*/
/*}*/

/*.container .right .chat.active-chat .bubble:nth-of-type(3) {*/
    /*-webkit-animation-duration: 0.45s;*/
    /*animation-duration: 0.45s;*/
/*}*/

/*.container .right .chat.active-chat .bubble:nth-of-type(4) {*/
    /*-webkit-animation-duration: 0.6s;*/
    /*animation-duration: 0.6s;*/
/*}*/

/*.container .right .chat.active-chat .bubble:nth-of-type(5) {*/
    /*-webkit-animation-duration: 0.75s;*/
    /*animation-duration: 0.75s;*/
/*}*/

/*.container .right .chat.active-chat .bubble:nth-of-type(6) {*/
    /*-webkit-animation-duration: 0.9s;*/
    /*animation-duration: 0.9s;*/
/*}*/

/*.container .right .chat.active-chat .bubble:nth-of-type(7) {*/
    /*-webkit-animation-duration: 1.05s;*/
    /*animation-duration: 1.05s;*/
/*}*/

/*.container .right .chat.active-chat .bubble:nth-of-type(8) {*/
    /*-webkit-animation-duration: 1.2s;*/
    /*animation-duration: 1.2s;*/
/*}*/

/*.container .right .chat.active-chat .bubble:nth-of-type(9) {*/
    /*-webkit-animation-duration: 1.35s;*/
    /*animation-duration: 1.35s;*/
/*}*/

/*.container .right .chat.active-chat .bubble:nth-of-type(10) {*/
    /*-webkit-animation-duration: 1.5s;*/
    /*animation-duration: 1.5s;*/
/*}*/

.container .right .write {
    position: relative;
    bottom: 29px;
    left: 30px;
    height: 42px;
    padding-left: 8px;
    border: 1px solid var(--light);
    background-color: #eceff1;
    width: calc(100% - 58px);
    border-radius: 5px;
    top: 1%;
}

.container .right .write input {
    font-size: 16px;
    float: left;
    width: 95%;
    height: 40px;
    padding: 0 10px;
    color: var(--dark);
    border: 0;
    outline: none;
    background-color: #eceff1;
    font-family: 'Source Sans Pro', sans-serif;
    font-weight: 400;
}

.container .right .write .write-link.attach:before {
    display: inline-block;
    float: left;
    width: 20px;
    height: 42px;
    content: '';
    background-image: url("../img/attachment.png");
    background-repeat: no-repeat;
    background-position: center;
}

.container .right .write .write-link.smiley:before {
    display: inline-block;
    float: left;
    width: 20px;
    height: 42px;
    content: '';
    background-image: url("../img/smiley.png");
    background-repeat: no-repeat;
    background-position: center;
}

.container .right .write .write-link.send:before {
    display: inline-block;
    /*float: left;*/
    /*width: 35px;*/
    /*height: 42px;*/
    /*margin-left: 40px;*/
    float: right;
    width: 39px;
    height: 42px;
    margin-left: 40px;
    margin-top: -42px;
    content: '';
    background-image: url("../img/send.png");
    background-repeat: no-repeat;
    background-position: center;
}

.container .right .bubble {
    font-size: 14px;
    position: relative;
    display: inline-block;
    clear: both;
    margin-bottom: 8px;
    padding: 9px 5px;
    vertical-align: top;
    border-radius: 5px;
    max-width: 67%;

}

.container .right .bubble:before {
    font-size: 12px;
    position: absolute;
    top: 2px;
    display: block;
    width: 8px;
    height: 6px;
    content: '\00a0';
    -webkit-transform: rotate(29deg) skew(-35deg);
    transform: rotate(29deg) skew(-35deg);
}

.container .right .bubble.you {
    color: var(--dark);
    letter-spacing: 2px;
    float: left;
    left: 29px;
    top: 27px;
    background-color: var(--white);
    align-self: flex-start;
    -webkit-animation-name: slideFromLeft;
    animation-name: slideFromLeft;
}

.container .right .bubble.you:before {
    left: -3px;
    background-color: var(--white);
}
.container .right .bubble.youtop {
    color: var(--white);
    position: absolute;
    width: 72%;
    text-align: left;
    margin-top: -50px;
    left: 92px;
}
.container .right .bubble.me {
    letter-spacing: 2px;
    float: right;
    right: 26px;
    top:22px;
    color: var(--dark);
    background-color: #eceff1;
    align-self: flex-end;
    -webkit-animation-name: slideFromRight;
    animation-name: slideFromRight;
}
.container .right .bubble.metop {

    color: var(--white);
    position: absolute;
    width: 74%;
    text-align: right;
    right: 27%;
    margin-top: -51px;
}

.container .right .bubble.me:before {
    right: -3px;
    background-color: #eceff1;
}

.container .right .conversation-start {
    position: relative;
    width: 100%;
    margin-bottom: 27px;
    text-align: center;
}

.container .right .conversation-start span {
    font-size: 14px;
    display: inline-block;
    color: var(--grey);
}

.container .right .conversation-start span:before, .container .right .conversation-start span:after {
    position: absolute;
    top: 10px;
    display: inline-block;
    width: 30%;
    height: 1px;
    content: '';
    background-color: var(--light);
}

.container .right .conversation-start span:before {
    left: 0;
}

.container .right .conversation-start span:after {
    right: 0;
}

@keyframes slideFromLeft {
    0% {
        margin-left: -200px;
        opacity: 0;
    }
    100% {
        margin-left: 0;
        opacity: 1;
    }
}

@-webkit-keyframes slideFromLeft {
    0% {
        margin-left: -200px;
        opacity: 0;
    }
    100% {
        margin-left: 0;
        opacity: 1;
    }
}

@keyframes slideFromRight {
    0% {
        margin-right: -200px;
        opacity: 0;
    }
    100% {
        margin-right: 0;
        opacity: 1;
    }
}

@-webkit-keyframes slideFromRight {
    0% {
        margin-right: -200px;
        opacity: 0;
    }
    100% {
        margin-right: 0;
        opacity: 1;
    }
}
