/*
 * Chatbot CSS
 */

.lforlaw-chatbot-floating-button {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background-color: #cd1d29;
    /* Primary Color */
    color: #fff;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 24px;
    cursor: pointer;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    z-index: 999;
}

.lforlaw-chatbot-container {
    display: none;
    /* Initially hidden */
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    color: #333333;
    background-color: #f5f5f5;
    border: 1px solid #ddd;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.15);
    flex-direction: column;
    height: 500px;
    width: 370px;
    overflow: hidden;
    position: fixed;
    bottom: 90px;
    right: 20px;
    z-index: 1000;
}

.lforlaw-chatbot-header {
    background-color: #cd1d29;
    /* Primary Color */
    color: white;
    padding: 1rem;
    font-size: 1.1rem;
    font-weight: bold;
    border-top-left-radius: 10px;
    border-top-right-radius: 10px;
    text-align: center;
}

.lforlaw-chatbot-messages {
    flex-grow: 1;
    padding: 1rem;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    overflow-y: scroll;
    height: 338px;
}

.lforlaw-chatbot-message {
    padding: 0.6rem 1rem;
    border-radius: 18px;
    max-width: 85%;
    word-wrap: break-word;
    font-size: 0.9rem;
    line-height: 1.5;
}

.lforlaw-chatbot-message.user {
    align-self: flex-end;
    background-color: #443c68;
    /* Secondary Color */
    color: #ffffff;
    border-bottom-right-radius: 4px;
}

.lforlaw-chatbot-message.bot {
    align-self: flex-start;
    background-color: #ffffff;
    color: #333;
    border: 1px solid #eee;
    border-bottom-left-radius: 4px;
}

.lforlaw-chatbot-message.bot a {
    color: #cd1d29;

}

.lforlaw-chatbot-message.bot a:hover {
    color: #443c68;

}

.lforlaw-chatbot-message-timestamp {
    font-size: 0.75rem;
    color: #999;
    margin-top: 0.25rem;
    text-align: right;
}

.lforlaw-chatbot-message.user .lforlaw-chatbot-message-timestamp {
    color: #ddd;
    /* Lighter timestamp for dark user bubble */
}

.lforlaw-chatbot-message.bot .lforlaw-chatbot-message-timestamp {
    text-align: left;
}

.lforlaw-chatbot-input-area {
    display: flex;
    padding: 1rem;
    border-top: 1px solid #eee;
    background-color: #f0f0f0;
}

.lforlaw-chatbot-input-area input[type="text"] {
    flex-grow: 1;
    border: 1px solid #ddd;
    border-radius: 20px;
    padding: 0.75rem 1rem;
    margin-right: 0.5rem;
    font-size: 0.9rem;
}

.lforlaw-chatbot-input-area button {
    background-color: #cd1d29;
    /* Primary Color */
    color: white;
    border: none;
    border-radius: 50%;
    width: 45px;
    height: 45px;
    cursor: pointer;
    font-size: 1.2rem;
    transition: background-color 0.3s ease;
    display: flex;
    justify-content: center;
    align-items: center;
}

.lforlaw-chatbot-input-area button:hover {
    background-color: #b01923;
    /* Darker Primary */
}

/* Responsive adjustments */
@media (max-width: 480px) {
    .lforlaw-chatbot-container {
        width: 100%;
        height: 100%;
        border-radius: 0;
        bottom: 0;
        right: 0;
        border: none;
    }

    .lforlaw-chatbot-floating-button {
        bottom: 10px;
        right: 10px;
    }
}

/* Typing Indicator */
.lforlaw-chatbot-message.typing-indicator {
    background-color: #e0e0e0;
    color: #555;
    font-style: italic;
    align-self: flex-start;
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0% {
        opacity: 1;
    }

    50% {
        opacity: 0.6;
    }

    100% {
        opacity: 1;
    }
}