/* AI Chat Styles */
.chat-container {
    display: flex;
    flex-direction: column;
    height: 500px;
    max-height: 70vh;
}

.chat-messages {
    display: flex;
    flex-direction: column; /* Show oldest at top, newest at bottom */
    flex: 1;
    overflow-y: auto;
    padding: 0.75rem;
    background-color: #343a40;
}

.message {
    margin-bottom: 1rem;
    padding: 0.75rem 1rem;
    border-radius: 0.5rem;
    max-width: 85%;
    word-wrap: break-word;
}

.message-user {
    align-self: flex-end;
    margin-left: auto;
    background-color: #0d6efd;
    color: white;
}

.message-bot {
    align-self: flex-start;
    background-color: #343a40;
    color: white;
}

/* Typing indicator */
.typing-indicator-container {
    background-color: transparent;
    padding: 0;
}

.typing-indicator {
    display: inline-flex;
    align-items: center;
    background-color: #343a40;
    padding: 0.75rem 1rem;
    border-radius: 1rem;
}

.typing-indicator span {
    height: 8px;
    width: 8px;
    margin: 0 2px;
    background-color: #bbb;
    border-radius: 50%;
    display: inline-block;
    animation: typing 1.4s infinite ease-in-out both;
}

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

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

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

@keyframes typing {
    0% { transform: scale(1); opacity: 0.4; }
    20% { transform: scale(1.3); opacity: 1; }
    40% { transform: scale(1); opacity: 0.4; }
    100% { transform: scale(1); opacity: 0.4; }
}

/* Floating OTP Extraction button (blue) */
.ai-chat-bubble {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 1050;
}

.ai-chat-bubble button {
    width: 60px;
    height: 60px;
    background-color: #0d6efd !important; /* Blue color */
    color: white;
    box-shadow: 0 0 15px rgba(13, 110, 253, 0.7);
}

/* Pulse animation for OTP button */
.pulse-animation {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(13, 110, 253, 0.7);
    }
    70% {
        box-shadow: 0 0 0 15px rgba(13, 110, 253, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(13, 110, 253, 0);
    }
}

/* Chat button */
.chat-fab-button {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background-color: #0d6efd;
    color: white;
    border: none;
    font-size: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
    cursor: pointer;
    z-index: 1050;
    transition: all 0.3s ease;
}

.chat-fab-button:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.4);
}

/* Add a bit of animation to make the button more noticeable */
@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(13, 110, 253, 0.7);
    }
    70% {
        box-shadow: 0 0 0 15px rgba(13, 110, 253, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(13, 110, 253, 0);
    }
}

.chat-fab-button {
    animation: pulse 2s infinite;
}
