/* AI Chatbot Styles for System Designer */
.chatbot-widget {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 10000;
    font-family: 'Space Grotesk', sans-serif;
    animation: chatbot-entrance 1.5s ease-out 2s both;
}

@keyframes chatbot-entrance {
    0% {
        opacity: 0;
        transform: translateY(120px) scale(0.2);
    }
    70% {
        opacity: 1;
        transform: translateY(-15px) scale(1.15);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.chatbot-button {
    width: 70px;
    height: 70px;
    background: linear-gradient(135deg, var(--neon-blue), var(--neon-purple));
    border-radius: 50%;
    border: none;
    cursor: pointer;
    box-shadow: 0 10px 30px rgba(0, 234, 255, 0.5);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-bg-dark);
    font-size: 1.8rem;
    position: relative;
    overflow: hidden;
    animation: gentle-breathing 5s ease-in-out infinite;
}

.chatbot-button:hover {
    transform: scale(1.1);
    box-shadow: 0 15px 40px rgba(0, 234, 255, 0.7);
}

.chatbot-icon {
    width: 40px;
    height: 40px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.chatbot-face {
    width: 32px;
    height: 32px;
    background: rgba(0, 0, 0, 0.8);
    border-radius: 50%;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: gentle-pulse 2.5s ease-in-out infinite;
}

.chatbot-face::before {
    content: '';
    position: absolute;
    top: 9px;
    left: 9px;
    width: 4px;
    height: 4px;
    background: var(--neon-blue);
    border-radius: 50%;
    box-shadow: 12px 0 0 var(--neon-blue);
    animation: blink 4s ease-in-out infinite;
}

.chatbot-face::after {
    content: '';
    position: absolute;
    bottom: 9px;
    left: 50%;
    transform: translateX(-50%);
    width: 12px;
    height: 6px;
    border: 2px solid var(--neon-green);
    border-top: none;
    border-radius: 0 0 12px 12px;
}

@keyframes gentle-pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.08); }
}

@keyframes gentle-breathing {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 10px 30px rgba(0, 234, 255, 0.5);
    }
    50% {
        transform: scale(1.03);
        box-shadow: 0 12px 35px rgba(0, 234, 255, 0.6);
    }
}

@keyframes blink {
    0%, 88%, 100% { opacity: 1; }
    94% { opacity: 0; }
}

.chat-interface {
    position: fixed;
    bottom: 120px;
    right: 30px;
    width: 380px;
    height: 500px;
    background: var(--glass-bg);
    backdrop-filter: blur(25px);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4), 0 0 0 3px rgba(0, 234, 255, 0.2);
    z-index: 9999;
    overflow: hidden;
    animation: chat-slide-up 0.3s ease-out;
}

@keyframes chat-slide-up {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.chat-header {
    background: linear-gradient(90deg, var(--neon-blue), var(--neon-purple));
    padding: 1rem;
    color: var(--primary-bg-dark);
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 700;
}

.chat-close {
    background: none;
    border: none;
    color: var(--primary-bg-dark);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.chat-close:hover {
    background: rgba(0, 0, 0, 0.2);
}

.chat-body {
    display: flex;
    flex-direction: column;
    height: calc(100% - 60px);
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.chat-message {
    padding: 0.8rem 1rem;
    border-radius: 15px;
    max-width: 85%;
    word-wrap: break-word;
    animation: message-slide 0.3s ease;
}

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

.chat-message.user {
    background: linear-gradient(90deg, var(--neon-blue), var(--neon-purple));
    color: var(--primary-bg-dark);
    align-self: flex-end;
    margin-left: auto;
}

.chat-message.bot {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
    align-self: flex-start;
}

.chat-input-area {
    padding: 1rem;
    border-top: 1px solid var(--glass-border);
    display: flex;
    gap: 0.5rem;
}

.chat-input {
    flex: 1;
    padding: 0.8rem;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--glass-border);
    border-radius: 25px;
    color: var(--text-primary);
    font-family: inherit;
}

.chat-input:focus {
    outline: none;
    border-color: var(--neon-blue);
    box-shadow: 0 0 0 2px rgba(0, 234, 255, 0.2);
}

.chat-send {
    padding: 0.8rem 1.5rem;
    background: linear-gradient(90deg, var(--neon-blue), var(--neon-purple));
    border: none;
    border-radius: 25px;
    color: var(--primary-bg-dark);
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
}

.chat-send:hover {
    transform: scale(1.05);
    box-shadow: 0 5px 15px rgba(0, 234, 255, 0.4);
}

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

/* Price Update Banner */
.price-update-banner {
    background: rgba(57, 255, 20, 0.1);
    border: 1px solid rgba(57, 255, 20, 0.3);
    padding: 0.8rem 1rem;
    border-radius: 10px;
    margin-bottom: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.price-update-text {
    color: var(--neon-green);
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.refresh-prices-btn {
    padding: 0.4rem 1rem;
    background: rgba(57, 255, 20, 0.1);
    border: 1px solid var(--neon-green);
    border-radius: 15px;
    color: var(--neon-green);
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.85rem;
    font-weight: 600;
}

.refresh-prices-btn:hover {
    background: rgba(57, 255, 20, 0.2);
    transform: translateY(-2px);
}

.refresh-prices-btn.loading {
    opacity: 0.6;
    cursor: not-allowed;
}
