/* Chatbot Icon */
.chatbot-icon {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background-color: var(--primary-color);
    color: white;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
    z-index: 999;
}

.chatbot-icon:hover {
    background-color: #1557b0;
    transform: scale(1.1);
}

/* Add icon size control */
.chatbot-icon i {
    font-size: 24px;
}

/* Chatbot Modal */
.chatbot-modal {
    position: fixed;
    bottom: 80px;
    right: 20px;
    width: 100%;
    max-width: 400px;
    height: 600px;
    background-color: white;
    border-radius: 10px;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.2);
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease, opacity 0.3s ease;
    transform: translateY(0);
    opacity: 1;
    z-index: 1000;
    padding-bottom: 0;
}

.chatbot-modal.hidden {
    transform: translateY(20px);
    opacity: 0;
    pointer-events: none;
}

.chatbot-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 15px;
    background-color: var(--primary-color);
    color: white;
    border-top-left-radius: 10px;
    border-top-right-radius: 10px;
}

.header-buttons {
    display: flex;
    gap: 10px;
    align-items: center;
}

.header-btn {
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    padding: 0.5rem;
    transition: all 0.3s ease;
    font-size: 1.2rem;
}

.header-btn:hover {
    transform: scale(1.1);
    opacity: 0.8;
}

.header-btn.active {
    color: #ffffff;
    opacity: 1;
}

.close-btn {
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
}

.chatbot-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    height: calc(100% - 60px);
    overflow: hidden;
    position: relative;
}

.chat-history {
    flex: 1;
    overflow-y: auto;
    padding: 15px;
    margin-bottom: 0;
    scroll-behavior: smooth;
}

.user-message {
    background-color: var(--primary-color);
    color: white;
    padding: 8px;
    border-radius: 5px;
    margin: 5px 0;
    align-self: flex-end;
}

.ai-message {
    background-color: var(--gray-light);
    color: var(--text-color);
    padding: 12px 15px;
    border-radius: 15px;
    margin: 8px;
    border-bottom-left-radius: 5px;
    max-width: 80%;
    margin-right: auto;
    line-height: 1.5;
}

.ai-message br {
    margin-bottom: 8px;
}

.ai-message strong {
    font-weight: 600;
}

.ai-message em {
    font-style: italic;
}

.ai-message ul {
    margin: 8px 0;
    padding-left: 20px;
}

.ai-message li {
    margin-bottom: 4px;
}

/* Update the input area and send button styles */
.input-area {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
    background: white;
    border-top: 1px solid var(--border-color);
    position: relative;
    bottom: 0;
    width: 100%;
    box-sizing: border-box;
}

.user-input {
    flex: 1;
    height: 40px;
    padding: 8px 12px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    resize: none;
    font-size: 14px;
    line-height: 1.5;
    font-family: inherit;
    box-sizing: border-box;
    margin: 0;
}

.send-btn {
    padding: 8px 16px;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    min-width: 60px;
    height: 40px;
    margin: 0;
}

.send-btn:hover {
    opacity: 0.8;
    transform: translateY(-1px);
}

/* Add this if you want the button to show a pressed state */
.send-btn:active {
    transform: translateY(1px);
}

/* Responsive Design */
@media (max-width: 768px) {
    .chatbot-modal {
        max-width: 90%;
    }
}

/* Add these new styles */
.typing {
    color: #666;
}

.error {
    color: #dc3545;
}

/* Improve message styles */
.user-message, .ai-message {
    max-width: 80%;
    padding: 10px 15px;
    margin: 8px;
    border-radius: 15px;
    word-wrap: break-word;
    overflow-wrap: break-word;
    white-space: pre-wrap;
}

.user-message {
    background-color: var(--primary-color);
    color: white;
    margin-left: auto;
    border-bottom-right-radius: 5px;
}

.ai-message {
    background-color: var(--gray-light);
    color: var(--text-color);
    margin-right: auto;
    border-bottom-left-radius: 5px;
}

/* Add fullscreen styles */
.chatbot-modal.fullscreen {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 100%;
    max-width: none;
    border-radius: 0;
    transform: none;
}

.chatbot-modal.fullscreen .chatbot-header {
    border-radius: 0;
}

/* Update transition for smooth animation */
.chatbot-modal {
    transition: all 0.3s ease;
}

/* Adjust chat history for fullscreen */
.chatbot-modal.fullscreen .chat-history {
    min-height: calc(100vh - 200px);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .chatbot-modal.fullscreen {
        padding: 0;
    }
}

/* Add these styles to your existing chatbot.css */

.status-indicator {
    text-align: center;
    color: #666;
    font-size: 0.875rem;
    padding: 0.5rem;
    min-height: 1.5rem;
}

.typing-indicator {
    display: flex;
    gap: 4px;
    padding: 5px;
}

.typing-indicator span {
    width: 8px;
    height: 8px;
    background: #90909090;
    border-radius: 50%;
    animation: bounce 1.5s infinite;
}

.typing-indicator span:nth-child(2) { animation-delay: 0.2s; }
.typing-indicator span:nth-child(3) { animation-delay: 0.4s; }

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-5px); }
}

/* Add responsive adjustments */
@media (max-width: 480px) {
    .chatbot-modal {
        bottom: 0;
        right: 0;
        width: 100%;
        height: 100%;
        max-width: 100%;
        border-radius: 0;
    }

    .input-area {
        padding: 8px;
        padding-bottom: env(safe-area-inset-bottom, 8px);
    }

    .send-btn {
        padding: 8px 12px;
        min-width: 50px;
    }
} 