.fab-container {
    z-index: 99999999999999999;
    position: fixed;
    bottom: 30px;
    right: 30px;
}


.fab-button {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, #6e8efb, #a777e3);
    color: white;
    border: none;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

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

.fab-icon {
    width: 24px;
    height: 24px;
    fill: white;
}

.close-button {
    background: none;
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
    padding: 0;
    line-height: 1;
}


.chat-popup {
    z-index: 100000000000;
}

/* Chat Container */
.chat-popup {
    position: fixed;
    bottom: 100px;
    right: 30px;
    width: 380px;
    max-height: 60vh;
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
    display: none;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid #e0e0e0;
}

.chat-popup.active {
    display: flex;
}

/* Chat Header */
.chat-header {
    padding: 16px;
    background: linear-gradient(135deg, #6e8efb, #a777e3);
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
}

.chat-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
}

/* Chat Messages */
.chat-messages {
    flex: 1;
    padding: 16px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 12px;
    background-color: #f9f9f9;
}

/* Message Styling */
.message {
    max-width: 85%;
    padding: 12px 16px;
    border-radius: 18px;
    font-size: 14px;
    line-height: 1.5;
    word-wrap: break-word;
    animation: fadeIn 0.3s ease;
}

.user-message {
    align-self: flex-end;
    background: #6e8efb;
    color: white;
    border-bottom-right-radius: 4px;
}

/* Improved list styling for AI messages */
.ai-message ul,
.ai-message ol {
    display: block;
    margin: 12px 0;
    padding-left: 24px;
}

.ai-message ul {
    list-style-type: disc;
}

.ai-message ol {
    list-style-type: decimal;
}

.ai-message li {
    display: list-item;
    margin-bottom: 6px;
    line-height: 1.4;
}

/* Reset any styles that might be interfering */
.ai-message {
    all: initial;
    /* Reset all inherited styles */
}

.ai-message * {
    all: revert;
    /* Allow child elements to use default styles */
}

/* Typing Indicator */
.typing-indicator {
    display: flex;
    padding: 8px 0;
}

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

.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;
}

/* Chat Input */
.chat-input {
    display: flex;
    padding: 12px;
    border-top: 1px solid #eee;
    background-color: white;
}

.chat-input input {
    flex: 1;
    padding: 12px 16px;
    border: 1px solid #ddd;
    border-radius: 24px;
    outline: none;
    font-size: 14px;
    transition: border-color 0.3s;
}

.chat-input input:focus {
    border-color: #a777e3;
}

.send-button {
    width: 44px;
    height: 44px;
    margin-left: 8px;
    background: linear-gradient(135deg, #6e8efb, #a777e3);
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s;
}

.send-button:hover {
    transform: scale(1.05);
}

.send-button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.send-button svg {
    width: 20px;
    height: 20px;
    fill: white;
}

/* Animations */
@keyframes typingAnimation {

    0%,
    60%,
    100% {
        transform: translateY(0);
        opacity: 0.6;
    }

    30% {
        transform: translateY(-5px);
        opacity: 1;
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.message-list {
    background: rgba(255, 255, 255, 0.8);
    border-radius: 8px;
    padding: 8px 12px;
    margin: 8px 0;
}

/* Typing Indicator */
.ai-typing-indicator {
    margin-left: 8px;
    color: #888;
    font-size: 12px;
    font-style: italic;
}

/* Checklist Styles */
.checklist-response {
    background: #f8f9ff;
    border-radius: 8px;
    padding: 12px;
    margin: 12px 0;
    border-left: 3px solid #6e8efb;
}

.checklist-item {
    display: flex;
    align-items: center;
    margin: 6px 0;
    padding: 4px 0;
}

.checklist-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    background: #6e8efb;
    color: white;
    border-radius: 50%;
    font-size: 10px;
    margin-right: 10px;
    flex-shrink: 0;
}

.checklist-text {
    color: #444;
}

/* Timestamp */
.timestamp {
    font-size: 11px;
    color: #999;
    text-align: right;
    display: block;
    margin-top: 4px;
}