#twxchat-container input[disabled] {
	background-color: #f0f0f0;
	color: #888;
}
#twxchat-container button[disabled] {
	background-color: #ccc;
	color: #666;
	cursor: not-allowed !important;
}
		
#twx-chat-minimized {
    position: fixed;
    bottom: 0;
    right: 0;
    background: #fff;
    border: 1px solid #ccc;
    padding: 10px;
    width: auto;
    display: flex; 
    flex-direction: column; 
    align-items: center;
    justify-content: space-between;
    z-index: 9998;
    cursor: pointer;
}

/* **************** Avatar ************* */

#twx-chat-avatar-container {
    position: relative; /* This makes the container the reference point for absolute positioning */
}

/* minimized floating avatar image */
#twx-chat-avatar-img-min {
    width: 80px; /* Adjust size as needed */
    height: auto;
    border-radius: 50%; /* Makes the avatar circular */
    margin-bottom: 10px; /* Adds spacing below the avatar */
}

/* maximized floating avatar image */
#twx-chat-avatar-img-max {
    width: 120px; /* Adjust size as needed */
    height: auto;
    border-radius: 50%; /* Makes the avatar circular */
    margin-bottom: 10px; /* Adds spacing below the avatar */
    margin-left: 50px; /* Adds space from the min button to the left */
}

/* embedded avatar image */
#twx-chat-avatar-img-embed {
    display: block; /* Treat the image as a block element */
    margin: 0 auto; /* Centers the image horizontally */
    max-width: 100%; /* Prevents overflow */
    width: 400px;
    height: auto; /* Maintains image proportions */
    border-radius: 50%; /* Makes the avatar circular */
}

/* Load screen overlay */
#twx-chat-avatar-load-screen {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    /* position: absolute; Position the loading screen absolutely within the container */
    top: 0;
    left: 0;
    /* background-color: rgba(0, 0, 0, 0.5); Transparent black background */
    z-index: 9999; /* Ensure the load screen is above the canvas */
}

/* Spinning loading circle */
#twx-chat-avatar-loading {
    border: 16px solid #3498db38;
    border-radius: 50%;
    border-top: 16px solid #3498db;
    width: 120px;
    height: 120px;
    animation: spin 2s linear infinite;
    
    /* Center the loading circle on top of the image */
    position: absolute; /* Position the spinner absolutely within the load screen */
    top: 40%; /* Move it vertically to the center */
    left: 40%; /* Move it horizontally to the center */
    /* transform: translate(-50%, -50%); Adjust by 50% of its size to center it perfectly */
}

@-webkit-keyframes spin {
    0% {
      -webkit-transform: rotate(0deg);
    }
    100% {
      -webkit-transform: rotate(360deg);
    }
}

@keyframes spin {
    0% {
      transform: rotate(0deg);
    }
    100% {
      transform: rotate(360deg);
    }
}

/* talking avatar scene canvas */
#twx-chat-avatar-scene {
    display: block;
    margin: 0 auto;
    max-width: 100%;
    /* height: 800px; */
    width: 100%;
    z-index: 1; /* Ensure the canvas is beneath the loading screen */
}

#twx-chat-minimized .chatbot-greeting {
    font-size: 18px;
    margin-right: 10px;
}

.chat-toggle-button {
    /* background: #0073aa; */
    color: #fff;
    border: none;
    padding: 5px 10px;
    font-size: 16px;
    cursor: pointer;
    border-radius: 3px;
    height: 40px;
}

#minimize-chatbot {
    margin-top: 5px;
}

#twx-chat-floating {
    border: 1px solid #ccc;
    padding-left: 10px;
    padding-right: 10px;
    padding-bottom: 10px;
    width: 350px;
    height: 75vh; /* 450px; */
    overflow-y: scroll;
    position: fixed;
    bottom: 0;
    right: 0;
    background: #fff;
    z-index: 9999;
}

#twx-chat-floating .send-button {
    display: none; /* Hide Send button to allow better fit during floating - user can press enter to trigger Send */
}

#twx-chat-floating-header {
    position: sticky;
    top: 0;
    background-color: white;
    z-index: 10;
    /* padding: 10px; */
    border-bottom: 1px solid #ddd;
}

#twx-chat-embed {
    background-color: #f8f9fa;
    border: 1px solid #ced4da;
    border-radius: 5px;
    padding: 10px;
}

/*
#twxchat-container #chatbox-messages {
    height: 90%;
    overflow-y: scroll;
}
*/

#chat-messages-div {
    overflow-y: auto;
}

#twxchat-container #chatbox-input {
    width: 100%;
    padding: 10px;
}

#twxchat-container .chat-messages {
    position: relative;
}

#twxchat-container .user-message {
    text-align: right;
    margin: 5px;
    padding: 5px;
    background: #e0e0e0;
    border-radius: 5px;
}

#twxchat-container .bot-message {
	position: relative;
    text-align: left;
    margin: 5px;
    padding: 5px;
    background: #f0f0f0;
    border-radius: 5px;
    padding-bottom: 40px; 
}

#twxchat-container .bot-greeting {
	position: relative;
    text-align: left;
    margin: 5px;
    padding: 5px;
    background: #f0f0f0;
    border-radius: 5px;
}

#twxchat-container .bot-message .bot-message-play-button, 
#twxchat-container .bot-message .bot-message-pause-button {
    position: absolute;
    /* bottom: 10px; */
    right: 10px;
	/* bottom: 10px; */
    display: inline-block;
    padding: 5px 10px;
    /* color: #fff; */
    /* border: none; */
    /* border-radius: 4px; */
    cursor: pointer;
    /* transition: background-color 0.3s ease; */
    /* margin-top: 10px; */
	background-color: white;
}

#twxchat-container .error-message {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
    padding: 10px;
    border-radius: 4px;
    margin: 10px 0;
}

#twxchat-container .debug-message {
    background-color: #e2e3e5;
    color: #383d41;
    border: 1px solid #d6d8db;
    padding: 10px;
    border-radius: 4px;
    margin: 10px 0;
}

#twxchat-container .bot-message span {
    color: blue; /* Link color */
    text-decoration: underline; /* Underline text */
    cursor: pointer; /* Pointer cursor */
}

#twxchat-container .bot-message span:hover {
    color: red; /* Color on hover */
}

/* Container styles */
#twxchat-container .chatbot-footer {
    display: flex;
    align-items: center;
    padding: 10px;
    background-color: #f9f9f9;
    border-top: 1px solid #ddd;
    box-shadow: 0 -1px 3px rgba(0, 0, 0, 0.1);
}

/* Chat input field styles */
#twxchat-container .chatbot-footer .chat-input {
    flex: 0 0 70%; /* 70% width in wide screen */
    padding: 10px;
    margin-right: 10px; /* Space between input and buttons */
    border: 1px solid #ccc;
    border-radius: 4px;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.1);
    font-size: 14px;
    color: #333;
    max-width: 100%; /* Prevents input from overflowing parent */
}

/* Chat input field placeholder */
#twxchat-container .chatbot-footer .chat-input::placeholder {
    color: #999;
}

/* Send button styles */
#twxchat-container .chatbot-footer .send-button {
    flex: 0 0 80%; /* 80% width in wide screen */
    padding: 10px 20px;
    font-size: 14px;
    font-weight: bold;
    color: #fff;
    /* background-color: #5cb85c; */
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s ease;
    margin-right: 5px; /* Space between Send and Microphone button */
}

#twxchat-container .cancel-stream-button {
    flex: 0 0 45px; /* Fixed width for microphone button */
    padding: 5px;
    cursor: pointer;
    transition: background-color 0.3s ease;
    /* background-color: #5cb85c; */
    border: none;
    border-radius: 4px;
    /* display: flex; */
    align-items: center;
    width: 20px;
}


#twxchat-container .voice-input-button {
    flex: 0 0 45px; /* Fixed width for microphone button */
    padding: 5px;
    cursor: pointer;
    transition: background-color 0.3s ease;
    /* background-color: #5cb85c; */
    border: none;
    border-radius: 4px;
    /* display: flex; */
    align-items: center;
    margin-right: 5px;
}

#twxchat-container .voice-input-button img {
    width: 20px; /* Adjust microphone icon size */
}

#twxchat-container .cancel-voice-input {
    flex: 0 0 80%;
    padding: 10px 20px;
    font-size: 14px;
    font-weight: bold;
    color: #000;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s ease;
    margin: 10px;
}

#twxchat-container .toggle-readresponse {
    flex: 0 0 80%;
    padding: 10px 20px;
    font-size: 14px;
    font-weight: bold;
    color: #fff;
    /* background-color: #5cb85c; */
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s ease;
    margin: 10px;
}

/* Show Bot Message Action button styles */
#twxchat-container .bot-message-action-button {
    display: inline-block;
    padding: 5px 10px;
    font-size: 12px;
    font-weight: bold;
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s ease;
    margin-top: 10px;
    margin-right: 10px;
}

/* Show Feedback button hover styles */
#twxchat-container .bot-message .show-feedback-button:hover {
    /* background-color: #4cae4c; */
}

/* Feedback Container style */
#twxchat-container .feedback-container {
    border: 1px solid #ddd;
    padding: 20px;
    margin-top: 20px;
    background-color: #f9f9f9;
    border-radius: 5px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}

/* Feedback input field styles */
#twxchat-container .feedback-container .feedback-input {
    width: 100%;
    padding: 10px;
    margin-bottom: 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.1);
    font-size: 14px;
    color: #333;
    resize: vertical;
}

/* Feedback input field placeholder */
#twxchat-container .feedback-container .feedback-input::placeholder {
    color: #999;
}

/* Send Feedback button styles */
#twxchat-container .feedback-container .send-feedback-button {
    display: inline-block;
    padding: 10px 20px;
    font-size: 14px;
    font-weight: bold;
    color: #fff;
    /* background-color: #5cb85c; */
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

/* Send Feedback button hover styles */
#twxchat-container .feedback-container .send-feedback-button:hover {
    /* background-color: #4cae4c; */
}

/* Feedback message styles */
#twxchat-container .feedback-container .bot-message {
    margin-top: 10px;
    padding: 10px;
    background-color: #dff0d8;
    border: 1px solid #d6e9c6;
    color: #3c763d;
    border-radius: 4px;
    font-size: 14px;
}

/* Sources container */ 
#twxchat-container .sources-container {
    border: 1px solid #ddd;
    padding: 20px;
    margin-top: 20px;
    background-color: #f9f9f9;
    border-radius: 5px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}

#twxchat-container .sources-container img {
	max-width: 400px;
}

#twxchat-container .product-popup {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 300px;
    padding: 20px;
    background-color: white;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    z-index: 1000;
    display: none;
    border-radius: 10px;
}

#twxchat-container .popup-content {
    text-align: center;
}

#twxchat-container .close-button {
    position: absolute;
    top: 10px;
    right: 10px;
    font-size: 20px;
    cursor: pointer;
}

#productImage {
    max-width: 100%;
    height: auto;
    border-radius: 5px;
}

#productDescription {
    margin: 10px 0;
}

#productPrice {
    color: #28a745;
    font-weight: bold;
}

#productLink {
    display: inline-block;
    margin-top: 10px;
    padding: 10px 20px;
    background-color: #007bff;
    color: white;
    text-decoration: none;
    border-radius: 5px;
}

#productLink:hover {
    background-color: #0056b3;
}

/* CSS for typing indicator */
#twxchat-container .typing-indicator {
    display: flex;
    align-items: center;
    margin-bottom: 10px; /* Adjust margin as needed */
}

#twxchat-container .typing-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: #999; /* Adjust dot color */
    margin-right: 4px; /* Adjust spacing between dots */
    animation: typing 1.5s infinite;
}

#twxchat-container .typing-dot:nth-child(2) {
    animation-delay: 0.5s; /* Delay for the second dot */
}

#twxchat-container .typing-dot:nth-child(3) {
    animation-delay: 1s; /* Delay for the third dot */
}

@keyframes typing {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.5); /* Adjust dot size */
    }
}

#twxchat-container .common-questions {
	margin-top: 20px;
}
#twxchat-container .common-questions h3 {
	margin-bottom: 10px;
}
#twxchat-container .common-questions ul {
	list-style: none;
	padding: 0;
	display: flex;
	flex-wrap: wrap;
	gap: 10px; /* space between buttons */
	justify-content: flex-start; /* Align items to the start (left) */
}
#twxchat-container .common-questions li {
	margin-bottom: 5px;
	/* flex: 1 1 auto; /* Allow items to grow, shrink, and start at auto size */
	/* flex: 0 1 100%; */
	/* display: flex; */
	/* min-width: 200px; /* Set a minimum width to prevent too small buttons */
    /* box-sizing: border-box; /* Includes padding and border in the element's total width and height */
}
#twxchat-container .common-questions button {
	/* background-color: #007bff; */
	/* color: white; */
	border: none;
	padding: 10px 15px;
	cursor: pointer;
	border-radius: 5px;
	/* white-space: nowrap; /* prevents text from breaking within the button */
    overflow: hidden; /* Hide overflow text */
    /* text-overflow: ellipsis; /* Display ellipsis (...) when text overflows */
	max-width: 100%;
}

#twxchat-container .common-questions button:hover {
	/* background-color: #0056b3; */
}

#voice-input-dialog {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.85);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

#twxchat-container .voice-input-dialog-content {
    padding: 20px;
    border-radius: 5px;
    text-align: center;
}

#twxchat-container .voice-input-listening {
    margin-bottom: 170px;
    font-size: 2.5em;
	color: #fff;
    text-align: center;
}

#twxchat-container .voice-input-background-effect {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 50px;
    height: 50px;
    background-color: rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    animation: pulse 2s infinite;
    opacity: 0;
}

@keyframes pulse {
    0% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 0.3;
    }
    50% {
        transform: translate(-50%, -50%) scale(1.2);
        opacity: 0.5;
    }
    100% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 0.3;
    }
}


/* For mobile devices (up to 767px wide) */
@media (max-width: 767px) {
	
	#twxchat-container .common-questions ul {
		margin-left: 6px;
	}
	
    #twxchat-container .chatbot-footer {
        flex-direction: column; /* Stack items vertically in mobile view */
    }
    
    #twxchat-container .chat-input {
        flex: 1; /* Full width in mobile */
        margin-right: 0;
        margin-bottom: 10px; /* Space between input and buttons */
    }
    
    #twxchat-container .footer-buttons {
        display: flex; /* Full width in mobile */
        justify-content: space-between; /* Evenly distribute buttons */
    }
    
    #twxchat-container .send-button {
        flex: 1 0 50%; /* 50% width for Send button in mobile */
        margin-right: 5px; /* Space between Send and Microphone button */
    }	
	
}

/* For larger screens */
@media (min-width: 768px) {
	
    #twxchat-container .chatbot-footer {
        display: flex;
        align-items: center;
        padding: 10px;
        border-top: 1px solid
    }

    #twxchat-container .chatbot-footer .chat-input {
        padding: 10px;
        border: 2px solid;
        border-radius: 5px;
    }
    
    #twxchat-container .footer-buttons {
        display: flex;
        /* margin-left: 10px; */
    }

    #twxchat-container .chatbot-footer .send-button,
    #twxchat-container .chatbot-footer .voice-input-button {
        border: none;
        border-radius: 3px;
        padding: 10px;
        cursor: pointer;

    }
}
		