/* MMR Chatbot Styles */
#mmr-chatbot-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 9999;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

#mmr-chatbot-container.mmr-chatbot-hidden #mmr-chatbot-window {
    display: none;
}

.mmr-chatbot-toggle {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
    transition: all 0.3s ease;
    position: relative;
    animation: mmrPulse 2s infinite;
    color: white;
    font-size: 24px;
}

.mmr-chatbot-toggle:hover {
    transform: scale(1.1);
}

.mmr-chatbot-window {
    width: 350px;
    height: 450px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.15);
    display: flex;
    flex-direction: column;
    position: absolute;
    bottom: 80px;
    right: 0;
    animation: mmrSlideUp 0.3s ease-out;
}

.mmr-chatbot-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 15px 20px;
    border-radius: 12px 12px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.mmr-chatbot-header h4 {
    margin: 0;
    font-size: 16px;
}

.mmr-chatbot-close {
    background: rgba(255,255,255,0.2);
    border: none;
    color: white;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 16px;
}

.mmr-chatbot-messages {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    background: #f8fafc;
}

.mmr-chatbot-message {
    margin-bottom: 15px;
    display: flex;
    gap: 10px;
}

.mmr-chatbot-message.bot .mmr-chatbot-bubble {
    background: white;
    color: #1e293b;
    border-radius: 18px 18px 18px 6px;
}

.mmr-chatbot-message.user .mmr-chatbot-bubble {
    background: #667eea;
    color: white;
    border-radius: 18px 18px 6px 18px;
    margin-left: auto;
}

.mmr-chatbot-bubble {
    padding: 12px 16px;
    max-width: 250px;
    font-size: 14px;
    line-height: 1.4;
}

.mmr-chatbot-options {
    padding: 15px 20px;
    background: white;
    border-top: 1px solid #e2e8f0;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.mmr-chatbot-option {
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    border-radius: 20px;
    padding: 8px 16px;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s;
}

.mmr-chatbot-option:hover {
    background: #667eea;
    color: white;
}

/* Animations */
@keyframes mmrPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

@keyframes mmrSlideUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .mmr-chatbot-window {
        width: calc(100vw - 40px);
        right: -10px;
    }
}


/* Enhanced Animations & Effects */
.typing-indicator .mmr-chatbot-bubble {
    background: #f1f5f9 !important;
    padding: 15px 20px !important;
    display: flex;
    gap: 4px;
    align-items: center;
}

.typing-indicator .mmr-chatbot-bubble span {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #94a3b8;
    animation: mmrTypingDots 1.4s infinite ease-in-out;
}

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

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

@keyframes mmrTypingDots {
    0%, 80%, 100% {
        transform: scale(0.8);
        opacity: 0.5;
    }
    40% {
        transform: scale(1);
        opacity: 1;
    }
}

/* Lead Form Enhancements */
.mmr-lead-form input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.mmr-lead-form button:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.mmr-lead-form button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* Success States */
.mmr-chatbot-success {
    background: #dcfce7 !important;
    border: 1px solid #16a34a !important;
    color: #166534 !important;
}

/* Error States */
.mmr-chatbot-error {
    background: #fef2f2 !important;
    border: 1px solid #ef4444 !important;
    color: #dc2626 !important;
}

/* Enhanced Mobile Experience */
@media (max-width: 480px) {
    .mmr-chatbot-toggle {
        width: 55px;
        height: 55px;
        font-size: 20px;
    }
    
    .mmr-chatbot-window {
        width: calc(100vw - 20px);
        height: 70vh;
        right: -10px;
        bottom: 70px;
    }
    
    .mmr-chatbot-messages {
        padding: 15px;
    }
    
    .mmr-chatbot-options {
        padding: 15px;
    }
    
    .mmr-chatbot-option {
        width: 100%;
        margin-bottom: 5px;
        justify-content: center;
    }
}

/* Smooth Scroll */
.mmr-chatbot-messages {
    scroll-behavior: smooth;
}

/* Custom Scrollbar */
.mmr-chatbot-messages::-webkit-scrollbar {
    width: 4px;
}

.mmr-chatbot-messages::-webkit-scrollbar-track {
    background: #f1f5f9;
}

.mmr-chatbot-messages::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 2px;
}

.mmr-chatbot-messages::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* Text Input Area */
.mmr-chatbot-input {
    padding: 15px 20px;
    background: white;
    border-top: 1px solid #e2e8f0;
    display: flex;
    gap: 10px;
    align-items: center;
}

.mmr-chatbot-input input {
    flex: 1;
    padding: 12px 16px;
    border: 2px solid #e5e7eb;
    border-radius: 20px;
    font-size: 14px;
    outline: none;
    transition: border-color 0.2s;
}

.mmr-chatbot-input input:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.mmr-chatbot-input button {
    background: #667eea;
    border: none;
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.mmr-chatbot-input button:hover {
    background: #5a67d8;
}

.mmr-chatbot-input button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Hide input when showing lead form */
.mmr-chatbot-input.hidden {
    display: none;
}

/* Enhanced Form Styling */
.mmr-lead-form {
    animation: formSlideIn 0.3s ease-out;
    transform-origin: top;
}

@keyframes formSlideIn {
    from {
        opacity: 0;
        transform: translateY(-10px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.mmr-lead-form input:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.mmr-lead-form button:hover:not(:disabled) {
    transform: translateY(-1px) !important;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.mmr-lead-form button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
}

/* Enhanced Text Input Area */
.mmr-chatbot-input input:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.mmr-chatbot-input button:hover {
    background: #5a67d8;
    transform: scale(1.05);
}

/* Smooth Animations */
.mmr-chatbot-message {
    animation: messageSlideIn 0.3s ease-out;
}

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

/* Better Mobile Form Display */
@media (max-width: 480px) {
    .mmr-lead-form {
        margin: 15px 0;
        padding: 15px;
    }
    
    .mmr-lead-form input {
        padding: 10px;
        font-size: 16px; /* Prevents zoom on iOS */
    }
    
    .mmr-chatbot-messages {
        padding-bottom: 20px; /* Extra space for forms */
    }
}
