.chat-app {
    min-height: 400px;
}

.chat-app .people-list {
    width: 280px;
    min-height: 400px;
    position: absolute;
    left: 0;
    top: 0;
    padding: 20px;
    z-index: 7
}

.chat-app .chat {
    margin-left: 280px;
    min-height: 400px;
    height: 700px;
    display: flex;
    flex-direction: column;
    border-left: 1px solid var(--border-color)
}

@media (max-width: 1600px) {
    .chat-app .chat {
        height: 550px;
    }
}

.people-list {
    -moz-transition: .5s;
    -o-transition: .5s;
    -webkit-transition: .5s;
    transition: .5s
}

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

.people-list .chat-list li i {
    font-size: 25px;
}

.people-list .chat-list li:hover,
.people-list .chat-list li.active {
    background: var(--primary-color);
    color: var(--font-white);
    cursor: pointer
}

.people-list .chat-list li .name {
    font-size: 15px
}

.people-list .chat-list li .status {
    display: flex;
    align-items: center;
}

.people-list .chat-list li .status i {
    font-size: 10px;
    margin: 0 5px 0 0;
}

.people-list .chat-list li .status i:nth-child(2) {
    margin: 0 5px 0 10px;
    font-size: 12px;
}

.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 .status {
    opacity: .7;
    font-size: 13px
}

.chat .chat-header {
    padding: 15px 20px;
    border-bottom: 1px solid var(--border-color);
    flex-shrink: 0;
}

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

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

.chat .chat-history {
    padding: 20px;
    border-bottom: 2px solid var(--card-color);
    flex: 1;
    min-height: 0;
    overflow-y: auto;
}

.chat .chat-history #chat-empty-state {
    min-height: 400px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.chat .chat-history #chat-empty-state i {
    font-size: 100px;
    margin: 0 0 30px;
}

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

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

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

.chat .chat-history .message-data {
    margin-bottom: 15px
}

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

.chat .chat-history .message-data-time {
    color: var(--text-muted);
    padding-left: 6px;
    font-size: 12px
}

.chat .chat-history .message {
    color: var(--bg-hc-color);
    padding: 18px 20px;
    line-height: 26px;
    font-size: 16px;
    border-radius: 7px;
    display: inline-block;
    position: relative
}

.chat .chat-history .message:after {
    bottom: 100%;
    left: 7%;
    border: solid transparent;
    content: " ";
    height: 0;
    width: 0;
    position: absolute;
    pointer-events: none;
    border-bottom-color: var(--white-color);
    border-width: 10px;
    margin-left: -10px
}

.chat .chat-history .my-message {
    background: var(--font-xlight)
}

.chat .chat-history .my-message:after {
    bottom: 100%;
    left: 30px;
    border: solid transparent;
    content: " ";
    height: 0;
    width: 0;
    position: absolute;
    pointer-events: none;
    border-bottom-color: var(--font-xlight);
    border-width: 10px;
    margin-left: -10px
}

.chat .chat-history .other-message {
    background: var(--secondary-color);
    color: var(--font-white);
    text-align: right
}

.chat .chat-history .other-message:after {
    border-bottom-color: var(--secondary-color);
    left: 93%
}

.chat .chat-message {
    padding: 20px;
    height: 130px !important;
}

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

.online {
    color: #42d182
}

.offline {
    color: #fe2053
}

.me {
    color: #0c85e0
}

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

@media only screen and (max-width: 767px) {
    .chat-app .people-list {
        height: 465px;
        width: 100%;
        overflow-x: auto;
        background: var(--white-color);
        left: -400px;
        display: none
    }

    .chat-app .people-list.open {
        left: 0
    }

    .chat-app .chat {
        margin: 0;
        height: 450px;
    }

    .chat-app .chat .chat-header {
        border-radius: 0.55rem 0.55rem 0 0
    }

    .chat-app .chat-history {
        height: auto;
        overflow-x: auto
    }
}

@media only screen and (min-width: 768px) and (max-width: 992px) {
    .chat-app .chat-list {
        height: 650px;
        overflow-x: auto
    }

    .chat-app .chat {
        height: 750px;
    }

    .chat-app .chat-history {
        height: auto;
        overflow-x: auto
    }
}

@media only screen and (min-device-width: 768px) and (max-device-width: 1024px) and (orientation: landscape) and (-webkit-min-device-pixel-ratio: 1) {
    .chat-app .chat-list {
        height: 480px;
        overflow-x: auto
    }

    .chat-app .chat {
        height: calc(100vh - 250px);
    }

    .chat-app .chat-history {
        height: auto;
        overflow-x: auto
    }
}

.user-avatar {
    width: 40px !important;
    height: 40px !important;
    object-fit: contain;
    background-color: #fff;
    border: 1px solid var(--border-color, #e4e4e4);
    padding: 2px;
    border-radius: 6px !important;
}

.message {
    max-width: 70%;
}

.message .time-top-left {
    font-size: 10px;
    color: #9a9a9a;
}

.message .time-top-right {
    font-size: 10px;
    color: #fff;
}


.message .message-text {
    margin-top: 15px;
}

.message-text {
    white-space: pre-wrap;
    display: block;
}

.input-group>.input-group-prepend>.input-group-text:focus {
    box-shadow: none !important;
    outline: none !important;
}

/* WhatsApp-like support chat input area */
.chat-message-container {
    padding: 15px 20px;
    background-color: var(--white-color, #ffffff);
    border-top: 1px solid var(--border-color, #e4e4e4);
    display: flex;
    flex-direction: column;
    width: 100%;
    flex-shrink: 0;
}

.chat-input-row {
    display: flex;
    align-items: flex-end;
    gap: 12px;
    width: 100%;
}

.chat-icon-btn {
    background: none;
    border: none;
    outline: none;
    color: #888;
    font-size: 20px;
    cursor: pointer;
    padding: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background-color 0.2s, color 0.2s;
    height: 40px;
    width: 40px;
}

.chat-icon-btn:hover {
    background-color: #f1f1f1;
    color: var(--primary-color, #0c85e0);
}

.chat-textarea {
    flex: 1;
    border: 1px solid var(--border-color, #cccccc);
    border-radius: 20px;
    padding: 10px 18px;
    font-size: 14px;
    line-height: 20px;
    resize: none;
    max-height: 120px;
    outline: none;
    background-color: #fafafa;
    transition: border-color 0.2s, background-color 0.2s;
    height: 40px;
    box-sizing: border-box;
}

.chat-textarea:focus {
    border-color: var(--primary-color, #0c85e0);
    background-color: #ffffff;
}

.chat-send-circle-btn {
    background-color: var(--primary-color, #0c85e0);
    border: none;
    outline: none;
    color: #ffffff;
    font-size: 16px;
    cursor: pointer;
    width: 40px;
    height: 40px;
    min-width: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.15);
    transition: background-color 0.2s, transform 0.1s;
    padding: 0;
}

.chat-send-circle-btn:hover {
    background-color: var(--secondary-color, #0a73c4);
    transform: scale(1.05);
}

.chat-send-circle-btn:active {
    transform: scale(0.95);
}

/* Localized photo preview inside the chat message container */
#chat-file-previews {
    max-height: 100px;
    overflow-y: auto;
    width: 100%;
    padding: 10px 0 0;
}

#chat-file-previews .preview-img-wrapper {
    position: relative;
    display: inline-block;
}

#chat-file-previews .preview-img-wrapper img {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 8px;
    border: 1px solid #ddd;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

#chat-file-previews .preview-img-wrapper .remove-preview-btn {
    position: absolute;
    top: -6px;
    right: -6px;
    background-color: #ff3366;
    color: white;
    border: none;
    border-radius: 50%;
    width: 18px;
    height: 18px;
    font-size: 10px;
    line-height: 18px;
    text-align: center;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
    padding: 0;
}

#chat-file-previews .preview-img-wrapper .remove-preview-btn:hover {
    background-color: #e60040;
}