#ai-chat-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 9999;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

#ai-chat-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background-image: url('https://datto-webworks.com/wp-content/uploads/2025/08/8943377.png');
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    cursor: pointer;
    box-shadow: 0 6px 15px rgba(38, 50, 93, 0.4);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    background-color: #e5a6ee;
    background-size: 65%;
    background-repeat: no-repeat;
    background-position: center;
}

#ai-chat-icon:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 20px rgba(38, 50, 93, 0.6);
}

#ai-chat-box {
    width: 380px;
    height: 500px;
    position: fixed;
    bottom: 90px;
    right: 20px;
    background-color: #fff;
    border-radius: 12px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    animation: fadeIn 0.3s ease-out;
}

#ai-chat-header {
    background-image: linear-gradient(to right, #e8a3ea, #d575f0);
    color: white;
    padding: 15px 20px;
    font-size: 18px;
    font-weight: bold;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

#ai-chat-close-btn {
    font-size: 24px;
    cursor: pointer;
    line-height: 1;
}

#ai-chat-body {
    flex-grow: 1;
    padding: 20px;
    overflow-y: auto;
    background-color: #f0f2f5;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

#ai-chat-footer {
    display: flex;
    padding: 10px;
    border-top: 1px solid #ddd;
    background-color: #fff;
}

#ai-chat-input {
	width: 100%;
    flex-grow: 1;
    border: 1px solid #ccc;
    border-radius: 20px;
    padding: 10px 15px;
    margin-right: 10px;
    font-size: 14px;
    transition: border-color 0.3s;
}
#ai-chat-input:focus {
    outline: none;
    border-color: #eec6f0;
}

#ai-chat-send {
    background-image: linear-gradient(to right, #cf9ae1, #e87fbf);
    color: white;
    border: none;
    border-radius: 20px;
    padding: 10px 20px;
    cursor: pointer;
    font-size: 14px;
    transition: background-image 0.2s ease, transform 0.2s ease;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

#ai-chat-send:hover {
    background-color: #17349f;
    transform: translateY(-1px);
}

.chat-message {
    padding: 12px 18px;
    border-radius: 20px;
    max-width: 85%;
    word-wrap: break-word;
    font-size: 15px;
    line-height: 1.5;
}

.user-message {
    background-color: #3f5ac6;
    color: white;
    margin-left: auto;
    border-bottom-right-radius: 5px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
	max-width: max-content;
}

.bot-message-wrapper {
    display: flex;
    align-items: flex-start;
    margin-right: auto;
}

.bot-avatar {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    margin-right: 10px;
    background-color: #e0e0e0;
    background-image: url('https://datto-webworks.com/wp-content/uploads/2025/08/logo_footer1.png');
    background-size: cover;
    background-position: center;
    flex-shrink: 0;
}

.bot-message {
	padding: 12px 18px;
	border-radius: 20px;
	max-width: 85%;
	word-wrap: break-word;
	font-size: 15px;
	line-height: 1.5;
	background-color: #e0e4e8;
	color: #333;
	border-bottom-left-radius: 5px;
}

#ai-chat-welcome-message {
    position: fixed;
    bottom: 90px;
    right: 20px;
    background-image: linear-gradient(to right, #be8ddb, #d188e5);
    color: white;
    padding: 10px 15px;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    max-width: 300px;
    opacity: 0;
    transition: opacity 1s ease-in-out;
}

#ai-chat-welcome-message p {
    margin: 0;
    font-size: 14px;
    line-height: 1.5;
}

/* --- Live Chat UI Changes --- */
.session-row.active {
    background-color: #e6f7ff;
    border-color: #26325d;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}
#session-title { 
    background-color: #26325d; 
    color: white; 
    padding: 15px; 
    margin: 0; 
    border-top-left-radius: 8px; 
    border-top-right-radius: 8px; 
    font-size: 20px;
}
#admin-chat-send {
    background-color: #3c56b3;
    color: white;
    border: none;
    border-radius: 20px;
    padding: 10px 20px;
    cursor: pointer;
    font-size: 15px;
    transition: background-color 0.2s ease;
}
#admin-chat-send:hover {
    background-color: #556fd0;
}
.admin-message {
    background-color: #26325d;
    color: white;
    margin-left: auto;
    border-bottom-right-radius: 5px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

/* Live Chat Styles */
#ai-chat-header.live-chat-mode {
    background: linear-gradient(to right, #f75d66, #e77070);
}
#ai-chat-footer #input-container {
    position: relative;
    flex: 1;
    margin-right: 5px;
}

#ai-chat-footer #live-chat-btn {
	position: absolute;
	right: 8px;
	top: 50%;
	transform: translateY(-50%);
	background-color: #d77171;
	color: white;
	border: none;
	border-radius: 9px;
	padding: 2px 4px 4px 4px;;
	font-size: 12px;
	font-weight: bold;
	cursor: pointer;
	transition: background-color 0.3s ease;
}

#ai-chat-footer #live-chat-btn:hover {
    background-color: #e85370;
}






@media (min-width: 500px) {
#ai-chat-box {
    width: 480px;
    height: 600px;
    position: fixed;
}
}

@media (max-width: 400px) {
#ai-chat-box {
	width: 300px;
	height: 480px;
	bottom: 65px;
}
#ai-chat-input {
	width: 100%;
}
#ai-chat-icon {
	width: 50px;
	height: 50px;
	margin-bottom: -10px;
}
#ai-chat-welcome-message {
	bottom: 65px;
}
.bot-avatar{
	margin-left: -10px;
}
}