﻿#chat-box {
    position: fixed;
    bottom: 140px;
    right: 20px;
    background: #fff;
    border: 1px solid #ccc;
    border-radius: 8px;
    box-shadow: 0 0 10px rgb(0 0 0 / .1);
    font-family: sans-serif;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    transition: all 0.3s ease;
}

@media screen and (min-width:768px) {
    #chat-box {
        bottom: 3px;
    }
}

#chat-box.minimized {
    width: 150px;
    height: 40px;
    overflow: hidden;
    cursor: pointer;
    font-size: 16px
}

#chat-box:not(.minimized) {
    width: 100%;
    height: 500px;
    overflow: visible;
    cursor: default;
    right: 0
}

#chat-header {
    background: #232a6a;
    color: #fff;
    font-size: 14px;
    padding: 10px;
    font-weight: 700;
    position: relative;
    user-select: none;
    display: flex;
    justify-content: space-between;
    align-items: center
}

#chat-toggle-btn {
    background: #fff0;
    border: none;
    color: #fff;
    font-size: 20px;
    cursor: pointer;
    line-height: 1;
    padding: 0 6px
}

    #chat-toggle-btn:hover {
        color: #ccc
    }

#chat-body {
    flex: 1;
    display: flex;
    overflow: hidden
}

.chat-left {
    width: 40%;
    border-right: 1px solid #eee;
    background: #f8f8f8;
    overflow-y: auto;
    padding: 10px
}

.chat-right {
    width: 60%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    background: #fff;
    padding: 10px
}

#conversation-detail {
    flex: 1;
    overflow-y: auto;
    margin-bottom: 10px;
    font-size: 14px
}

#message-input {
    width: 100%;
    padding: 10px;
    border: none;
    border-radius: 4px;
    outline: none;
    background: #f1f1f1;
    font-size: 14px;
    margin-right: 5px
}

.conversation-item {
    display: flex;
    gap: 10px;
    padding: 10px 12px;
    border-bottom: 1px solid #e0e0e0;
    background-color: #fffffe;
    box-shadow: 4px 6px 13px rgba(215, 215, 215, 0.25);
    border-radius: 8px;
    cursor: pointer;
    align-items: center;
    transition: background-color 0.2s ease;
    border-radius: 6px;
    margin-bottom: 4px
}

    .conversation-item:hover {
        background-color: #e6f0ff
    }

    .conversation-item.active {
        background-color: #cde4ff;
        font-weight: 600;
        box-shadow: inset 3px 0 0 #232a6a
    }

    .conversation-item img {
        width: 50px;
        height: 50px;
        border-radius: 6px;
        object-fit: cover;
        flex-shrink: 0
    }

    .conversation-item .conversation-info {
        flex: 1;
        display: flex;
        flex-direction: column;
        gap: 4px;
        overflow: hidden
    }

        .conversation-item .conversation-info .sender-name {
            font-weight: 600;
            color: #333;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis
        }

        .conversation-item .conversation-info .title {
            color: #555;
            font-size: 14px;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis
        }

        .conversation-item .conversation-info .last-date {
            font-size: 12px;
            color: #999;
            white-space: nowrap
        }

    .conversation-item.fw-bold {
        font-weight: 700;
        background: #eef8ff
    }

.product-btn {
    color: #ffffff;
    background-color: #888888 !important;
    border: none;
    font-size: 12px;
    font-weight: 500;
}

    .product-btn:hover {
        background-color: #f9401b !important;
    }

@media screen and (min-width: 768px) {
    .product-btn {
        font-size: 14px;
    }

    #chat-header {
        font-size: 16px;
    }


    #chat-box:not(.minimized) {
        width: 650px;
    }
}

.chat-section-info {
    background-color: #414141 !important;
}

.chat-send-btn {
    background-color: #232a6a;
    font-size: 14px;
    color: #ffffff;
    font-weight: 500;
    border-radius: 8px;
}
