/* Mimoza AI Chatbot Styles */

:root {
    --mimoza-primary: #667eea;
    --mimoza-primary-dark: #5568d3;
    --mimoza-secondary: #764ba2;
    --mimoza-success: #10b981;
    --mimoza-text: #1f2937;
    --mimoza-text-light: #6b7280;
    --mimoza-border: #e5e7eb;
    --mimoza-bg: #ffffff;
    --mimoza-bg-light: #f9fafb;
    --mimoza-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    --mimoza-shadow-lg: 0 20px 40px rgba(0, 0, 0, 0.15);
}

/* Widget Container */
#mimoza-chatbot-widget {
    position: fixed;
    z-index: 999999;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

#mimoza-chatbot-widget.mimoza-chatbot-bottom-right {
    bottom: 20px;
    right: 20px;
}

#mimoza-chatbot-widget.mimoza-chatbot-bottom-left {
    bottom: 20px;
    left: 20px;
}

/* Chat Button */
.mimoza-chat-button {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--mimoza-primary), var(--mimoza-secondary));
    box-shadow: var(--mimoza-shadow);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    border: none;
}

.mimoza-chat-button:hover {
    transform: scale(1.1);
    box-shadow: var(--mimoza-shadow-lg);
}

.mimoza-chat-button:active {
    transform: scale(0.95);
}

/* Chat Badge */
.mimoza-chat-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    width: 20px;
    height: 20px;
    background: #ef4444;
    border-radius: 50%;
    border: 3px solid white;
    display: flex;
    align-items: center;
    justify-content: center;
}

.mimoza-pulse {
    display: block;
    width: 10px;
    height: 10px;
    background: white;
    border-radius: 50%;
    animation: mimoza-pulse 2s infinite;
}

@keyframes mimoza-pulse {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.5;
        transform: scale(0.8);
    }
}

/* Chat Window */
.mimoza-chat-window {
    position: absolute;
    bottom: 80px;
    width: 380px;
    max-width: calc(100vw - 40px);
    height: 600px;
    max-height: calc(100vh - 120px);
    background: var(--mimoza-bg);
    border-radius: 16px;
    box-shadow: var(--mimoza-shadow-lg);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    animation: mimoza-slideUp 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.mimoza-chatbot-bottom-left .mimoza-chat-window {
    left: 0;
}

.mimoza-chatbot-bottom-right .mimoza-chat-window {
    right: 0;
}

@keyframes mimoza-slideUp {
    from {
        opacity: 0;
        transform: translateY(20px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Chat Header */
.mimoza-chat-header {
    background: linear-gradient(135deg, var(--mimoza-primary), var(--mimoza-secondary));
    color: white;
    padding: 16px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.mimoza-chat-header-content {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
}

.mimoza-chat-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.mimoza-chat-header-info h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    line-height: 1.4;
}

.mimoza-online-status {
    margin: 2px 0 0 0;
    font-size: 12px;
    opacity: 0.9;
    display: flex;
    align-items: center;
    gap: 6px;
}

.mimoza-status-dot {
    width: 8px;
    height: 8px;
    background: var(--mimoza-success);
    border-radius: 50%;
    display: inline-block;
    animation: mimoza-blink 2s infinite;
}

@keyframes mimoza-blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.mimoza-close-button {
    background: transparent;
    border: none;
    color: white;
    cursor: pointer;
    padding: 8px;
    border-radius: 8px;
    transition: background 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.mimoza-close-button:hover {
    background: rgba(255, 255, 255, 0.1);
}

/* Messages Area */
.mimoza-chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    background: var(--mimoza-bg-light);
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.mimoza-chat-messages::-webkit-scrollbar {
    width: 6px;
}

.mimoza-chat-messages::-webkit-scrollbar-track {
    background: transparent;
}

.mimoza-chat-messages::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 3px;
}

.mimoza-chat-messages::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* Message */
.mimoza-message {
    display: flex;
    gap: 10px;
    animation: mimoza-messageIn 0.3s ease-out;
}

@keyframes mimoza-messageIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.mimoza-bot-message {
    align-items: flex-start;
}

.mimoza-user-message {
    align-items: flex-end;
    flex-direction: row-reverse;
}

.mimoza-message-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--mimoza-primary), var(--mimoza-secondary));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    flex-shrink: 0;
}

.mimoza-user-message .mimoza-message-avatar {
    background: var(--mimoza-text);
}

.mimoza-message-content {
    max-width: 75%;
}

.mimoza-message-content p {
    margin: 0;
    padding: 12px 16px;
    border-radius: 16px;
    font-size: 14px;
    line-height: 1.5;
    word-wrap: break-word;
}

.mimoza-bot-message .mimoza-message-content p {
    background: white;
    color: var(--mimoza-text);
    border-bottom-left-radius: 4px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.mimoza-user-message .mimoza-message-content p {
    background: linear-gradient(135deg, var(--mimoza-primary), var(--mimoza-secondary));
    color: white;
    border-bottom-right-radius: 4px;
}

/* Typing Indicator */
.mimoza-typing {
    display: flex;
    gap: 4px;
    padding: 12px 16px;
}

.mimoza-typing-dot {
    width: 8px;
    height: 8px;
    background: var(--mimoza-text-light);
    border-radius: 50%;
    animation: mimoza-typing 1.4s infinite;
}

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

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

@keyframes mimoza-typing {
    0%, 60%, 100% {
        transform: translateY(0);
        opacity: 0.7;
    }
    30% {
        transform: translateY(-10px);
        opacity: 1;
    }
}

/* Quick Actions */
.mimoza-quick-actions {
    padding: 12px 20px;
    background: white;
    border-top: 1px solid var(--mimoza-border);
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.mimoza-quick-btn {
    padding: 8px 14px;
    background: var(--mimoza-bg-light);
    border: 1px solid var(--mimoza-border);
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
    color: var(--mimoza-text);
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

.mimoza-quick-btn:hover {
    background: var(--mimoza-primary);
    color: white;
    border-color: var(--mimoza-primary);
    transform: translateY(-1px);
}

/* Input Area */
.mimoza-chat-input-wrapper {
    background: white;
    border-top: 1px solid var(--mimoza-border);
}

#mimoza-chat-form {
    padding: 16px 20px;
    display: flex;
    gap: 10px;
    align-items: center;
}

#mimoza-chat-input {
    flex: 1;
    border: 1px solid var(--mimoza-border);
    border-radius: 24px;
    padding: 12px 16px;
    font-size: 14px;
    outline: none;
    transition: all 0.2s;
}

#mimoza-chat-input:focus {
    border-color: var(--mimoza-primary);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.mimoza-send-button {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--mimoza-primary), var(--mimoza-secondary));
    border: none;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    flex-shrink: 0;
}

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

.mimoza-send-button:active {
    transform: scale(0.95);
}

/* Contact Buttons */
.mimoza-contact-buttons {
    display: flex;
    gap: 8px;
    padding: 0 20px 16px 20px;
}

.mimoza-contact-btn {
    flex: 1;
    padding: 12px;
    border-radius: 12px;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: all 0.2s;
}

.mimoza-phone-btn {
    background: #3b82f6;
    color: white;
}

.mimoza-phone-btn:hover {
    background: #2563eb;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4);
}

.mimoza-whatsapp-btn {
    background: #25d366;
    color: white;
}

.mimoza-whatsapp-btn:hover {
    background: #20ba5a;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(37, 211, 102, 0.4);
}

/* Powered By */
.mimoza-powered {
    text-align: center;
    padding: 8px;
    background: var(--mimoza-bg-light);
    border-top: 1px solid var(--mimoza-border);
}

.mimoza-powered small {
    font-size: 11px;
    color: var(--mimoza-text-light);
}

/* Responsive */
@media (max-width: 480px) {
    .mimoza-chat-window {
        width: calc(100vw - 40px);
        height: calc(100vh - 120px);
        bottom: 70px;
    }
    
    #mimoza-chatbot-widget.mimoza-chatbot-bottom-right,
    #mimoza-chatbot-widget.mimoza-chatbot-bottom-left {
        bottom: 10px;
        right: 10px;
        left: 10px;
    }
    
    .mimoza-chat-button {
        width: 56px;
        height: 56px;
    }
    
    .mimoza-message-content {
        max-width: 85%;
    }
    
    .mimoza-quick-btn {
        font-size: 11px;
        padding: 6px 12px;
    }
}

/* Loading State */
.mimoza-loading {
    pointer-events: none;
    opacity: 0.6;
}

/* Error State */
.mimoza-error-message {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #dc2626;
    padding: 12px;
    border-radius: 8px;
    font-size: 13px;
    margin: 10px 20px;
}
