﻿/* Basic container styling */
/*#chat-container {
    width: 100%;
    max-width: 600px;
    margin: 0 auto;
    border: 1px solid #ddd;
    border-radius: 5px;
    padding: 15px;
    background-color: #f9f9f9;
}

#chat-messages {
    max-height: 400px;
    overflow-y: auto;
    padding-bottom: 10px;
}*/

/* Styling for user and customer service messages */
/*.message {
    display: flex;
    flex-direction: column;*/ /* Stack label and message */
    /*margin: 10px 0;
    opacity: 0;
    animation: fadeIn 0.5s forwards;
}

    .message.user {
        align-items: flex-end;*/ /* Right align for user */
    /*}

    .message.customer {
        align-items: flex-start;*/ /* Left align for customer */
    /*}*/

/* Bubble styling */
/*.bubble {
    max-width: 70%;
    padding: 10px;
    border-radius: 10px;
    position: relative;
    font-size: 14px;
    line-height: 1.4;
    display: flex;
    align-items: center;
}

    .bubble.user {
        background-color: #007bff;
        color: #fff;
        border-top-right-radius: 0;
    }

    .bubble.customer {
        background-color: #e1e1e1;
        color: #333;
        border-top-left-radius: 0;
    }*/

        /* Styling buttons for menu options */
        /*.bubble.customer button {
            display: inline-block;
            margin-right: 10px;
        }*/

/* Fade-in animation */
/*@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}*/

/* Input area styling */
/*#chat-input-container {
    display: flex;
    align-items: center;
    margin-top: 10px;
}

#chat-input {
    flex: 1;
    padding: 10px;
    font-size: 16px;
    border: 1px solid #ddd;
    border-radius: 5px;
    margin-right: 10px;
}

    #chat-input:focus {
        outline: none;
        border-color: #007bff;
    }

button {
    padding: 10px 15px;
    font-size: 16px;
    border: none;
    border-radius: 5px;
    background-color: #007bff;
    color: #fff;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

    button:hover {
        background-color: #0056b3;
    }

.time-label {
    font-size: 0.8em;
    color: gray;
    margin-bottom: 5px;
    text-align: right;
}*/


/* 外框 */
#chat-container {
    width: 100%;
    max-width: 100%;
    margin: 0 auto;
    padding: 12px;
    box-sizing: border-box;
    font-family: "Microsoft JhengHei",system-ui,Segoe UI,Roboto,Arial,sans-serif;
}

#chat-messages {
    background: #f7f7f8;
    border-radius: 16px;
    padding: 12px;
    height: 420px;
    overflow: auto; /* 只保留最外層的卷軸 */
    scrollbar-gutter: stable;
}

.row {
    display: flex;
    gap: 10px;
    margin: 6px 0;
    align-items: flex-start;
}

.bubble {
    border-radius: 12px;
    padding: 10px 12px;
    max-width: 74%;
    box-shadow: 0 1px 0 rgba(0,0,0,.06);
    line-height: 1.5;
    font-size: 14px;
    background: #fff;
    color: #111827;
}

.row.user {
    justify-content: flex-end;
}

    .row.user .bubble {
        background: #16a34a;
        color: #fff;
    }

.row.bot .thumb {
    width: 106px;
    height: 150px;
    border-radius: 10px;
    object-fit: cover;
    flex: 0 0 auto;
    box-shadow: 0 1px 0 rgba(0,0,0,.06);
}

/* === 水平美化菜單（放在紅框位置） === */
.menu-wrap {
    margin-top: 8px;
    background: transparent; /* 讓它看起來像在「紅框」內 */
}

.menu-scroller {
    display: flex;
    gap: 8px;
    align-items: center;
    overflow-x: auto;
    overflow-y: hidden; /* 只允許左右滑，避免內層卷軸直向出現 */
    padding: 4px 2px 2px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none; /* 隱藏水平捲軸 */
}

    .menu-scroller::-webkit-scrollbar {
        display: none;
    }

.menu-pill {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border: 1px solid rgba(0,0,0,.08);
    background: #ffffff;
    padding: 10px 14px;
    border-radius: 999px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    user-select: none;
    transition: transform .08s ease, box-shadow .12s ease, background .12s ease;
    box-shadow: 0 2px 0 rgba(0,0,0,.05);
}

    .menu-pill:hover {
        transform: translateY(-1px);
        box-shadow: 0 6px 12px rgba(0,0,0,.08);
    }

    .menu-pill:active {
        transform: translateY(0);
        box-shadow: 0 2px 0 rgba(0,0,0,.05);
    }

    .menu-pill i {
        opacity: .85;
    }

    .menu-pill .k {
        display: inline-flex;
        width: 22px;
        height: 22px;
        border-radius: 6px;
        align-items: center;
        justify-content: center;
        font-size: 12px;
        font-weight: 700;
        background: #0ea5e9;
        color: #fff;
    }

/* 輸入區 */
#chat-input-container {
    display: flex;
    gap: 8px;
    margin-top: 10px;
}

#chat-input {
    flex: 1;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 10px 12px;
    font-size: 14px;
}

.send-btn {
    border: 0;
    border-radius: 10px;
    padding: 0 14px;
    background: #0ea5e9;
    color: #fff;
    font-weight: 700;
}



/* 連結按鈕 */
.link-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    border-radius: 999px;
    background: #0ea5e9;
    color: #fff;
    text-decoration: none;
    font-weight: 700;
    box-shadow: 0 2px 0 rgba(0,0,0,.06);
    transition: transform .08s ease, box-shadow .12s ease, background .12s ease;
}

    .link-btn:hover {
        transform: translateY(-1px);
        box-shadow: 0 6px 12px rgba(0,0,0,.1);
    }

    .link-btn:active {
        transform: translateY(0);
        box-shadow: 0 2px 0 rgba(0,0,0,.06);
    }