.chat-container {
    display: none;
    opacity: 0;
}

.chat-container[item-source="chat"] {
    position: fixed;
    left: 0px;
    top: 0px;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: 10100000;
}

.chat {
    display: flex;
    flex-direction: column;
    position: absolute;
    left: 0px;
    bottom: 0px;
    width: 100%;
    height: 100%;
    background-color: rgba(9, 15, 18, 0.95);
    z-index: 10100000;
}

@media only screen and (min-width: 600px) {
    .chat-container[item-source="chat"] .chat {
        left: 50%;
        right: auto;
        margin-left: -225px;
    }

    .chat {
        background-color: rgba(9, 15, 18, 0.9);
        left: auto;
        right: 64px;
        width: 450px;
        height: 400px;

        -webkit-border-top-left-radius: 20px;
        -webkit-border-top-right-radius: 20px;
        -moz-border-radius-topleft: 20px;
        -moz-border-radius-topright: 20px;
        border-top-left-radius: 20px;
        border-top-right-radius: 20px;
    }

    .chat-container[item-source="chat"] .chat-close {
        display: none;
    }
}

.chat-send {
    position: absolute;
    right: 16px;
    top: 15px;
    background-image: url(../images/chat/icon-chat-send.svg);
    background-repeat: no-repeat;
    background-size: 100% 100%;
    background-position: center center;
    width: 32px;
    height: 32px;
    cursor: pointer;
}

.chat[item-status="loading"] .chat-send {
    background-image: url(../images/chat/icon-chat-preloader.svg);
}

.chat-send:hover {
    opacity: 0.7;
}

.chat-conversation {
    flex: 1;
    overflow-y: scroll;

   -webkit-mask-image: linear-gradient(to bottom, transparent 0%, black 16%);
    mask-image: linear-gradient(to bottom, transparent 0%, black 16%);
}

.chat-conversation messages {
    display: block;
    padding: 10px;
}

.chat-conversation::-webkit-scrollbar {
    width: 3px;
    background: transparent;
}

.chat-conversation::-webkit-scrollbar-thumb {
    background: #1b1b1b;
}

@media only screen and (min-width: 600px) {
    .chat-conversation::-webkit-scrollbar {
        width: 6px;
        background: transparent;
    }

    .chat-conversation::-webkit-scrollbar-thumb {
        background: #673ab7;

        -webkit-border-radius: 3px;
        -moz-border-radius: 3px;
        border-radius: 3px;
    }
}

.chat-conversation[item-empty="yes"] {
    background-image: url(../images/chat/icon-chat-empty.svg?v2);
    background-repeat: no-repeat;
    background-position: center center;
    background-size: 64px 64px;
    opacity: 0.3;
}

.chat-user[item-sender='me'] {
    display: none;
    text-align: right;
}

.chat-user-icon {
    display: inline-block;
    margin-top: 20px;
    width: 40px;
    height: 40px;
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    
    -webkit-border-radius: 50%;
    -moz-border-radius: 50%;
    border-radius: 50%;
}

.chat-msg[item-sender='me'] {
    text-align: right;
}

.chat-msg-text {
    display: inline-block;
    margin-top: 10px;
    padding: 14px;
    min-width: 20px;
    text-align: center;
    font-size: 14px;
}

.chat-msg[item-sender='me'] .chat-msg-text {
    background-color: #1d1d1d;
    color: #e8e8e8;
    font-size: 18px;

    -webkit-border-radius: 20px;
    -webkit-border-top-right-radius: 5px;
    -moz-border-radius: 20px;
    -moz-border-radius-topright: 5px;
    border-radius: 20px;
    border-top-right-radius: 5px;
}

.chat-msg[item-sender='it'] .chat-msg-text {
    background-color: #673AB7;
    background-image: linear-gradient(to right bottom, #7034da, #682fcd, #612bc1, #5926b4, #5222a8);
    color: #e8e8e8;
    font-size: 18px;

    -webkit-border-radius: 20px;
    -webkit-border-top-left-radius: 5px;
    -moz-border-radius: 20px;
    -moz-border-radius-topleft: 5px;
    border-radius: 20px;
    border-top-left-radius: 5px;
}

.chat-input-container {
    position: relative;
    width: calc(100% - 20px);
    padding: 10px;
}

.chat-input {
    background-color: #d0d0d0;
    width: calc(100% - 60px);
    font-size: 17px;
    height: 40px;
    padding-left: 10px;
    padding-right: 50px;
    border: none;

    -webkit-border-radius: 20px;
    -moz-border-radius: 20px;
    border-radius: 20px
}

.chat-input[item-disabled] {
    background-image: url(../images/chat/icon-chat-preloader-dark.svg?v2);
    background-repeat: no-repeat;
    background-position: right 8px center;
    background-size: 32px 32px;

    opacity: 0.8;
}

.chat-icon {
    position: absolute;
    right: 5px;
    top: 50%;
    margin-top: 8px;
    background-color: rgba(0, 0, 0, 0.5);
    background-image: url(../images/chat/icon-chat.svg?v194);
    background-repeat: no-repeat;
    background-position: center center;
    background-size: 20px 20px;
    width: 46px;
    height: 46px;
    z-index: +1;
    cursor: pointer;

    -webkit-border-radius: 50%;
    -moz-border-radius: 50%;
    border-radius: 50%;
}

.game-area[item-align-chat="bottom"] .chat-icon {
    top: auto;
    bottom: 20px;
}

.chat-icon[item-accepted="yes"] {
    background-image: url(../images/chat/icon-chat-green.svg?v194);

    animation: blinker_frames 1s linear 3;
	-webkit-animation: blinker_frames 1s linear 3;
}

@keyframes blinker_frames {
	50% {
		opacity: 0.1;
	}
}

@-webkit-keyframes blinker_frames {
	50% {
		opacity: 0.1;
	}
}

.chat-icon[item-loading="yes"] {
    background-image: url(../images/chat/icon-chat-preloader.svg);
}

.chat-icon[item-loading="yes"] .chat-icon-badge {
    display: none !important;
}

.chat-icon-badge {
    display: none;
    position: absolute;
    right: 0px;
    min-width: 16px;
    padding-left: 3px;
    padding-right: 3px;
    height: 22px;
    text-align: center;
    line-height: 22px;
    margin-top: -8px;
    font-weight: bold;
    background-color: #ff0058;
    color: #6f0429;

    -webkit-border-radius: 7px;
    -moz-border-radius: 7px;
    border-radius: 7px;
}

.chat-close {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 48px;
    height: 48px;
    background-image: url(../images/chat/icon-chat-close.svg);
    background-repeat: no-repeat;
    background-position: center center;
    background-size: 100% 100%;
    opacity: 0.9;
    cursor: pointer;
}

.chat-float {
    position: fixed;
    right: 10px;
    bottom: 10px;
    width: 56px;
    height: 56px;
    background-size: 20px 20px;
    background-position: center center;
    background-repeat: no-repeat;
    background-image: url(../images/icon-message.svg);
    background-color: rgba(0, 0, 0, 0.5);
    cursor: pointer;
    
    -webkit-border-radius: 50%;
    -moz-border-radius: 50%;
    border-radius: 50%;
}

.chat-float:hover {
    background-color: rgba(0, 0, 0, 0.6);
}

.chat-float[item-conversations]::after {
	content: '';
    position: absolute;
    bottom: 2px;
    right: 2px;
    width: 16px;
    height: 16px;

    -webkit-border-radius: 50%;
    -moz-border-radius: 50%;
    border-radius: 50%;

    -webkit-animation: blinking 1s infinite alternate;
    animation: blinking 1s infinite alternate;
}

@keyframes blinking {
    from {
        background-color: #ffe601;
		transform: scale(1);
	}

    to {
		background-color: #f30909;
		transform: scale(0.7);
    }
}

@-webkit-keyframes blinking {
    from {
        background-color: #ffe601;
		transform: scale(1);
	}

    to {
		background-color: #f30909;
		transform: scale(0.7);
    }
}

.chat-game {
    position: absolute;
    left: 50%;
    top: 14px;
    display: inline-block;
    width: 48px;
    height: 48px;
    margin-left: -24px;
    background-repeat: no-repeat;
    background-size: 24px 24px;
    background-position: center center;
    background-color: rgba(255, 255, 255, 0.1);
    background-image: url(../images/icon-chat-game.svg);
    cursor: pointer;

    -webkit-border-radius: 50%;
    border-radius: 50%;
}

.chat-game:hover {
    background-color: rgba(255, 255, 255, 0.15);
}

.chat-new-msg {
    display: none;
    position: absolute;
    left: 0px;
    width: 100%;
    height: 35px;
    margin-top: -50px;
    text-align: center;
    cursor: pointer;
}

 .chat-new-msg span {
    display: inline-block;
    background-color: #4caf50;
    background-image: linear-gradient(to right bottom, #4caf50, #4caf50, #6ca748, #5faa4b, #68a849);
    color: #e0e0e0;
    font-size: 17px;
    width: 150px;
    min-width: 75px;
    padding: 5px;
    padding-left: 10px;
    padding-right: 10px;
    text-align: center;
    height: 25px;
    line-height: 25px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;

    -webkit-border-radius: 18px;
    border-radius: 18px;
}

.chat-new-msg:after {
    position: absolute;
    left: 50%;
    bottom: 0px;
    margin-left: -10px;
    margin-bottom: -10px;
    content: '';
    width: 0;
    height: 0;
    border-style: solid;
    border-width: 10px 10px 0 10px;
    border-color: #60aa4b transparent transparent transparent;
}