@import url('../../../fonts/Montserrat-Medium/styles.css');

.container {
    padding: 2px !important;
    /* overflow-y: auto;
    overflow-x: hidden; */
}

/* Chat Room */
.chat-container {
    z-index: 5;
    position: relative;
    width: var(--msger-width);
    height: var(--msger-height);
    min-width: var(--msger-width);
    min-height: var(--msger-height);
    padding: 3px;
    background: var(--msger-bg);
    border: 1px solid var(--msger-border);
    border-radius: 10px;
    /*box-shadow: var(--box-shadow);*/
    transition: background 1s;
    transition: width 0.5s ease-in-out;
    /* border: 1px solid lime; */
}

/* Chat app container */
.chat-app {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 10px;
    overflow-y: auto;
    overflow-x: hidden;
    /* border: 1px solid lime; */
}

/* Chat app people container */
.chat-app .people-list {
    z-index: 6;
    position: absolute;
    padding: 20px;
    top: 0;
    left: 0;
    width: 300px;
    height: 99%;
    background: var(--msger-bg);
    overflow-y: auto;
    overflow-x: hidden;
    /* border: 1px solid lime; */
}

/* Chat app people list container */
.people-list {
    -moz-transition: 0.5s;
    -o-transition: 0.5s;
    -webkit-transition: 0.5s;
    transition: 0.5s;
    /* border: 1px solid lime; */
}

.people-list .chat-list li {
    padding: 10px 15px;
    list-style: none;
    border-radius: 3px;
}

.people-list .chat-list li:hover {
    background: rgba(0, 0, 0, 0.2);
    cursor: pointer;
}

.people-list .chat-list li.active {
    background: rgba(0, 0, 0, 0.2);
}

.people-list .chat-list li .name {
    color: #fff;
    font-size: 15px;
}

.people-list .chat-list img {
    width: 45px;
    border-radius: 50%;
}

.people-list img {
    float: left;
    border-radius: 50%;
}

.people-list .about {
    float: left;
    padding-left: 8px;
}

.people-list .about-buttons {
    margin-top: 35px;
    width: auto;
    /* display: inline-flex; */
}

.people-list .status {
    color: #999;
    font-size: 13px;
}

/* Chat app people list container */
.chat-app .chat-list {
    height: auto;
    /* border: 1px solid lime; */
}

/* Chat app container */
.chat-app .chat {
    position: relative;
    margin-left: 300px;
    border-left: var(--border);
    border-radius: 10px;
    /* border: 1px solid lime; */
    height: 100%;
    display: flex !important;
    flex-direction: column;
}

.chat-history {
    scrollbar-width: none; /* Для Firefox */
    -ms-overflow-style: none;
}

.chat-history::-webkit-scrollbar {
    display: none; /* Для Chrome, Safari и новых Edge */
}

/* Chat header */
.chat .chat-header {
    padding: 10px; /* top, right, bottom, left */
    /*border-bottom: var(--border);*/
    /*height: 70px;*/
    /*max-height: 70px;*/
    /*cursor: move;*/
    /* overflow-x: auto; */
    /* border: 1px solid lime; */
}

.all-participants-img {
    border: var(--border);
    width: 40px;
    margin-right: 5px;
    cursor: pointer;
}

.all-participants-img:hover {
    background-color: #86c541;
    transition: all 0.3s ease-in-out;
}

.chat .chat-header img {
    float: left;
    border-radius: 40px;
    width: 40px;
}

.chat .chat-header .chat-about {
    float: left;
    padding-left: 10px;
    color: #fff;
}

.chat .chat-header .status {
    color: #999;
    font-size: 13px;
}
.chat-tabs {
    display: flex;
}
.chat-tab {
    font-size: 14px;
    font-weight: 400;
    color: var(--chat-tab-color);
    padding: 10px;
}

.chat-tab-active {
    color: var(--chat-tab-active-color);
    border-bottom: 1px solid var(--chat-tab-active-color);
}

.chat .chat-header .chat-option-buttons {
    position: absolute;
    display: inline-flex;
    top: 20px;
    right: 20px;
    z-index: 5;
}

/* Chat history */
.chat .chat-history {
    padding: 10px 20px;
    /*height: calc(100vh - 230px);*/
    /*min-height: calc(100vh - 230px);*/
    /*max-height: calc(100vh - 230px);*/
    /*border-bottom: var(--border);*/
    overflow-y: auto;
    overflow-x: hidden;
    flex-grow: 1; /* Занимает всё оставшееся пространство */
    overflow: auto;
    /* border: 1px solid lime; */
}

.chat .chat-history ul {
    padding: 0;
}

.chat .chat-history ul li {
    list-style: none;
    margin-bottom: 15px;
}

.chat .chat-history ul li:last-child {
    margin-bottom: 0px;
}

.chat .chat-history .message-data {
    display: flex;
    align-items: end;
    margin-right: 10px;
}

.chat .chat-history .message-data img {
    border-radius: 40px;
    width: 32px;
}

.chat .chat-history .message-data-time {
    color: #eeeeee;
    padding-left: 6px;
}

/* chat message bubble */
.chat .chat-history .message {
    color: #fff;
    padding: 10px;
    /*line-height: 26px;*/
    /*font-size: 16px;*/
    /*max-width: 100%;*/
    border-radius: 12px;
    display: flex;
    position: relative;

    /* border: 1px solid lime;  */
}

.chat .chat-history .my-message {
    background: var(--right-msg-bg);
    color: var(--right-msg-color);
}

.my-message-item {
    justify-content: end;
}

.chat .chat-history .other-message {
    background: var(--left-msg-bg);
    color: var(--left-msg-color);
    text-align: left;
}

.chat .chat-history .other-message:after {
    border-bottom-color: grey;
    left: 93%;
}

/* Chat message */
.chat .chat-message {
    padding: 20px;
    max-height: 140px;
    overflow-y: auto;
    overflow-x: hidden;
    /* border: 1px solid lime; */
    flex-shrink: 0;
}

/* Chat emoji */
.chatEmojiPicker {
    z-index: 0;
    position: absolute;
    left: 5px;
    bottom: 135px;
    background: var(--body-bg);
    border: var(--border);
    border-radius: 5px;
    --rgb-background: var(--body-bg);
    --color-border-over: var(--body-bg);
    --font-family: 'Montserrat';
}

/* status */
.online,
.offline,
.me {
    margin-right: 2px;
    font-size: 8px;
    vertical-align: middle;
}

.online {
    color: #86c541;
}
.offline {
    color: #e47297;
}
.me {
    color: #1d8ecd;
}

.float-right {
    float: right;
}
.float-left {
    float: left;
}

.inline {
    display: inline-flex;
}

.absolute {
    position: absolute;
}

.clearfix:after {
    visibility: hidden;
    display: block;
    font-size: 0;
    content: ' ';
    clear: both;
    height: 0;
}

/** common **/
.mt5 {
    margin-top: 5px;
}

.mt10 {
    margin-top: 10px;
}

.mr5 {
    margin-right: 5px;
}

.ml5 {
    margin-left: 5px;
}

.ml10 {
    margin-left: 10px;
}

/* Chat search and input message */
textarea,
input[type='text'] {
    background: var(--msger-bg) !important;
    color: #fff !important;
    transition: height 0.5s !important;
}

.form-check-input {
    cursor: pointer;
}

#chatShareRoomBtn {
    padding: 8px 16px;
    background: var(--body-bg);
    border-radius: 5px;
    border: var(--border);
    transition: all 0.3s ease-in-out;
}

#chatShareRoomBtn:hover {
    background: var(--select-bg);
    transform: translateY(-3px);
}

.chat-message-item {
    display: flex;
}

.message-time {
    display: flex;
    align-items: end;
    font-size: 12px;
    color: var(--ct-msg-time-color);
    margin-left: 10px;
}

.message-author {
    font-size: 12px;
}

.message-text {
    font-size: 14px;
}

/* handle screen sizes */
@media screen and (max-width: 600px) {
    .people-list {
        width: 100% !important;
    }
}

.chat-input-container {
    position: relative;
    display: flex;
    align-items: center;
    border: 1px solid var(--chat-input-border);
    border-radius: 12px;
    padding: 10px;
    background-color: inherit;
    min-height: 48px;
    max-height: 90px; /* Фиксированная высота (3 строки) */
}

.chat-textarea {
    flex: 1;
    border: none;
    background: transparent;
    color: var(--chat-input-color) !important;
    font-size: 14px;
    line-height: 20px;
    outline: none;
    resize: none;
    overflow: hidden; /* Скрытие скроллбара */
    height: 100%;
}
