﻿/* 聊天窗口容器 */
.chat-widget {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 330px;
    height: 500px;
    border: 1.5px solid rgba(0, 0, 0, 0.5);
    border-radius: 5px 5px 0px 0px;
    background-color: #fff;
    font-family: Arial, sans-serif;
    box-shadow: 0px 0px 50px rgba(0, 0, 0, 0.5);
}

/* 聊天窗口標題欄 */
.chat-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 40px;
    padding: 0 10px;
    border-radius: 5px 5px 0px 0px;
    background-color: #f6f7f9;
    border-bottom: 1px solid #ccc;
}

.chat-title {
    font-size: 16px;
    font-weight: bold;
}

.chat-close {
    cursor: pointer;
    font-size: 24px;
    font-weight: bold;
    color: #666;
}

    .chat-close:hover {
        color: #000;
    }

/* 聊天窗口內容區 */
.chat-body {
    height: 380px;
    padding: 10px;
    overflow-y: auto;
}

.chat-message {
    margin-bottom: 10px;
}

    .chat-message.incoming .chat-message-content {
        width: fit-content;
        background-color: #f6f7f9;
        border: 1px solid #ccc;
        border-radius: 5px;
        padding: 5px;
    }

    .chat-message.incoming .chat-message-content-help {
        width: 33%;
        background-color: #FBDA93;
        border: 1px solid #ccc;
        border-radius: 15px;
        padding: 0px;
        font-size: 12px;
        text-align: center;
    }

        .chat-message.incoming .chat-message-content-help .chat-message-content-help-title {
            border: 0.5px solid #303030;
            padding: 5px;
            border-radius: 15px 15px 0px 0px;
        }

        .chat-message.incoming .chat-message-content-help .chat-message-content-help-member {
            background-color: #FDEDC9;
            border: 0.5px solid #303030;
            cursor: pointer;
            padding: 5px;
        }

            .chat-message.incoming .chat-message-content-help .chat-message-content-help-member:hover {
                background-color: #F8BD35;
            }

        .chat-message.incoming .chat-message-content-help .chat-message-content-help-member-bottom {
            background-color: #FBDA93;
            border: 0.5px solid #303030;
            padding: 5px;
            border-radius: 0px 0px 15px 15px;
        }

    .chat-message.outgoing .chat-message-content {
        width: fit-content;
        margin-left: auto;
        background-color: #d5e5ff;
        border: 1px solid #b8d0ff;
        border-radius: 5px;
        padding: 5px;
    }

.message-time-C {
    margin: 50% 0px 0px 83%;
    font-size: 10px;
}

.message-time-S {
    font-size: 10px;
    margin: 50% 0px 0px 1%;
}

.chat-message-content {
    word-wrap: break-word; /* 斷行處理 */
    word-break: break-all; /* 斷詞處理 */
}

    .chat-message-content p {
        margin: 0;
        padding: 0;
        font-size: 14px;
    }

/* 聊天窗口輸入區 */
.chat-footer {
    display: flex;
    align-items: center;
    height: 60px;
    padding: 0 10px;
    border-top: 1px solid #ccc;
}

.chat-input {
    flex: 1;
    height: 30px;
    padding: 5px;
    border: 1px solid #ccc;
    border-radius: 5px;
    font-size: 14px;
}

.chat-send {
    margin-left: 10px;
    height: 30px;
    padding: 5px 10px;
    background-color: #4CAF50;
    color: #fff;
    border: none;
    border-radius: 5px;
    font-size: 14px;
    cursor: pointer;
}

    .chat-send:hover {
        background-color: #3e8e41;
    }


.chat-button {
    font-size:30px;
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 9999;
    cursor: pointer;
}

    .chat-button:hover {
        background-color: aqua;
    }

.dialog {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 330px;
    height: 500px;
    z-index: 9999;
    transform: scale(1.25); /* 將大小增加25% */
    display: none;
}

    .dialog > .close {
        position: absolute;
        top: 0px;
        right: 0px;
        cursor: pointer; /*cursor游標pointer指針:改變鼠標*/
    }
