:root {
    --body-bg: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    --msger-bg: #fff;
    --border: 1px solid #ddd;
    --left-msg-bg: #ececec;
    --right-msg-bg: #ba87d4;
}

.messaging-section {
    display: flex;
    flex-flow: column wrap;
    justify-content: space-between;
    border: var(--border);
    border-radius: 5px;
    background: var(--msger-bg);
    box-shadow: 0 15px 15px -5px rgba(0, 0, 0, 0.2);
}

.messaging-header {
    display: flex;
    background: #f6f4f4;
    color: white;
    border-radius: 5px 5px 0 0;
    box-shadow: 0px 0px 2px rgba(68, 68, 68, 0.6);
    justify-content: space-around;
    padding: 2px;
}

.messaging-header-title {
    color: purple;
    font-size: 1.5em;
}

.messaging-chat {
    flex: 1;
    overflow-y: auto;
    padding: 10px;
}

.messaging-chat::-webkit-scrollbar {
    width: 6px;
}

.messaging-chat::-webkit-scrollbar-track {
    background: #ddd;
}

.messaging-chat::-webkit-scrollbar-thumb {
    background: #bdbdbd;
}

.msg {
    display: flex;
    align-items: flex-end;
    margin-bottom: 10px;
}

.msg:last-of-type {
    margin: 0;
}

.msg-img {
    width: 30px;
    height: 30px;
    margin-right: 10px;
    background: #ddd;
    background-repeat: no-repeat;
    background-position: center;
    background-size: cover;
    border-radius: 50%;
    display: inline-block;
    font-size: 14px;
    line-height: 30px;
    background-color: purple;
    color: white;
    text-align: center;
    vertical-align: bottom;
}

.msg-bubble {
    max-width: 450px;
    background: var(--left-msg-bg);
    padding: 3px;
    border-radius: 5px;
    min-width: 200px;
}

.msg-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.msg-info-name {
    margin-right: 10px;
    font-weight: bold;
}

.msg-info-time {
    font-size: 0.8em;
    margin-right: 5px;
}

.left-msg .msg-bubble {
    border-bottom-left-radius: 0;
}

.right-msg {
    flex-direction: row-reverse;
}

.right-msg .msg-bubble {
    background: var(--right-msg-bg);
    color: #fff;
    border-bottom-right-radius: 0;
}

.right-msg .msg-img {
    margin: 0 0 0 10px;
}

.messaging-inputarea {
    display: flex;
    padding: 10px;
    border-top: var(--border);
    background: #eee;
}

.messaging-inputarea * {
    padding: 10px;
    border: none;
    border-radius: 3px;
    font-size: 1em;
}

.messaging-input {
    flex: 1;
    background: #ddd;
    outline: none !important;
}

.messaging-send-btn {
    margin-left: 10px;
    color: #fff;
    cursor: pointer;
    transition: background 0.23s;

    background: purple;
    outline: none !important;
}

.messaging-send-btn i {
    font-weight: bold;
}

.messaging-send-btn:hover {
    background: purple;
    outline: none !important;
}

.messaging-chat {
    background-color: white;
}

.msg-text {
    font-weight: 500;
    font-size: 14px;
    margin-left: 5px;
    word-break: break-all;
}

.typing-msg .msg-bubble {
    min-width: 0px;
}

/* For typing indicator */
.typing-block {
    align-items: center;
    display: flex;
    height: 17px;
}

.typing-container .typing-dot {
    background-color: #90949c;
}

.typing-dot {
    -webkit-animation: mercuryTypingAnimation 1.5s infinite ease-in-out;
    border-radius: 4px;
    display: inline-block;
    height: 8px;
    margin-right: 2px;
    width: 8px;
}

.typing-dot:nth-child(1) {
    -webkit-animation-delay: 200ms;
}

.typing-dot:nth-child(2) {
    -webkit-animation-delay: 300ms;
}

.typing-dot:nth-child(3) {
    -webkit-animation-delay: 400ms;
}

.messaging-notification {
    display: flex;
    justify-content: center;
}

.messaging-notification-bubble {
    background: #853a85;
    color: #ffffff;
    border-radius: 6px;
}

.messaging-notification-text {
    font-weight: 500;
    font-size: 10px;
    margin-left: 5px;
    margin-right: 5px;
    text-transform: uppercase;
}

.msg-reply {
    background: #c0c0c08f;
    height: 50px;
    border-radius: 5px;
}

.msg-reply-user {
    font-weight: 500;
    font-size: 14px;
    margin-left: 5px;
    padding-top: 3px;
    color: purple;
}

.msg-reply-text {
    font-weight: 450;
    font-size: 14px;
    margin-left: 5px;
    text-overflow: ellipsis;
    overflow: hidden;
    white-space: nowrap;
}