/* ZenCode Support Bot - Styles */

#zencode-bot-container {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 999999;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

/* Toggle Button */
#zencode-bot-toggle {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #a855f7 0%, #6366f1 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(168, 85, 247, 0.4);
    transition: all 0.3s ease;
    color: white;
}

#zencode-bot-toggle:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 30px rgba(168, 85, 247, 0.6);
}

#zencode-bot-toggle.hidden {
    display: none;
}

/* Chat Window */
#zencode-bot-window {
    position: absolute;
    bottom: 80px;
    right: 0;
    width: 380px;
    height: 520px;
    background: #0f1419;
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    display: none;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid rgba(168, 85, 247, 0.3);
}

#zencode-bot-window.open {
    display: flex;
    animation: slideUp 0.3s ease;
}

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

/* Header */
#zencode-bot-header {
    background: linear-gradient(135deg, #1a1f2e 0%, #0f1419 100%);
    padding: 16px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid rgba(168, 85, 247, 0.2);
}

.bot-header-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.bot-avatar {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #a855f7 0%, #6366f1 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
}

.bot-header-text {
    display: flex;
    flex-direction: column;
}

.bot-name {
    color: #ffffff;
    font-weight: 600;
    font-size: 15px;
}

.bot-status {
    color: #10b981;
    font-size: 12px;
}

#zencode-bot-close {
    background: none;
    border: none;
    color: #9ca3af;
    font-size: 28px;
    cursor: pointer;
    padding: 0;
    line-height: 1;
    transition: color 0.2s;
}

#zencode-bot-close:hover {
    color: #ffffff;
}

/* Messages Area */
#zencode-bot-messages {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    background: #0a0d12;
}

#zencode-bot-messages::-webkit-scrollbar {
    width: 6px;
}

#zencode-bot-messages::-webkit-scrollbar-track {
    background: transparent;
}

#zencode-bot-messages::-webkit-scrollbar-thumb {
    background: #374151;
    border-radius: 3px;
}

/* Message Bubbles */
.bot-message,
.user-message {
    max-width: 85%;
    animation: fadeIn 0.3s ease;
}

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

.bot-message {
    align-self: flex-start;
}

.user-message {
    align-self: flex-end;
}

.bot-message .message-content {
    background: #1a1f2e;
    color: #e5e7eb;
    padding: 14px 18px;
    border-radius: 18px 18px 18px 4px;
    font-size: 14px;
    line-height: 1.5;
    border: 1px solid rgba(168, 85, 247, 0.15);
}

.user-message .message-content {
    background: linear-gradient(135deg, #a855f7 0%, #6366f1 100%);
    color: #ffffff;
    padding: 14px 18px;
    border-radius: 18px 18px 4px 18px;
    font-size: 14px;
    line-height: 1.5;
}

.bot-message .message-content ul {
    margin: 10px 0 0 0;
    padding-left: 20px;
}

.bot-message .message-content li {
    margin: 6px 0;
    color: #d1d5db;
}

.bot-message .message-content strong {
    color: #a855f7;
}

.bot-message .message-content code {
    background: rgba(168, 85, 247, 0.2);
    padding: 2px 6px;
    border-radius: 4px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 13px;
}

/* Typing Indicator */
.typing-indicator {
    display: flex;
    gap: 4px;
    padding: 14px 18px;
    background: #1a1f2e;
    border-radius: 18px 18px 18px 4px;
    width: fit-content;
    border: 1px solid rgba(168, 85, 247, 0.15);
}

.typing-indicator span {
    width: 8px;
    height: 8px;
    background: #a855f7;
    border-radius: 50%;
    animation: typing 1.4s infinite;
}

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

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

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

/* Input Area */
#zencode-bot-input-area {
    padding: 16px;
    background: #0f1419;
    border-top: 1px solid rgba(168, 85, 247, 0.2);
    display: flex;
    gap: 10px;
}

#zencode-bot-input {
    flex: 1;
    background: #1a1f2e;
    border: 1px solid #374151;
    border-radius: 24px;
    padding: 12px 20px;
    color: #ffffff;
    font-size: 14px;
    outline: none;
    transition: all 0.2s;
}

#zencode-bot-input:focus {
    border-color: #a855f7;
    box-shadow: 0 0 0 3px rgba(168, 85, 247, 0.15);
}

#zencode-bot-input::placeholder {
    color: #6b7280;
}

#zencode-bot-send {
    width: 44px;
    height: 44px;
    background: linear-gradient(135deg, #a855f7 0%, #6366f1 100%);
    border: none;
    border-radius: 50%;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

#zencode-bot-send:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 15px rgba(168, 85, 247, 0.4);
}

#zencode-bot-send:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

/* Error Message */
.error-message .message-content {
    background: rgba(239, 68, 68, 0.2);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #fca5a5;
}

/* Mobile Responsive */
@media (max-width: 480px) {
    #zencode-bot-container {
        bottom: 16px;
        right: 16px;
    }
    
    #zencode-bot-window {
        width: calc(100vw - 32px);
        height: calc(100vh - 120px);
        bottom: 70px;
        right: 0;
        border-radius: 12px;
    }
    
    #zencode-bot-toggle {
        width: 54px;
        height: 54px;
    }
}

/* Quick Action Buttons */
.quick-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
}

.quick-action-btn {
    background: rgba(168, 85, 247, 0.15);
    border: 1px solid rgba(168, 85, 247, 0.3);
    color: #a855f7;
    padding: 8px 14px;
    border-radius: 20px;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s;
}

.quick-action-btn:hover {
    background: rgba(168, 85, 247, 0.25);
    border-color: #a855f7;
}
