#chatbot-widget {
    font-family: 'Segoe UI', sans-serif;
    border: 1px solid #ccc;
    padding: 10px;
    background: #fff;
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 300px;
    max-width: 90%; /* ให้กว้างได้ไม่เกิน 90% ของหน้าจอ */
    z-index: 9999;
    transition: all 0.3s ease;
}

#chatbox {
    height: 200px;
    overflow-y: auto;
    margin-bottom: 10px;
    border: 1px solid #ddd;
    padding: 5px;
    background: #f9f9f9;
}

.user-msg {
    text-align: right;
    margin: 5px 0;
    color: rgba(11, 132, 141, 0.411);
    font-weight: bold;
}

.bot-msg {
    text-align: left;
    margin: 5px 0;
    color: rgba(92, 0, 128, 0.541);
}

#chatbot-toggle {
    position: fixed;
    bottom: 20px;
    right: 20px;
    cursor: pointer;
}

/* เพิ่มขนาดไอคอนอีก 20% */
#chatbot-toggle img {
    transform: scale(1.2);
    transition: transform 0.3s ease;
}

/* แสดงข้อความ "ติดต่อสอบถามข้อมูล" แบบสวยๆ */
#chatbot-toggle::after {
    content: " ติดต่อสอบถามข้อมูล";
    font-size: 14px;
    color: #fff;
    background: #0073aa;
    padding: 4px 8px;
    border-radius: 4px;
    margin-left: 10px;
    vertical-align: middle;
    display: inline-block;
}

/* Responsive adjustments สำหรับแท็บเล็ต (หน้าจอไม่เกิน 768px) */
@media (max-width: 768px) {
    #chatbot-widget {
        width: 80%;
        right: 10%;
        bottom: 15px;
    }
}

/* Responsive adjustments สำหรับมือถือ (หน้าจอไม่เกิน 480px) */
@media (max-width: 480px) {
    #chatbot-widget {
        width: 90%;
        right: 5%;
        bottom: 10px;
    }
    /* ซ่อนข้อความ "ติดต่อสอบถามข้อมูล" เมื่อหน้าจอเล็ก */
    #chatbot-toggle::after {
        display: none;
    }
}
