/* Base styles for the chat container */
#mac-chat-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 10000;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
}

/* Chat Button (The beautiful cat avatar) */
#mac-chat-button {
    display: flex;
    align-items: center;
    background-color: #4CAF50; /* Green */
    color: white;
    padding: 10px 15px;
    border-radius: 30px;
    cursor: pointer;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    transition: background-color 0.3s;
}

#mac-chat-button:hover {
    background-color: #45a049;
}

#mac-chat-button img {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    margin-right: 10px;
    background-color: white;
}

/* Chat Box */
#mac-chat-box {
    width: 350px;
    height: 500px;
    background-color: #fff;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* Chat Header */
#mac-chat-header {
    display: flex;
    align-items: center;
    padding: 10px;
    background-color: #f1f1f1;
    border-bottom: 1px solid #ddd;
}

#mac-chat-header img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    margin-right: 10px;
}

#mac-chat-header .mac-header-text h3 {
    margin: 0;
    font-size: 16px;
    color: #333;
}

#mac-chat-header .mac-header-text p {
    margin: 0;
    font-size: 12px;
    color: #666;
}

#mac-chat-close-btn {
    margin-left: auto;
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    color: #999;
}

/* Chat Body (Messages) */
#mac-chat-body {
    flex-grow: 1;
    padding: 15px;
    overflow-y: auto;
    background-color: #f9f9f9;
}

.mac-message {
    display: flex;
    margin-bottom: 15px;
    max-width: 80%;
}

.mac-avatar img {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    margin-right: 10px;
    flex-shrink: 0;
}

.mac-text-bubble {
    padding: 10px 15px;
    border-radius: 15px;
    line-height: 1.4;
    word-wrap: break-word;
}

/* AI Message Styling */
.mac-ai-message {
    justify-content: flex-start;
    align-items: flex-start;
    margin-right: auto;
}

.mac-ai-message .mac-text-bubble {
    background-color: #e0f7fa; /* Light cyan */
    color: #006064;
    border-bottom-left-radius: 0;
}

/* User Message Styling */
.mac-user-message {
    justify-content: flex-end;
    margin-left: auto;
}

.mac-user-message .mac-text-bubble {
    background-color: #4CAF50; /* Green */
    color: white;
    border-bottom-right-radius: 0;
}

/* Loading/Typing Indicator */
.mac-loading {
    animation: blink 1s infinite;
}

@keyframes blink {
    0% { opacity: 0.2; }
    50% { opacity: 1; }
    100% { opacity: 0.2; }
}

/* Chat Footer (Input) */
#mac-chat-footer {
    display: flex;
    padding: 10px;
    border-top: 1px solid #ddd;
    background-color: #fff;
}

#mac-chat-input {
    flex-grow: 1;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 20px;
    margin-right: 10px;
    font-size: 14px;
}

#mac-chat-send-btn {
    background-color: #4CAF50;
    color: white;
    border: none;
    padding: 10px 15px;
    border-radius: 20px;
    cursor: pointer;
    transition: background-color 0.3s;
}

#mac-chat-send-btn:hover:not(:disabled) {
    background-color: #45a049;
}

#mac-chat-send-btn:disabled {
    background-color: #a5d6a7;
    cursor: not-allowed;
}
