.chatbot-button {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 70px;
    height: 70px;
    background: red;
    /* background: linear-gradient(135deg, #4a6bff, #8e54e9); */
    background: #9B6B34;
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.2);
    z-index: 1000;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    border: none;
    outline: none;
    will-change: transform, opacity;
}

#chatIcon,
#closeIcon {
    position: absolute;
    transition: all 0.3s ease;
}

#chatIcon {
    font-size: 28px;
}

#closeIcon {
    font-size: 32px;
    opacity: 0;
    transform: rotate(90deg);
}

.chatbot-button.active #chatIcon {
    opacity: 0;
    transform: rotate(-90deg);
}

.chatbot-button.active #closeIcon {
    opacity: 1;
    transform: rotate(0deg);
}

.chatbot-button:hover {
    transform: scale(1.1);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

.chatbot-button.active {
    background: #9B6B34;
    transform: scale(1.1);
}

#general-guidance {
    background: #9B6B34;
}

#general-guidance p {
    font-size: 8px;
    text-align: center;
    color: #fff;
}


/* Pulse animation */
.pulse-animation {
    position: absolute;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.6);
    border-radius: 50%;
    animation: pulse-ring 2s infinite;
    opacity: 0;
    z-index: 1;
}

@keyframes pulse-ring {
    0% {
        transform: scale(0.8);
        opacity: 1;
    }

    70%,
    100% {
        transform: scale(1.3);
        opacity: 0;
    }
}
#headerCloseButton {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s;
}

/* Chatbot Modal */
.chatbot-modal {
    position: fixed;
    bottom: 110px;
    right: 30px;
    width: 380px;
    max-width: calc(100% - 60px);
    height: 550px;
    max-height: 80vh;
    background: white;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    display: none;
    flex-direction: column;
    z-index: 1001;
    overflow: hidden;
    border: 1px solid rgba(0, 0, 0, 0.08);
    will-change: transform, opacity;
}

.chatbot-modal.show {
    display: flex;
    animation: slideUp 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Modal content */
.chatbot-modal-content {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.chatbot-modal-header {
    padding: 10px 20px;
    background: #9B6B34;
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.chatbot-modal-header h5 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Voice Controls */
.voice-controls {
    display: flex;
    gap: 12px;
    align-items: center;
}

.voice-btn {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s;
}

.voice-btn:hover {
    /* background: rgba(255, 255, 255, 0.3); */
     background: #9B6B34;
}

.voice-btn.listening {
    background: #9B6B34;
    animation: pulse 1.5s infinite;
}

/* Chat Body */
.chatbot-modal-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 0;
    overflow: hidden;
    background: #f9f9f9;
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    background-image: url('../assets/images/ai-girl.jpeg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}


/* Message Bubbles */
.bot-message,
.user-message {
    margin: 0;
    padding: 12px 16px;
    border-radius: 18px;
    max-width: 80%;
    word-wrap: break-word;
    line-height: 1.4;
    position: relative;
    animation: messageFadeIn 0.3s ease-out;
}

@keyframes messageFadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.bot-message {
    background: white;
    align-self: flex-start;
    border-bottom-left-radius: 4px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.user-message {
    /* background: linear-gradient(135deg, #4a6bff, #8e54e9); */
    background: #9B6B34;
    color: white;
    align-self: flex-end;
    border-bottom-right-radius: 4px;
}

/* Input Area */
.chat-input {
    display: flex;
    gap: 5px;
    padding: 15px;
    background: white;
    border-top: 1px solid rgba(0, 0, 0, 0.08);
}

.chat-input input {
    flex: 1;
    padding: 12px 16px;
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 24px;
    outline: none;
    font-size: 14px;
    transition: all 0.3s;
}

.chat-input input:focus {
    /* border-color: #4a6bff; */
    border-color: #9B6B34;
    box-shadow: 0 0 0 3px rgba(74, 107, 255, 0.2);
}

.chat-input button {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: none;
    /* background: linear-gradient(135deg, #4a6bff, #8e54e9); */
    background: #9B6B34;
    color: white;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.chat-input button:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 8px rgba(74, 107, 255, 0.3);
}

/* Typing Indicator */
.typing-indicator {
    display: inline-block;
    padding: 12px 16px;
    background: white;
    border-radius: 18px;
    border-bottom-left-radius: 4px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(0, 0, 0, 0.05);
    align-self: flex-start;
}

.typing-indicator span {
    height: 8px;
    width: 8px;
    background: #666;
    border-radius: 50%;
    display: inline-block;
    margin: 0 3px;
    animation: typing-bounce 1.4s infinite ease-in-out;
}

@keyframes typing-bounce {

    0%,
    60%,
    100% {
        transform: translateY(0);
    }

    30% {
        transform: translateY(-5px);
    }
}

/* Scrollbar Styling */
.chat-messages::-webkit-scrollbar {
    width: 6px;
}

.chat-messages::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.05);
}

.chat-messages::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.1);
    border-radius: 3px;
}

.chat-messages::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 0, 0, 0.2);
}

.bot-option-btn {
    background-color: #9B6B34;
    color: white;
    border: none;
    border-radius: 20px;
    padding: 8px 16px;
    margin-top: 8px;
    cursor: pointer;
    /* transition: background 0.3s; */
}
.bot-option-btn:hover {
    background-color: #7f5528;
}


/* latest update */
.close-btn {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s;
}

.close-btn:hover {
    background: rgba(255, 255, 255, 0.3);
}