/* DMEBuySell ChatBot Styles */
.dmebs-chatbot-widget {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 999999;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
}

.dmebs-chatbot-widget.bottom-left {
    right: auto;
    left: 20px;
}

.dmebs-chatbot-toggle {
    width: 60px;
    height: 60px;
    background: var(--dmebs-primary, #0073aa);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    transition: all 0.3s ease;
    border: none;
    color: white;
}

.dmebs-chatbot-toggle:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 16px rgba(0,0,0,0.2);
}

.dmebs-chatbot-toggle i {
    font-size: 24px;
}

.dmebs-chatbot-container {
    position: absolute;
    bottom: 70px;
    right: 0;
    width: 380px;
    max-width: 90vw;
    height: 500px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.2);
    display: none;
    flex-direction: column;
    overflow: hidden;
}

.dmebs-chatbot-widget.bottom-left .dmebs-chatbot-container {
    right: auto;
    left: 0;
}

.dmebs-chatbot-container.open {
    display: flex;
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.dmebs-chatbot-header {
    background: var(--dmebs-primary, #0073aa);
    color: white;
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.dmebs-chatbot-header h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
}

.dmebs-chatbot-close {
    background: none;
    border: none;
    color: white;
    font-size: 20px;
    cursor: pointer;
    padding: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.dmebs-chatbot-messages {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.dmebs-message {
    max-width: 80%;
    padding: 12px 16px;
    border-radius: 18px;
    line-height: 1.4;
    word-wrap: break-word;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.dmebs-message.user {
    align-self: flex-end;
    background: var(--dmebs-primary, #0073aa);
    color: white;
    border-bottom-right-radius: 4px;
}

.dmebs-message.bot {
    align-self: flex-start;
    background: #f0f2f5;
    color: #333;
    border-bottom-left-radius: 4px;
}

.dmebs-message.bot a {
    color: var(--dmebs-primary, #0073aa);
    text-decoration: underline;
}

.dmebs-message.typing {
    background: #f0f2f5;
    padding: 10px 16px;
}

.dmebs-typing-indicator {
    display: flex;
    gap: 4px;
    align-items: center;
}

.dmebs-typing-indicator span {
    width: 8px;
    height: 8px;
    background: #999;
    border-radius: 50%;
    animation: typing 1.4s infinite;
}

.dmebs-typing-indicator span:nth-child(2) {
    animation-delay: 0.2s;
}

.dmebs-typing-indicator span:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes typing {
    0%, 60%, 100% {
        transform: translateY(0);
    }
    30% {
        transform: translateY(-5px);
    }
}

.dmebs-chatbot-input {
    padding: 20px;
    border-top: 1px solid #e0e0e0;
    display: flex;
    gap: 10px;
}

.dmebs-chatbot-input input {
    flex: 1;
    padding: 12px 16px;
    border: 1px solid #ddd;
    border-radius: 24px;
    font-size: 14px;
    outline: none;
    transition: border-color 0.3s;
}

.dmebs-chatbot-input input:focus {
    border-color: var(--dmebs-primary, #0073aa);
}

.dmebs-chatbot-input button {
    background: var(--dmebs-primary, #0073aa);
    color: white;
    border: none;
    border-radius: 50%;
    width: 44px;
    height: 44px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s;
}

.dmebs-chatbot-input button:hover {
    background: #005a87;
}

.dmebs-chatbot-input button:disabled {
    background: #ccc;
    cursor: not-allowed;
}

/* Admin Styles */
.dmebs-chatbot-admin .dmebs-admin-stats {
    display: flex;
    gap: 20px;
    margin: 20px 0;
}

.dmebs-chatbot-admin .stat-box {
    background: white;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 20px;
    min-width: 150px;
    text-align: center;
}

.dmebs-chatbot-admin .stat-number {
    font-size: 32px;
    font-weight: bold;
    color: var(--dmebs-primary, #0073aa);
    margin: 10px 0;
}

.dmebs-chatbot-admin .dmebs-admin-actions {
    margin-top: 40px;
    padding: 20px;
    background: white;
    border: 1px solid #ddd;
    border-radius: 8px;
}

/* Responsive */
@media (max-width: 480px) {
    .dmebs-chatbot-container {
        width: calc(100vw - 40px);
        height: 70vh;
        bottom: 80px;
        right: 50%;
        transform: translateX(50%);
    }
    
    .dmebs-chatbot-widget.bottom-left .dmebs-chatbot-container {
        left: 50%;
        transform: translateX(-50%);
    }
}