/* Chatbot Toggle Button */
.chatbot-toggle {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    background-color: var(--primary-color, #2c3e50);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    z-index: 9999;
    transition: transform 0.3s ease, background-color 0.3s ease;
    border: none;
}

.chatbot-toggle:hover {
    transform: scale(1.1);
    background-color: var(--accent-color, #27ae60);
}

/* Chatbot Container */
.chatbot-container {
    position: fixed;
    bottom: 100px;
    right: 30px;
    width: 350px;
    height: 450px;
    background-color: #fff;
    border-radius: 12px;
    box-shadow: 0 5px 25px rgba(0, 0, 0, 0.15);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    z-index: 9999;
    opacity: 0;
    pointer-events: none;
    transform: translateY(20px);
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    font-family: 'Outfit', sans-serif;
    border: 1px solid #f0f0f0;
}

.chatbot-container.active {
    opacity: 1;
    pointer-events: all;
    transform: translateY(0);
}

/* Chat Header */
.chatbot-header {
    background-color: var(--primary-color, #2c3e50);
    color: #fff;
    padding: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.chatbot-header h3 {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 600;
}

.chatbot-close {
    background: none;
    border: none;
    color: #fff;
    font-size: 20px;
    cursor: pointer;
}

/* Message Area */
.chatbot-messages {
    flex: 1;
    padding: 15px;
    overflow-y: auto;
    background-color: #f9f9f9;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.chat-message {
    max-width: 80%;
    padding: 10px 14px;
    border-radius: 12px;
    font-size: 0.9rem;
    line-height: 1.4;
    word-wrap: break-word;
}

.chat-message.bot {
    align-self: flex-start;
    background-color: #e8f5e9;
    color: #333;
    border-bottom-left-radius: 2px;
    border: 1px solid #c8e6c9;
}

.chat-message.user {
    align-self: flex-end;
    background-color: var(--accent-color, #27ae60);
    color: #fff;
    border-bottom-right-radius: 2px;
}

/* Typing Indicator */
.typing-indicator span {
    display: inline-block;
    width: 6px;
    height: 6px;
    background-color: #999;
    border-radius: 50%;
    margin: 0 2px;
    animation: typing 1.4s infinite ease-in-out both;
}

.typing-indicator span:nth-child(1) {
    animation-delay: -0.32s;
}

.typing-indicator span:nth-child(2) {
    animation-delay: -0.16s;
}

@keyframes typing {

    0%,
    80%,
    100% {
        transform: scale(0);
    }

    40% {
        transform: scale(1);
    }
}

/* Input Area */
.chatbot-input-area {
    padding: 10px;
    border-top: 1px solid #eee;
    background-color: #fff;
    display: flex;
    gap: 10px;
}

.chatbot-input-area input {
    flex: 1;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 20px;
    outline: none;
    font-family: inherit;
    font-size: 0.9rem;
}

.chatbot-input-area input:focus {
    border-color: var(--accent-color, #27ae60);
}

.chatbot-input-area button {
    background-color: var(--accent-color, #27ae60);
    color: #fff;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s;
}

.chatbot-input-area button:hover {
    background-color: #219150;
}

/* Response for mobile */
@media (max-width: 480px) {
    .chatbot-container {
        width: 100%;
        height: 100%;
        bottom: 0;
        right: 0;
        border-radius: 0;
    }
}