/* MBN Chat Widget Styles */

.mbn_widget {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 9999;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

/* Chat Button */
.mbn_chatbtn {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 20px;
    background: linear-gradient(135deg, #0066cc 0%, #0052a3 100%);
    color: #ffffff;
    border-radius: 50px;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 102, 204, 0.3);
    transition: all 0.3s ease;
    font-weight: 600;
    font-size: 15px;
}

.mbn_chatbtn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 102, 204, 0.4);
}

.mbn_chatbtn img {
    width: 32px;
    height: 32px;
    border-radius: 50%;
}

/* Chat Container */
.mbn_container {
    position: fixed;
    bottom: 90px;
    right: 20px;
    width: 380px;
    max-width: calc(100vw - 40px);
    height: 600px;
    max-height: calc(100vh - 140px);
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
    display: none;
    flex-direction: column;
    overflow: hidden;
}

.mbn_container.active {
    display: flex;
}

/* Header */
.mbn_header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    background: linear-gradient(135deg, #0066cc 0%, #0052a3 100%);
    color: #ffffff;
}

.mbn_title {
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 600;
    font-size: 16px;
}

.mbn_title img {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.mbn_controls {
    display: flex;
    gap: 8px;
}

.mbn_controls button {
    width: 32px;
    height: 32px;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    border-radius: 8px;
    color: #ffffff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    font-size: 14px;
}

.mbn_controls button:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.05);
}

/* Messages Area */
.mbn_messages {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    background: #f8f9fa;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.mbn_messages::-webkit-scrollbar {
    width: 6px;
}

.mbn_messages::-webkit-scrollbar-track {
    background: #e9ecef;
}

.mbn_messages::-webkit-scrollbar-thumb {
    background: #cbd5e0;
    border-radius: 3px;
}

.mbn_messages::-webkit-scrollbar-thumb:hover {
    background: #a0aec0;
}

/* Message bubbles - you can add these classes via JavaScript */
.mbn_message {
    max-width: 80%;
    padding: 12px 16px;
    border-radius: 12px;
    line-height: 1.5;
    word-wrap: break-word;
}

.mbn_message.user {
    align-self: flex-end;
    background: #0066cc;
    color: #ffffff;
    border-bottom-right-radius: 4px;
}

.mbn_message.bot {
    align-self: flex-start;
    background: #ffffff;
    color: #333333;
    border: 1px solid #e9ecef;
    border-bottom-left-radius: 4px;
}

/* Input Area */
.mbn_input {
    display: flex;
    gap: 8px;
    padding: 16px 20px;
    background: #ffffff;
    border-top: 1px solid #e9ecef;
}

.mbn_input textarea {
    flex: 1;
    min-height: 40px;
    max-height: 120px;
    padding: 10px 14px;
    border: 1px solid #e0e0e0;
    border-radius: 20px;
    resize: none;
    font-family: inherit;
    font-size: 14px;
    outline: none;
    transition: border-color 0.2s ease;
}

.mbn_input textarea:focus {
    border-color: #0066cc;
}

.mbn_input button {
    width: 40px;
    height: 40px;
    background: #0066cc;
    border: none;
    border-radius: 50%;
    color: #ffffff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.mbn_input button:hover {
    background: #0052a3;
    transform: scale(1.05);
}

.mbn_input button:active {
    transform: scale(0.95);
}

/* Brand Footer */
.mbn_brand {
    padding: 10px 20px;
    text-align: center;
    font-size: 12px;
    color: #999999;
    background: #f8f9fa;
    border-top: 1px solid #e9ecef;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .mbn_widget {
        bottom: 10px;
        right: 10px;
    }
    
    .mbn_chatbtn {
        padding: 10px 16px;
        font-size: 14px;
    }
    
    .mbn_chatbtn img {
        width: 28px;
        height: 28px;
    }
    
    .mbn_container {
        bottom: 70px;
        right: 10px;
        width: calc(100vw - 20px);
        height: calc(100vh - 100px);
    }
    
    .mbn_header {
        padding: 14px 16px;
    }
    
    .mbn_title {
        font-size: 15px;
    }
    
    .mbn_title img {
        width: 32px;
        height: 32px;
    }
    
    .mbn_controls button {
        width: 28px;
        height: 28px;
        font-size: 12px;
    }
    
    .mbn_messages {
        padding: 16px;
    }
    
    .mbn_input {
        padding: 12px 16px;
    }
}

/* Animation */
@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.mbn_container.active {
    animation: slideInUp 0.3s ease-out;
}
