:root {
    --tchat-h: rgb(27, 79, 177);
    --tchat-s: #0072e4;
    --tchat-r: #fff;
    --tchat-sc: #fff;
    --tchat-rc: #000;
    --text-entry: #fff;
    --text-entry-c: #666;
    --optionsMess-b: #fff;
    --optionsMess-c: #444;
    --optionsMess-i: #333;
}

#tchat {
    position: fixed;
    bottom: 15px;
    right: calc(((100% - 1000px) / 2) + 20px);
    max-width: 350px;
    z-index: 1;
    background: #000;
    border-radius: 10px;
    height: 500px;
    box-shadow: 0 5px 10px #4441, 0 -5px 10px #4441;
    visibility: hidden;
    opacity: 0;
    transition: all .3s ease-in-out;
    display: flex;
    flex-direction: column;
}

#tchat.active {
    visibility: visible;
    opacity: 1;
    transition: all .3s ease-in-out;
}

#tchat .header {
    display: flex;
    position: sticky;
    top: 0;
    align-items: center;
    padding: 10px;
    z-index: 1;
}

#tchat .header img {
    width: 30px;
    margin-right: 10px;
}

#tchat .header span:last-child {
    font-family: Po01;
    font-weight: bold;
    font-size: 18px;
}

#tchat .header .mio {
    font-size: 30px;
    cursor: pointer;
}

#tchat .header,
#tchat .desc {
    background: var(--tchat-h);
    color: #fff;
}

#tchat .header {
    background: #222;
}

#tchat .desc {
    padding: 8px 10px;
    text-align: center;
    margin: 8px auto;
    font-size: 12px;
    background: #333;
    display: block;
    max-width: 200px;
    border-radius: 10px;
}

#tchat .infos,
#tchat #infos {
    text-align: center;
    max-width: 80%;
    margin: 0 auto;
    clear: both;
}

#tchat .infos span,
#tchat #infos span {
    display: inline-block;
    width: auto;
    margin: 8px auto 5px;
    border-radius: 20px;
    background: #fff2;
    padding: 5px 15px;
    font-size: 12px;
    text-align: center;
    font-weight: bold;
    color: #777;
}

@media screen and (max-width: 1000px) {
    #tchat {
        right: 15px;
    }
}

#tchat .receiverMess {
    background-color: #ccc;
    color: var(--tchat-rc);
    margin-left: 10px;
}

#tchat .senderMess,
#tchat .receiverMess {
    width: auto;
    border-radius: 5px 5px 10px 10px;
    max-width: 80%;
    margin-bottom: 5px;
    position: relative;
    clear: both;
    min-width: 70px;
    cursor: pointer;
}

#tchat .senderMess {
    background-color: #fff3;
    color: #fff;
    margin-left: auto;
    margin-right: 10px;
}

#tchat .only {
    border-radius: 10px;
    padding-bottom: 15px;
}

#tchat .file {
    display: flex;
    align-items: center;
    padding: 2px;
}

#tchat .file .mio {
    font-size: 80px;
}

#tchat .file.doc {
    background: #0002;
}

#tchat .file .related_info {
    display: flex;
    margin-left: 10px;
    justify-content: center;
    flex-direction: column;
}

#tchat .textMess {
    padding: 5px 10px;
    border-radius: 0 0 10px 10px;
}

#tchat .author {
    background: var(--bg4);
    font-weight: bold;
    padding: 10px 0 5px 10px;
}

#tchat .only .textMess {
    padding: 8px 10px;
}

#tchat img,
#tchat video {
    width: calc(100% - 4px);
    margin: 2px;
}

#tchat .contents {
    height: 500px;
    margin-bottom: 10px;
    background: #000;
    overflow: hidden;
}

#tchat .layouts {
    display: flex;
    color: var(--text-entry-c);
    width: 100%;
    align-items: center;
    position: relative;
    z-index: 2;
    flex-direction: column;
    background: #fff1;
}

.layouts .ctn {
    width: 100%;
    display: flex;
    align-items: center;
}

#tchat .layouts .subLayouts {
    display: flex;
    width: calc(100% - 40px);
    background: #111;
    border-radius: 20px;
    border: solid 1px #fff2;
}

#tchat .layouts .subLayouts textarea {
    width: 100%;
    font-family: Po02;
    color: #fff;
    border-radius: 20px 0 0 20px;
    outline: none;
    border: none;
    background-color: transparent;
    padding: 5px 15px;
    resize: none;
    height: 100%;
    font-size: 18px;
    display: flex;
    align-items: center;
}

#tchat .layouts .subLayouts button {
    background: transparent;
    color: var(--text-entry-c);
    padding: 0 10px;
    border: none;
    cursor: pointer;
}

#tchat .layouts .subLayouts+button {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: none;
    background-color: var(--secondary);
    color: #333;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

#tchat .layouts #fileDisc {
    display: none;
}

#tchat figure {
    position: absolute;
    top: 50px;
    left: 0;
    background: #fff;
    color: #555;
    width: 100%;
    height: calc(100% - 50px);
    z-index: 5;
    display: flex;
    flex-direction: column;
    justify-content: center;
    text-align: center;
}

#tchat figure img {
    width: 50px;
    margin: 0 auto;
}

#tchat .time {
    text-align: right;
    position: absolute;
    right: 7px;
    bottom: 5px;
    font-weight: bold;
    font-size: 12px;
}

#tchat .time .mio {
    font-size: 14px;
}

#tchat .fileViewer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #000;
    z-index: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    visibility: hidden;
    opacity: 0;
    transition: all .3s ease-in-out;
}

#tchat .fileViewer.active {
    visibility: visible;
    opacity: 1;
    transition: all .3s ease-in-out;
}

#tchat .fileViewer img,
#tchat .fileViewer video,
#tchat .fileViewer .mio.document {
    width: 100%;
    max-height: 90%;
    display: none;
}

#tchat .fileViewer .mio.document {
    text-align: center;
}

#tchat .fileViewer .mio:first-child {
    position: absolute;
    display: block;
    top: 20px;
    left: 20px;
    color: #fff;
    font-weight: bold;
    cursor: pointer;
    z-index: 2;
}

#tchat .fileViewer .mdocument {
    display: flex;
    flex-direction: column;
    justify-content: center;
    text-align: center;
    color: #f0f0f0;
}

#tchat .fileViewer .mdocument span.mio {
    position: initial;
    display: block;
    color: #fff;
    font-weight: normal;
    font-size: 100px;
}

#tchat .contents {
    height: calc(100% - 50px);
    height: auto;
    display: flex;
    flex-direction: column;
    margin: 0;
    flex: 1;
}

#tchat .contents .content {
    display: flex;
    flex-direction: column;
    flex: 1;
    overflow: auto;
}

@media screen and (max-width: 500px) {
    #tchat {
        width: 100%;
        height: 100%;
        max-width: 100%;
        z-index: 2;
        bottom: 0;
        right: 0;
    }
}

#optionMess {
    display: block;
    padding: 0 5px;
    background: var(--optionsMess-b);
    color: var(--optionsMess-c);
    max-width: calc(290px - 15px);
    border-radius: 10px;
    z-index: 2;
    clear: both;
    display: flex;
    justify-content: space-between;
    margin-bottom: 5px;
}

#tchat #optionMess.fr {
    margin-left: auto;
    margin-right: 10px;
}

#tchat #optionMess.fl {
    margin-right: auto;
    margin-left: 10px;
}

#tchat #optionMess li span:not(.mio):last-child {
    font-size: 14px;
}

#tchat #optionMess li {
    display: flex;
    align-items: center;
    justify-content: start;
    margin: 2px 0;
    cursor: pointer;
    padding: 10px 7px;
}

#tchat #optionMess li:hover {
    background: #0001;
    border-radius: 10px;
}

#tchat #optionMess li .mio {
    color: var(--optionsMess-i);
    margin-right: 5px;
    font-size: 20px;
}

textarea#opT {
    position: fixed;
    top: -200%;
}

#tchat .editMess {
    display: flex;
    border-top: solid 1px #fff2;
    border-radius: 10px 10px 0 0;
    width: 100%;
    padding: 5px 10px;
    align-items: center;
    justify-content: space-between;
    display: none;
}

#tchat .editMess .message {
    width: 100%;
    text-overflow: ellipsis;
    opacity: .7;
}

#tchat .editMess .mio {
    display: block;
    background: var(--shadow);
    color: red;
    border-radius: 50%;
    padding: 3px;
}

.boxSeeDisc,
#send.sendMess {
    position: fixed;
    bottom: 70px;
    right: calc(((100% - 1000px) / 2) + 20px);
    box-shadow: 0 5px 10px var(--shadow);
    border-radius: 50%;
    z-index: 1;
    cursor: pointer;
}

@media screen and (max-width: 1000px) {
    .boxSeeDisc,
    #send.sendMess {
        right: 50px;
    }
}


#send.sendMess {
    bottom: 80px;
    display: flex;
    align-items: center;
    visibility: hidden;
    opacity: 0;
    transition: all 0.3s ease-in-out;
    cursor: default;
}

#send.sendMess.active {
    visibility: visible;
    opacity: 1;
    transition: all 0.3s ease-in-out;
}

#send.sendMess span:first-child {
    background: #0072e4;
    color: #fff;
    display: inline-block;
    border-radius: 20px;
    padding: 8px 20px;
    max-width: 250px;
}

#send.sendMess span.mio {
    color: #fff;
    padding: 5px;
    font-size: 12px;
    border-radius: 50%;
    background-color: red;
    margin-left: 5px;
    cursor: pointer;
}

.boxSeeDisc .mio {
    font-size: 25px;
    padding: 15px;
    border-radius: 50%;
    background: var(--secondary);
    color: #222;
}

.boxSeeDisc .unreadMess {
    display: inline-block;
    width: 15px;
    height: 15px;
    border-radius: 50%;
    background: red;
    color: #fff;
    font-weight: bold;
    position: absolute;
    top: 7px;
    right: -3px;
    display: none;
}