/* VeriChain AI Chatbot Widget */

/* Chat Bubble Button */
.chat-bubble {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #5e5ce6 0%, #00ffa3 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(94, 92, 230, 0.4);
    transition: all 0.3s ease;
    z-index: 9998;
    border: 2px solid rgba(255, 255, 255, 0.1);
}

.chat-bubble:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 30px rgba(94, 92, 230, 0.6);
}

.chat-bubble i {
    color: white;
    width: 28px;
    height: 28px;
}

.chat-bubble.active {
    background: linear-gradient(135deg, #ff5f56 0%, #ff9500 100%);
}

/* Chat Window */
.chat-window {
    position: fixed;
    bottom: 6rem;
    right: 2rem;
    width: 400px;
    max-width: calc(100vw - 4rem);
    height: 600px;
    max-height: calc(100vh - 10rem);
    background: #1e1e2e;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    display: none;
    flex-direction: column;
    z-index: 9999;
    border: 1px solid rgba(255, 255, 255, 0.1);
    overflow: hidden;
}

.chat-window.active {
    display: flex;
    animation: slideUp 0.3s ease;
}

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

/* Chat Header */
.chat-header {
    background: linear-gradient(135deg, #5e5ce6 0%, #00ffa3 100%);
    padding: 1.25rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.chat-header-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.chat-avatar {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.chat-avatar i {
    color: white;
    width: 20px;
    height: 20px;
}

.chat-header-text h3 {
    color: white;
    font-size: 1rem;
    font-weight: 600;
    margin: 0;
}

.chat-header-text p {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.75rem;
    margin: 0;
}

.chat-close {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.chat-close:hover {
    background: rgba(255, 255, 255, 0.3);
}

.chat-close i {
    color: white;
    width: 18px;
    height: 18px;
}

/* Chat Messages */
.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    background: #1a1a2e;
}

.chat-messages::-webkit-scrollbar {
    width: 6px;
}

.chat-messages::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
}

.chat-messages::-webkit-scrollbar-thumb {
    background: rgba(94, 92, 230, 0.3);
    border-radius: 3px;
}

.chat-message {
    display: flex;
    gap: 0.75rem;
    animation: fadeIn 0.3s ease;
}

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

.chat-message.user {
    flex-direction: row-reverse;
}

.chat-message-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.chat-message.bot .chat-message-avatar {
    background: linear-gradient(135deg, #5e5ce6 0%, #00ffa3 100%);
}

.chat-message.user .chat-message-avatar {
    background: rgba(255, 255, 255, 0.1);
}

.chat-message-avatar i {
    color: white;
    width: 16px;
    height: 16px;
}

.chat-message-content {
    max-width: 75%;
}

.chat-message.user .chat-message-content {
    background: rgba(94, 92, 230, 0.2);
    border: 1px solid rgba(94, 92, 230, 0.3);
}

.chat-message.bot .chat-message-content {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.chat-message-bubble {
    padding: 0.75rem 1rem;
    border-radius: 12px;
    color: var(--text-primary);
    font-size: 0.875rem;
    line-height: 1.5;
}

.chat-message-time {
    font-size: 0.7rem;
    color: var(--text-muted);
    margin-top: 0.25rem;
    padding: 0 1rem;
}

/* Typing Indicator */
.typing-indicator {
    display: flex;
    gap: 0.25rem;
    padding: 0.75rem 1rem;
}

.typing-dot {
    width: 8px;
    height: 8px;
    background: var(--accent-teal);
    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;
}

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

/* Chat Input */
.chat-input-container {
    padding: 1rem;
    background: #1e1e2e;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.chat-input-wrapper {
    display: flex;
    gap: 0.75rem;
    align-items: center;
}

.chat-input {
    flex: 1;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 24px;
    padding: 0.75rem 1rem;
    color: var(--text-primary);
    font-size: 0.875rem;
    outline: none;
    transition: all 0.2s ease;
}

.chat-input:focus {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(94, 92, 230, 0.5);
}

.chat-input::placeholder {
    color: var(--text-muted);
}

.chat-send-btn {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #5e5ce6 0%, #00ffa3 100%);
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.chat-send-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(94, 92, 230, 0.4);
}

.chat-send-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.chat-send-btn i {
    color: white;
    width: 18px;
    height: 18px;
}

/* Quick Actions */
.chat-quick-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.quick-action-btn {
    background: rgba(94, 92, 230, 0.1);
    border: 1px solid rgba(94, 92, 230, 0.3);
    padding: 0.5rem 0.75rem;
    border-radius: 20px;
    color: var(--accent-purple);
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.quick-action-btn:hover {
    background: rgba(94, 92, 230, 0.2);
    border-color: rgba(94, 92, 230, 0.5);
}

/* Welcome Message */
.chat-welcome {
    text-align: center;
    padding: 2rem 1rem;
    color: var(--text-secondary);
}

.chat-welcome h4 {
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .chat-window {
        bottom: 5rem;
        right: 1rem;
        left: 1rem;
        width: auto;
        max-width: none;
    }
    
    .chat-bubble {
        bottom: 1rem;
        right: 1rem;
    }
}
