* {
    box-sizing: border-box;
}
html,
body {
    padding: 0;
    margin: 0;
    height: 100vh;
}

body {
    background: #2a4b55;
    color: #c2cecf;
    padding-top: 20px;
}

.h1 {
    text-align: center;
    margin-top: 0;
}

.wrapper {
    max-width: 1170px;
    margin: 0 auto;
}

.chat {
    list-style: none;    
    overflow-y: scroll;
    padding: 0;
    max-height: 70vh;
}

/* хром, сафари */
.chat::-webkit-scrollbar, .message::-webkit-scrollbar { width: 0; }
.chat, .message { -ms-overflow-style: none; overflow: -moz-scrollbars-none; scrollbar-width: none; }

.chat li {
    margin: 12px 0;
    font-size: 19px;
}

.chat__username {
    font-weight: bold;
    letter-spacing: 1px;    
}

.chat__message {
    margin-top: 3px;
}

#connection {
    color:#1fea1f;
    text-align: center;
}

.controls {
    margin-top: 30px;    
    position: relative;
}

.typing {
    font-style: oblique;
    margin-bottom: 10px;
    font-size: 14px;
}

.message {
    max-height: 250px;
    overflow-y: scroll;
    height: auto;
    background: none;
    border: none;
    outline: none;
    color: #fff;
    font-size: 18px;
    box-shadow: 0px 1px 7px #78868a;
    margin-right: 5px;
    margin-bottom: 15px;
    padding: 14px 70px 14px 45px;
    width: 100%;
}

.message img {
    height: 16px;
    margin: 0 2px;
    cursor: text;
}

.chat__message br {
    display: none;
}

.send {    
    background: none;
    border: none;
    outline: none;
    cursor: pointer;
    position: absolute;
    /* top: calc(50% - 18px); */
    bottom: 6px;
    right: 10px;
}

.send svg {
    fill: #a3bac1;
    transition: .2s;
}

.send:hover svg {
    fill: #7f99a1;
}

.smile {
    width: 30px;
    height: 30px;    
    position: absolute;
    left: 6px;
    fill: rgb(194, 206, 207);
    /* top: calc(50% - 15px); */
    bottom: 10px;
    cursor: pointer;
}

.smile:hover {
    fill: #fff;
}

.settings {
    position: absolute;
    top: 50px;
    left: 0 !important;    
    width: 300px;    
    min-height: 300px;
    background: transparent;    
    transform: translate(-90%);
    transition: .7s;
    z-index: 2;
    color: #fff !important;
}

.settings.active {
    transform: translate(-1px);
}

.settings__header {
    position: relative;
    background: rgba(39, 39, 39, .85);
    border: 1px solid #828080;
    border-bottom: none;
    min-height: 50px;
}

.settings__title {
    text-align: center;    
    font-size: 20px;
    font-family: sans-serif;
    font-weight: bold;
    padding-top: 10px;
}

.settings__toggle {
    position: absolute;
    top: 0;
    right: 0;    
    border-right: 1px solid #828080;    
    border-bottom: 1px solid #828080;    
    width: 10%;
    height: 100%;
    cursor: pointer;
    box-shadow: none;
    background: transparent;
    transition: .2s;    
}

.settings__toggle:hover {
    box-shadow: 6px 0 14px #c5bcbc59;
    background: rgba(39, 39, 39, 0.877);
}

.settings__icon {
    color: #fff;
    font-size: 40px;
    position: relative;
    right: 5px;
    top: 4px;
    transition: .7s;
    user-select: none;
}

.settings__icon.rotate {
    transform: rotate(-180deg);
}

.settings__body {
    min-height: 100px;
    width: 90%;
    background: rgba(39, 39, 39, .85);
    border: 1px solid #828080;
    border-top: none;
    padding: 5px 20px 5px 10px;
    box-shadow: 0 3px 10px rgba(113, 113, 113, 0.69);
}

.settings__item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 15px 0;
}

.overlay-popup {
    position: fixed;
    height: 100%;
    width: 100%;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: -1;
    display: flex;
    opacity: 0;
    background: rgba(0, 0, 0, 0.7);
    transition: .4s;
}

.overlay-popup.active {
    opacity: 1;
    z-index: 100;
}

.popup {
    width: 500px;
    padding: 20px;
    margin: auto;
    display: flex;
    position: relative;
    z-index: 101;
    background: #3c6774;
}

.popup__input {
    flex-grow: 100;
    font-size: 20px;
    background: transparent;
    border: none;
    border-radius: 2px;
    color: #fff;
    margin-right: 10px;
    outline: none;
    padding: 4px 8px;
    box-shadow: 0px 1px 7px #78868a;
}

.popup__input::placeholder {
    color: #ababab;
}

.popup__button {
    border: none;
    background: #2d4850;
    border-radius: 2px;
    color: #fff;
    outline: none;
    font-size: 20px;
    cursor: pointer;
    padding: 3px;
}
.chat__message img {
    margin: 0 2px;
}
@media (max-width: 1200px) {
    .wrapper {
        width: 90%;
    }
}

@media (max-width: 550px) {
    .popup {
        width: 90%;
    }
}

@media (max-width: 400px) {
    .popup {
        flex-direction: column;
    }

    .popup__input {
        margin: 0;
    }

    .popup__button {
        margin-top: 10px;
    }
}


/********************/

.Emoji_Block .Emoji_Clear {
    clear: both;
}
.Emoji_Block .Emoji_Cont {
    display: none;
    position: absolute;
    height: 200px;
    border: 1px solid #ccc;
    border-radius: 4px;
}
.Emoji_Block .Emoji_Cont::after {
    content: "";
    position: absolute;
    top: -10px;
    left: 12px;
    width: 0;
    height: 0;
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
    border-bottom: 10px solid #fff;
}
.Emoji_Block .Emoji_Cont > div {
    background: #fff;
    width: 280px;
    height: 200px;
    padding: 5px;
    box-sizing: border-box;
    overflow-x: hidden;
    overflow-y: auto;
}
.Emoji_Block .Emoji_Cont .Emoji_Smile {
    float: left;
    padding: 1px;
    cursor: pointer;
}
.Emoji_Block .Emoji_Cont .Emoji_Smile > div {
    width: 26px;
    height: 26px;
    line-height: 26px;
    text-align: center;
}
.Emoji_Block .Emoji_Cont .Emoji_Smile > div img {
    margin-top: 5px;
}
.Emoji_Block .Emoji_Cont .Emoji_Smile > div:hover {
    background: #ccc;
    border-radius: 2px;
}
.Emoji_Block .Emoji_TollBar {
    width: 100%;
    height: 30px;
    background: #eee;
    position: relative;
    border-radius: 0 0 4px 4px;
}
.Emoji_Block .Emoji_Smiles_Show_Button {
    float: right;
    margin-top: 5px;
    margin-right: 5px;
}
.Emoji_Block .Emoji_Smiles_Show_Button > div {
    width: 20px;
    height: 20px;
    background: url(../img/1.png) 0 0 / cover;
    cursor: pointer;
}
.Emoji_Submit {
    position: absolute;
    right: 0;
    bottom: -30px;
}
.Emoji_Submit > div {
    display: inline-block;
    padding: 0 20px;
    height: 30px;
    line-height: 30px;
    text-align: center;
    background: #eee;
    border: 1px solid #eee;
    font-size: 12px;
    cursor: pointer;
}
.Emoji_Submit > div:hover {
    border: 1px solid #aaf;
}
