.prompt{
	font-weight: bold;
}
.prompt-you{
	color: #448424;
}
.prompt-spargobot{
	color: #000;
}
.chatbox-response{
    border-bottom: 1px solid #ccc;
    padding-bottom: 1rem;
    margin-bottom: 1rem;
}
#ai-chat{
	position: fixed;
	bottom: 20px;
	right: 20px;
	z-index: 99;
	width: 250px;
	min-width: 250px;                                                                                                                                                                                         
	max-width: 600px;                                                                                                                                                                                         
	min-height: 350px;
	max-height: calc(100vh - 40px);
    padding: 4px;
    background-color: #5fb932;
    border-radius: 4px;
    box-shadow: 4px 3px 8px rgba(0, 0, 0, .5);
    resize: both;                                                                                                                                                                                           
	overflow: hidden;
	display: flex;
	flex-direction: column;
}
#chat-window{
	background-color: #fff;
	font-size: 12px;
	line-height: 1.3em;
	flex: 1;
	overflow-y: auto;
	padding: 10px;
	border: 1px solid #ccc;
}
#chat-interaction{
	display: flex;
	flex-wrap: nowrap;
	position: relative;
	flex-shrink: 0;
}
#chat-input{
    padding-right: 5.5rem;
}

#mic-button{
    position: absolute;
    right: 3rem;
    top: 50%;
    transform: translateY(-50%);
    background-color: transparent;
    border: none;
    color: #0073a8;
    font-size: 1.2rem;
    cursor: pointer;
    transition: all .3s;
    padding: 0.25rem;
    border-radius: 50%;
    width: 2rem;
    height: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

#mic-button:hover{
    color: #6ec3ee;
    background-color: rgba(0, 115, 168, 0.1);
}

#mic-button.listening{
    color: #e74c3c;
    animation: listening-pulse 1s infinite;
}

@keyframes listening-pulse {
    0%, 100% {
        transform: translateY(-50%) scale(1);
    }
    50% {
        transform: translateY(-50%) scale(1.1);
    }
}

#chat-send{
	position: absolute;
	right: 0;
    overflow: hidden;
    background-color: transparent;
    color: #0073a8;
    display: flex;
    width: 2.5rem;
    aspect-ratio: 1 / 1;
    line-height: 1em;
    align-items: center;
    justify-content: center;
    transition: all .3s;
    font-size: 1.5rem;
    margin-right: .25rem;
    border: none;
    cursor: pointer;
}
#chat-send:hover{
	color: #6ec3ee;
}
#chat-sent-ask{
    display: block;
    left: 200%;
    position: absolute;
}
#chat-sparkie{
	display: flex;
	background-color: #fff;
    justify-content: center;
    align-items: center;
    gap: 10px;
    padding: 5px;
    padding-top: 10px;
    position: relative;
    flex-shrink: 0;
}

#auto-narrate-toggle{
    position: absolute;
    right: 8px;
    top: 20px;
    transform: translateY(-50%);
    background-color: transparent;
    border: none;
    color: #666;
    font-size: 1rem;
    cursor: pointer;
    transition: all .3s;
    padding: 0.25rem;
    border-radius: 50%;
    width: 1.8rem;
    height: 1.8rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

#auto-narrate-toggle:hover{
    color: #0073a8;
    background-color: rgba(0, 115, 168, 0.1);
}

#auto-narrate-toggle.active{
    color: #5fb932;
    background-color: rgba(95, 185, 50, 0.1);
}
.user-message, .chatbot-response{
	margin-top: 1em;
}

.chatbot-response{
    position: relative;
    padding-right: 30px;
}

.response-content{
    width: 100%;
    word-wrap: break-word;
}

.speak-button{
    position: absolute;
    top: 2px;
    right: 0;
    background-color: transparent;
    border: none;
    color: #666;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all .3s;
    padding: 0.2rem;
    border-radius: 50%;
    width: 1.5rem;
    height: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    display: none;
}

.speak-button:hover{
    color: #0073a8;
    background-color: rgba(0, 115, 168, 0.1);
}

.speak-button.speaking{
    color: #e74c3c;
    animation: speaking-pulse 0.8s infinite;
}

@keyframes speaking-pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.15);
    }
}

.chatbot-response p{
	display: inline;
}

.typing-indicator {
	display: flex;
	align-items: center;
	margin-top: 1em;
}

.typing-indicator .prompt {
	margin-right: 8px;
}

.typing-dots {
	display: flex;
	gap: 4px;
}

.typing-dots span {
	height: 8px;
	width: 8px;
	background-color: #999;
	border-radius: 50%;
	display: inline-block;
	animation: pulse 1.4s ease-in-out infinite both;
}

.typing-dots span:nth-child(1) {
	animation-delay: -0.32s;
}

.typing-dots span:nth-child(2) {
	animation-delay: -0.16s;
}

.typing-dots span:nth-child(3) {
	animation-delay: 0s;
}

@keyframes pulse {
	0%, 80%, 100% {
		transform: scale(0.8);
		opacity: 0.5;
	}
	40% {
		transform: scale(1);
		opacity: 1;
	}
}

/* Mobile chat icon */
#chat-icon-mobile {
	position: fixed;
	bottom: 20px;
	right: 20px;
	z-index: 98;
	width: 60px;
	height: 60px;
	background-color: #5fb932;
	border-radius: 50%;
	display: none;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	box-shadow: 4px 3px 8px rgba(0, 0, 0, .5);
	transition: all 0.3s ease;
}

#chat-icon-mobile:hover {
	background-color: #4a9428;
	transform: scale(1.05);
}

#chat-icon-mobile i {
	color: white;
	font-size: 24px;
}

/* Mobile minimize button */
#mobile-minimize {
	position: absolute;
	top: 8px;
	left: 8px;
	background-color: transparent;
	border: none;
	color: #666;
	font-size: 1rem;
	cursor: pointer;
	transition: all .3s;
	padding: 0.25rem;
	border-radius: 50%;
	width: 1.8rem;
	height: 1.8rem;
	display: none;
	align-items: center;
	justify-content: center;
	z-index: 101;
}

#mobile-minimize:hover {
	color: #333;
	background-color: rgba(0, 0, 0, 0.1);
}

/* Mobile responsive styles */
@media (max-width: 1024px) {
	#ai-chat {
		display: none;
	}
	
	#ai-chat.mobile-open {
		display: flex;
		width: calc(100vw - 40px);
		height: calc(100vh - 40px);
		max-width: none;
		max-height: none;
		top: 20px;
		left: 20px;
		right: auto;
		bottom: auto;
	}
	
	#chat-icon-mobile {
		display: flex;
	}
	
	#ai-chat.mobile-open #mobile-minimize {
		display: flex;
	}
}