/* CHAT  */

.section-chat .riga-chat {
    display: flex;
    padding: 1em .75em;
    border-bottom: 1px solid lightgrey;
    transition: .3s;
    cursor: pointer;
}

.section-chat .riga-chat:hover {
    background-color: #d3d3d375;
}

.section-chat .riga-chat:first-child {
    padding-top: 1em !important;
}
  
.section-chat .img-user-chat {
    width: 13%;
    height: auto;
    aspect-ratio: 1/1;
    border: 1px solid lightgray;
    object-fit: cover;
    border-radius: 100%;
}

.section-chat .img-user-chat.admin {
    background-color: white;
    padding: 5px;
    object-fit: contain;
}
  
.section-chat .riga-chat .info {
    position: relative;
    width: 87%;
    padding-left: 20px;
}
  
.section-chat .riga-chat .time {
    position: absolute;
    right: 0;
    color: gray;
    font-size: 13px;
}

.section-chat .riga-chat.unseen .time {
    font-weight: 500;
    color: black;
}
  
.section-chat .riga-chat .name {
    display: block;
    font-size: 19px;
    font-weight: 500;
    margin-bottom: 5px;
}

.section-chat .riga-chat.unseen .name {
    font-weight: 650;
}
  
.section-chat .riga-chat .msg {
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.section-chat .riga-chat.unseen .msg {
    font-weight: 500;
}

.section-chat .chat-header {
    background-color: white;
    border-top: 1px solid lightgrey;
}

.section-chat .chat-header.admin {
    border-top: 0;
}
  
.section-chat .chat-sidebar {
    border-right: 1px solid lightgrey;
    min-height: 80vh;
    max-height: 80vh;
    overflow-y: scroll;
}

.section-chat .chat-body {
    border: 1px solid lightgrey;
}

.section-chat .chat-footer {
    position: fixed;
    width: 100%;
    position: absolute;
    bottom: 0;
    display: block;
    background-color: lightgray;
    padding: 10px;
    display: flex;
    justify-content: space-between;
}
  
.section-chat .chat-msg-container {
    position: relative;
}
  
.section-chat .chat-footer textarea {
    width: 100%;
    background: transparent;
    border: 0;
}

.section-chat .chat-msg-container {
    overflow: hidden;
}
  
.section-chat .chat-footer {
    background-color: #80bae3;
}

.section-chat .chat-footer textarea {
    background: white;
    border-radius: 15px;
    padding: 5px 10px;
    resize: none;
}

.section-chat .chat-footer textarea:focus,
.section-chat .chat-footer textarea:focus-visible {
    outline: none;
}
  
.section-chat .btn-send {
    background: transparent;
    border: 0;
    color: white;
    margin: 0 10px 0 20px;
    opacity: .5;
}

.section-chat .btn-send.ready {
    opacity: 1;
}

.riga-messaggio {
    padding: 5px 35px;
    display: flex;
    align-items: end;
}

.riga-messaggio.me {
    justify-content: end;
}

.riga-messaggio.other {
    justify-content: start;
    flex-direction: row-reverse;
}

.riga-messaggio.me .messaggio {
    background: lightgray;
    border-top-right-radius: 0;
}

.riga-messaggio.other .messaggio {
    background: lightblue;
    border-top-left-radius: 0;
}

.messaggio {
    padding: 10px 15px;
    display: inline-block;
    position: relative;
    border-radius: 15px;
    max-width: 50%;
    word-break: break-all;
}

.messages {
    overflow-y: scroll;
    min-height: 80vh;
    max-height: 80vh;
    padding-bottom: 80px;
}

.messages.no-chat {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
}

.riga-messaggio .time {
    color: grey;
    padding-bottom: 1px;
    font-size: 11px;
}

.riga-messaggio.other .time {
    padding-left: 7px;
}
  
.riga-messaggio.me .time {
    padding-right: 7px;
}

.col-chat-header {
    padding: 10px;
    min-height: calc(3em + 20px);
    border-top: 1px solid lightgray;
}

.col-chat-header .info-user-container {
    display: none;
    justify-content: start;
    align-items: center;
    height: 100%;
}
  
.col-chat-header .info-user-container img {
    height: 3em;
    width: auto !important;
}
  
.col-chat-header.opened {
    background: #298cd2;
    border-top: 0;
}

.col-chat-header.opened .info-user-container {
    display: flex;
}
  
.col-chat-header .name-user-chat {
    font-weight: 500;
    font-size: 19px;
    color: white;
}

.no-chats,
.no-conversations {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background-color: white;
}
  
.bi.icon-no-results {
    color: #298cd280;
    font-size: 100px;
}

.no-chats .bi.icon-no-results {
    font-size: 150px;
}
  
.text-no-results {
    color: #298cd2;
}

.separatore-giorno {
    text-align: center;
    font-size: 13px;
    padding: 20px 0;
}

.separatore-giorno span {
    background: #80bae3;
    color: white;
    padding: 5px;
    font-weight: 550;
    border-radius: 5px;
}