/* NbS CoCreator Chatbot Styles */
:root {
    --chatbot-primary: #2ecc71;
    --chatbot-primary-dark: #27ae60;
    --chatbot-secondary: #3498db;
    --chatbot-dark: #121e1b;
    --chatbot-darker: #0d1613;
    --chatbot-light: #ecf0f1;
    --chatbot-gray: #2c3e50;
}

#nbs-chatbot-wrapper {
    position: fixed;
    bottom: 100px;
    right: 20px;
    z-index: 10000;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

/* Chatbot Toggle Button */
#nbs-chatbot-toggle {
    background: linear-gradient(145deg, var(--chatbot-primary-dark), var(--chatbot-secondary));
    color: white;
    padding: 12px 20px;
    border-radius: 25px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
    user-select: none;
}

#nbs-chatbot-toggle:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
}

#nbs-chatbot-toggle.nbs-chatbot-closed {
    animation: pulse 2s infinite;
}

.chatbot-toggle-icon {
    font-size: 1.2rem;
}

.chatbot-toggle-text {
    font-weight: 600;
    font-size: 0.9rem;
}

.chatbot-notification-dot {
    width: 8px;
    height: 8px;
    background: #e74c3c;
    border-radius: 50%;
    margin-left: 5px;
    animation: blink 2s infinite;
}

/* Chatbot Container */
#nbs-chatbot-container {
    position: absolute;
    bottom: 70px;
    right: 0;
    width: 350px;
    height: 500px;
    background: linear-gradient(145deg, var(--chatbot-darker), var(--chatbot-gray));
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid rgba(46, 204, 113, 0.2);
}

#nbs-chatbot-container.nbs-chatbot-hidden {
    display: none;
}

#nbs-chatbot-container.nbs-chatbot-minimized {
    height: 60px;
    overflow: hidden;
}

/* Chatbot Header */
.chatbot-header {
    background: linear-gradient(to right, var(--chatbot-primary), var(--chatbot-secondary));
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: white;
}

.chatbot-header-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.chatbot-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
}

.chatbot-title h3 {
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
}

.chatbot-status {
    font-size: 0.7rem;
    opacity: 0.8;
}

.chatbot-controls {
    display: flex;
    gap: 5px;
}

.chatbot-control-btn {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    width: 25px;
    height: 25px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s;
}

.chatbot-control-btn:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* Chatbot Messages */
.chatbot-messages {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.chatbot-message {
    max-width: 85%;
    padding: 12px 15px;
    border-radius: 15px;
    line-height: 1.4;
    animation: messageSlide 0.3s ease;
}

.chatbot-message.user {
    align-self: flex-end;
    background: linear-gradient(145deg, var(--chatbot-primary), var(--chatbot-primary-dark));
    color: white;
    border-bottom-right-radius: 5px;
}

.chatbot-message.assistant {
    align-self: flex-start;
    background: rgba(255, 255, 255, 0.1);
    color: var(--chatbot-light);
    border-bottom-left-radius: 5px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.chatbot-message.system {
    align-self: center;
    background: rgba(52, 152, 219, 0.2);
    color: var(--chatbot-light);
    font-size: 0.8rem;
    text-align: center;
    max-width: 90%;
}

.chatbot-typing {
    align-self: flex-start;
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 10px 15px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    border-bottom-left-radius: 5px;
}

.typing-dots {
    display: flex;
    gap: 3px;
}

.typing-dot {
    width: 6px;
    height: 6px;
    background: var(--chatbot-primary);
    border-radius: 50%;
    animation: typing 1.4s infinite;
}

.typing-dot:nth-child(2) {
    animation-delay: 0.2s;
}

.typing-dot:nth-child(3) {
    animation-delay: 0.4s;
}

/* Quick Prompts */
.chatbot-quick-prompts {
    padding: 15px 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.quick-prompt {
    background: rgba(255, 255, 255, 0.05);
    padding: 10px 12px;
    border-radius: 10px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.8rem;
    color: var(--chatbot-light);
    transition: all 0.3s;
    border: 1px solid transparent;
}

.quick-prompt:hover {
    background: rgba(46, 204, 113, 0.1);
    border-color: rgba(46, 204, 113, 0.3);
    transform: translateX(5px);
}

.quick-prompt i {
    color: var(--chatbot-primary);
    font-size: 0.7rem;
}

/* Chatbot Input Area */
.chatbot-input-area {
    padding: 15px 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.chatbot-input-wrapper {
    display: flex;
    gap: 10px;
    margin-bottom: 5px;
}

#chatbot-input {
    flex: 1;
    padding: 10px 15px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    color: var(--chatbot-light);
    font-size: 0.9rem;
    outline: none;
    transition: border-color 0.3s;
}

#chatbot-input:focus {
    border-color: var(--chatbot-primary);
}

#chatbot-input::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.chatbot-send-btn {
    background: var(--chatbot-primary);
    border: none;
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s;
}

.chatbot-send-btn:hover {
    background: var(--chatbot-primary-dark);
}

.chatbot-send-btn:disabled {
    background: var(--chatbot-gray);
    cursor: not-allowed;
}

.chatbot-input-hint {
    text-align: center;
    font-size: 0.7rem;
    color: rgba(255, 255, 255, 0.5);
}

/* Animations */
@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

@keyframes blink {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0; }
}

@keyframes messageSlide {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes typing {
    0%, 60%, 100% {
        transform: translateY(0);
    }
    30% {
        transform: translateY(-5px);
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    #nbs-chatbot-wrapper {
        bottom: 10px;
        right: 10px;
    }
    
    #nbs-chatbot-container {
        width: calc(100vw - 20px);
        height: 70vh;
        right: 10px;
        bottom: 60px;
    }
    
    .chatbot-quick-prompts {
        flex-direction: row;
        overflow-x: auto;
        padding: 10px 15px;
    }
    
    .quick-prompt {
        white-space: nowrap;
        flex-shrink: 0;
    }
}

/* Scrollbar Styling */
.chatbot-messages::-webkit-scrollbar {
    width: 6px;
}

.chatbot-messages::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
}

.chatbot-messages::-webkit-scrollbar-thumb {
    background: var(--chatbot-primary);
    border-radius: 3px;
}

.chatbot-messages::-webkit-scrollbar-thumb:hover {
    background: var(--chatbot-primary-dark);
}