/* Portfolio Chatbot Styles */

.chatbot-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 9999;
    font-family: 'Poppins', sans-serif;
}

/* Chat Toggle Button */
.chatbot-toggle {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: var(--accent, #64ffda);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 20px rgba(100, 255, 218, 0.4);
    transition: all 0.3s ease;
}

.chatbot-toggle:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 30px rgba(100, 255, 218, 0.5);
}

.chatbot-toggle svg {
    width: 28px;
    height: 28px;
    color: #0a192f;
}

.chatbot-toggle.active {
    background: #ef4444;
}

.chatbot-toggle.active svg {
    color: white;
}

/* Chat Window */
.chatbot-window {
    position: absolute;
    bottom: 75px;
    right: 0;
    width: 350px;
    max-height: 500px;
    background: #112240;
    border: 1px solid rgba(100, 255, 218, 0.2);
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
    display: none;
    flex-direction: column;
    overflow: hidden;
}

.chatbot-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 */
.chatbot-header {
    background: #0a192f;
    padding: 15px 20px;
    border-bottom: 1px solid rgba(100, 255, 218, 0.2);
    display: flex;
    align-items: center;
    gap: 12px;
}

.chatbot-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, #64ffda, #4facfe);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    color: #0a192f;
    font-size: 1.1rem;
}

.chatbot-info h4 {
    margin: 0;
    color: #e6f1ff;
    font-size: 0.95rem;
    font-weight: 600;
}

.chatbot-info span {
    color: #64ffda;
    font-size: 0.75rem;
}

/* Chat Messages */
.chatbot-messages {
    flex: 1;
    padding: 15px;
    overflow-y: auto;
    max-height: 300px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.chat-message {
    max-width: 85%;
    padding: 10px 14px;
    border-radius: 12px;
    font-size: 0.9rem;
    line-height: 1.5;
    animation: fadeIn 0.3s ease;
}

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

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.chat-message.bot {
    background: rgba(100, 255, 218, 0.1);
    color: #ccd6f6;
    align-self: flex-start;
    border-bottom-left-radius: 4px;
}

.chat-message.user {
    background: #64ffda;
    color: #0a192f;
    align-self: flex-end;
    border-bottom-right-radius: 4px;
}

.chat-message a {
    color: #64ffda;
    text-decoration: underline;
}

.chat-message.bot a {
    color: #64ffda;
}

.chat-message.user a {
    color: #0a192f;
}

/* Quick Replies */
.quick-replies {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 10px 15px;
    border-top: 1px solid rgba(100, 255, 218, 0.1);
    background: rgba(10, 25, 47, 0.5);
}

.quick-reply {
    background: transparent;
    border: 1px solid rgba(100, 255, 218, 0.3);
    color: #64ffda;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.quick-reply:hover {
    background: rgba(100, 255, 218, 0.1);
    border-color: #64ffda;
}

/* Chat Input */
.chatbot-input {
    display: flex;
    padding: 12px 15px;
    border-top: 1px solid rgba(100, 255, 218, 0.2);
    background: #0a192f;
    gap: 10px;
}

.chatbot-input input {
    flex: 1;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(100, 255, 218, 0.2);
    border-radius: 8px;
    padding: 10px 14px;
    color: #e6f1ff;
    font-size: 0.9rem;
    outline: none;
    transition: border-color 0.2s ease;
}

.chatbot-input input::placeholder {
    color: #8892b0;
}

.chatbot-input input:focus {
    border-color: #64ffda;
}

.chatbot-input button {
    background: #64ffda;
    border: none;
    border-radius: 8px;
    width: 42px;
    height: 42px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.chatbot-input button:hover {
    background: #4fd1b5;
    transform: scale(1.05);
}

.chatbot-input button svg {
    width: 18px;
    height: 18px;
    color: #0a192f;
}

/* Typing Indicator */
.typing-indicator {
    display: flex;
    gap: 4px;
    padding: 10px 14px;
    background: rgba(100, 255, 218, 0.1);
    border-radius: 12px;
    align-self: flex-start;
    border-bottom-left-radius: 4px;
}

.typing-indicator span {
    width: 8px;
    height: 8px;
    background: #64ffda;
    border-radius: 50%;
    animation: bounce 1.4s infinite ease-in-out;
}

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

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

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

@keyframes bounce {

    0%,
    80%,
    100% {
        transform: scale(0);
        opacity: 0.5;
    }

    40% {
        transform: scale(1);
        opacity: 1;
    }
}

/* Mobile Responsive */
@media (max-width: 480px) {
    .chatbot-window {
        width: calc(100vw - 40px);
        right: -10px;
        max-height: 70vh;
    }

    .chatbot-toggle {
        width: 55px;
        height: 55px;
    }
}