.popup-header-link {
    color: white;
}

.popup-header-link:hover {
    color: dodgerblue;
    text-decoration: underline;
}

.popup-container {
    position: fixed;
    bottom: 0px;
    right: 0px;
    display: flex;
    flex-direction: row-reverse;
    align-items: flex-end;
    gap: 0.5rem;
    z-index: 1000;
}

.chat-widget {
    position: relative;
    bottom: 0px;
    right: 0px;
    width: 300px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 0 10px rgba(0,0,0,0.2);
    transition: all 0.3s ease;
}

.chat-widget.minimized {
    height: 50px;
    overflow: hidden;
}

.chat-widget:not(.minimized) {
    height: 400px;
}

.mini-chat {
    position: relative;
    bottom: 0px;
    right: 0px;
    width: 300px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 0 10px rgba(0,0,0,0.2);
    transition: all 0.3s ease;
}

.mini-chat.minimized {
    height: 50px;
    overflow: hidden;
}

.mini-chat:not(.minimized) {
    height: 400px;
}

.chat-widget .chat-header {
    background: #F58466;
    color: white;
    padding: 10px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
}

.mini-chat .chat-header {
    background: #F58466;
    color: white;
    padding: 10px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
}

.has-unread .unread-count {
    background: #e74c3c;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    margin-left: 5px;
}

@keyframes notify {
    0%, 100% {
        transform: scale(1);
        color: #32CD32;
    }
    50% {
        transform: scale(1.3);
        color: #66FF99;
    }
}

.unread-envelope {
    display: none;
}

.has-unread .unread-envelope {
    display: block;
    animation: notify 1s infinite;
}

.chat-close {
    font-size: 20px;
}

.chat-body {
    display: flex;
    flex-direction: column;
    height: calc(100% - 40px);
}

.chat-messages {
    flex-grow: 1;
    padding: 10px;
    overflow-y: auto;
    background-color: #f5f5f6;
    margin-bottom: 1px;
}

.chat-body .chat-search {
    background-color: #f5f5f6;
    border-bottom: 1px solid #f3f3f3;
    padding: 10px 15px;
    width: 100%;
}

.chat-body .chat-search .input-group {
    width: 100%;
}

.chat-body .chat-search .input-group .input-group-prepend {
    color: #666;
    pointer-events: none;
    z-index: 4;
    position: absolute;
    top: 0;
    bottom: 0;
    left: 15px;
    display: flex;
    align-items: center;
}

.chat-body .chat-search .input-group .form-control {
    background-color: #ffffff;
    padding-left: 36px;
    border-radius: 14px;
}

.chat-body .chat-scroll {
    min-height: 300px;
    max-height: calc(100vh - 224px);
    overflow-y: auto;
}

.chat-body .chat-users-list a.notify-block {
    border-bottom: 1px solid #f0f0f0;
    padding: 10px 15px;
    -webkit-transition: all 0.2s ease 0s;
    -ms-transition: all 0.2s ease 0s;
    transition: all 0.2s ease 0s;
    background-color: #ffffff;
}

.chat-body .chat-users-list a.notify-block:hover {
    background-color: #f5f5f6;
}

.chat-body .chat-users-list a.notify-block.active {
    background-color: #f5f5f6;
}

.chat-body .chat-users-list a.notify-block:last-child {
    border-bottom: 0;
}

.chat-body .chat-users-list a.notify-block .media-img-wrap {
    margin-right: 15px;
    position: relative;
}

.chat-body .chat-users-list a.notify-block .media-img-wrap .avatar {
    height: 45px;
    width: 45px;
}

.chat-body .chat-users-list a.notify-block .media-body {
    display: flex;
    justify-content: space-between;
}

.chat-body .chat-users-list a.notify-block .media-body > div:first-child .user-name {
    max-width: 250px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: #272b41;
    text-transform: capitalize;
}

.chat-body .chat-users-list a.notify-block .media-body > div:first-child .user-last-chat {
    max-width: 250px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: #8a8a8a;
    font-size: 14px;
    line-height: 24px;
}

.chat-body .chat-users-list a.notify-block.read-chat .media-body > div:last-child .last-chat-time {
    color: #8a8a8a;
}

.chat-body .chat-users-list a.notify-block .media-body > div:last-child .last-chat-time {
    color: #8a8a8a;
    font-size: 13px;
}

.chat-body .chat-users-list a.notify-block .media-body > div:last-child {
    text-align: right;
}

.chat-input {
    display: flex;
    align-items: center;
    padding-top: 5px;
    padding-bottom: 10px;
    border-top: 1px solid #eee;
    margin-bottom: 5px;
}

.chat-input input {
    flex-grow: 1;
    padding: 8px;
    margin-right: 5px;
    border: none;
}

.chat-input input:focus {
    outline: none;
    border: none;
}

.chat-input .send-button {
  cursor: pointer;
  /* display: inline-block; */
  font-size: 18px;
}

.message {
    margin-bottom: 10px;
    padding: 8px;
    border-radius: 4px;
}

.message.sent {
    background: #e3f2fd;
    margin-left: 20px;
}

.message.received {
    background: #f1f1f1;
    margin-right: 20px;
}

.message-time {
    font-size: 0.8em;
    color: #666;
    text-align: right;
}

.chat-messages ul.chat-messages {
    width: 100%;
    margin: 0 auto;
    padding: 15px;
}

.chat-messages .chat-date {
    font-size: 14px;
    margin: 1.875rem 0;
    overflow: hidden;
    position: relative;
    text-align: center;
    text-transform: capitalize;
}

.chat-messages .notify-block.received {
    margin-bottom: 20px;
}

.chat-messages .notify-block.received .media-body {
    position: relative;
}

.chat-messages .notify-block .media-body {
    margin-left: 20px;
}

.chat-messages .notify-block.received .media-body .msg-box:first-child:before {
    border-bottom: 6px solid transparent;
    border-right: 6px solid #ffffff;
    border-top: 6px solid transparent;
    content: "";
    height: 0;
    width: 0;
    position: absolute;
    top: 8px;
    right: auto;
    left: -6px;
}

.chat-messages .notify-block.received .media-body .msg-box > div {
    background-color: #ffffff;
}

.chat-messages .notify-block .media-body .msg-box > div {
    display: inline-block;
    position: relative;
    border-radius: 0.25rem;
    padding: 10px 15px;
}


.chat-messages .notify-block.sent {
    margin-bottom: 20px;
}

.chat-messages .notify-block.sent .media-body {
    margin-left: 0;
    display: flex;
    justify-content: flex-end;
    align-items: flex-end;
    flex-direction: column;
}

.chat-messages .notify-block.sent .media-body .msg-box {
    padding-left: 50px;
    position: relative;
}

.chat-messages .notify-block.sent .media-body .msg-box:first-child:before {
    border-bottom: 6px solid transparent;
    border-left: 6px solid #e3e3e3;
    border-top: 6px solid transparent;
    content: "";
    height: 0;
    width: 0;
    position: absolute;
    top: 8px;
    right: -6px;
    left: auto;
}

.chat-messages .notify-block.sent .media-body .msg-box > div {
    background-color: #e3e3e3;
}

.chat-messages .notify-block.sent .media-body .msg-box > div p {
    color: #272b41;
}

.chat-messages .notify-block .media-body .msg-box > div p {
    color: #272b41;
    margin-bottom: 0;
}

.chat-messages .notify-block.sent .media-body .msg-box > div .chat-msg-info {
    flex-direction: row-reverse;
}

.chat-messages .chat-msg-info {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    clear: both;
    list-style: none;
    margin: 5px 0 0;
    padding: 0;
}

.chat-messages .notify-block.sent .media-body .msg-box > div .chat-msg-info li {
    padding-left: 16px;
    padding-right: 0;
    position: relative;
}

.chat-messages .chat-msg-info li {
    font-size: 13px;
    padding-right: 16px;
    position: relative;
}

.chat-messages .notify-block.sent .media-body .msg-box > div .chat-time {
    color: rgba(50, 65, 72, 0.4);
}

.chat-messages .msg-typing {
    width: auto;
    height: 24px;
    padding-top: 8px;
}

@keyframes blink {
    50% {
        opacity: 1;
    }
}

.chat-messages .msg-typing span:nth-of-type(1) {
    animation: 1s blink infinite 0.33333s;
}

.chat-messages .msg-typing span:nth-of-type(2) {
    animation: 1s blink infinite 0.66666s;
}

.chat-messages .msg-typing span:nth-of-type(3) {
    animation: 1s blink infinite 1s;
}

.chat-messages .msg-typing span {
    height: 8px;
    width: 8px;
    float: left;
    margin: 0 1px;
    background-color: #a0a0a0;
    display: block;
    opacity: 0.4;
    border-radius: 50%;
}

