/* AI Chatbot Styles */
.chatbot-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 1000;
    font-family: 'Poppins', Arial, sans-serif;
}

/* Chatbot Toggle Button */
.chatbot-toggle {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #72a1de, #5a8bc7);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(114, 161, 222, 0.4);
    transition: all 0.3s ease;
    animation: pulse 2s infinite;
}

.chatbot-toggle:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 25px rgba(114, 161, 222, 0.6);
}

.chatbot-toggle i {
    font-size: 24px;
    color: white;
}

@keyframes pulse {
    0% {
        box-shadow: 0 4px 20px rgba(114, 161, 222, 0.4);
    }
    50% {
        box-shadow: 0 4px 20px rgba(114, 161, 222, 0.8);
    }
    100% {
        box-shadow: 0 4px 20px rgba(114, 161, 222, 0.4);
    }
}

/* Chatbot Window */
.chatbot-window {
    position: absolute;
    bottom: 80px;
    right: 0;
    width: 350px;
    height: 500px;
    background: rgba(13, 25, 45, 0.95);
    border-radius: 20px;
    border: 1px solid rgba(114, 161, 222, 0.3);
    backdrop-filter: blur(10px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.3);
    display: none;
    flex-direction: column;
    overflow: hidden;
    transform: translateY(20px);
    opacity: 0;
    transition: all 0.3s ease;
}

.chatbot-window.open {
    display: flex;
    transform: translateY(0);
    opacity: 1;
}

/* Chatbot Header */
.chatbot-header {
    background: linear-gradient(135deg, #72a1de, #5a8bc7);
    padding: 15px 20px;
    display: flex;
    align-items: center;
    border-radius: 20px 20px 0 0;
}

.chatbot-avatar {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 12px;
}

.chatbot-avatar i {
    font-size: 20px;
    color: white;
}

.chatbot-info {
    flex: 1;
}

.chatbot-info h3 {
    margin: 0;
    color: white;
    font-size: 16px;
    font-weight: 600;
}

.chatbot-info span {
    color: rgba(255, 255, 255, 0.8);
    font-size: 12px;
}

.chatbot-close {
    background: none;
    border: none;
    color: white;
    font-size: 20px;
    cursor: pointer;
    padding: 5px;
    border-radius: 50%;
    transition: background 0.3s ease;
}

.chatbot-close:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* Messages Area */
.chatbot-messages {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    max-height: 350px;
}

.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: rgba(114, 161, 222, 0.5);
    border-radius: 3px;
}

.message {
    display: flex;
    margin-bottom: 15px;
    animation: fadeInUp 0.3s ease;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.message-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 10px;
    flex-shrink: 0;
}

.bot-message .message-avatar {
    background: linear-gradient(135deg, #72a1de, #5a8bc7);
}

.user-message .message-avatar {
    background: linear-gradient(135deg, #64ffda, #4fd1c7);
    order: 2;
    margin-right: 0;
    margin-left: 10px;
}

.message-avatar i {
    font-size: 16px;
    color: white;
}

.message-content {
    background: rgba(255, 255, 255, 0.1);
    padding: 10px 15px;
    border-radius: 15px;
    max-width: 80%;
    word-wrap: break-word;
}

.bot-message .message-content {
    border-bottom-left-radius: 5px;
}

.user-message .message-content {
    background: linear-gradient(135deg, #72a1de, #5a8bc7);
    border-bottom-right-radius: 5px;
    order: 1;
}

.message-content p {
    margin: 0;
    color: white;
    font-size: 14px;
    line-height: 1.4;
}

/* Input Area */
.chatbot-input {
    padding: 15px 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    gap: 10px;
}

.chatbot-input input {
    flex: 1;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 25px;
    padding: 10px 15px;
    color: white;
    font-size: 14px;
    outline: none;
    transition: all 0.3s ease;
}

.chatbot-input input::placeholder {
    color: rgba(255, 255, 255, 0.6);
}

.chatbot-input input:focus {
    border-color: #72a1de;
    box-shadow: 0 0 0 2px rgba(114, 161, 222, 0.2);
}

.chatbot-input button {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #72a1de, #5a8bc7);
    border: none;
    border-radius: 50%;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.chatbot-input button:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 15px rgba(114, 161, 222, 0.4);
}

.chatbot-input button i {
    font-size: 16px;
}

/* Typing Indicator */
.chatbot-typing {
    padding: 10px 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    color: rgba(255, 255, 255, 0.7);
    font-size: 12px;
}

.typing-indicator {
    display: flex;
    gap: 4px;
}

.typing-indicator span {
    width: 6px;
    height: 6px;
    background: #72a1de;
    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.5;
    }
    30% {
        transform: translateY(-10px);
        opacity: 1;
    }
}

/* Mobile Responsive */
@media (max-width: 480px) {
    .chatbot-container {
        bottom: 15px;
        right: 15px;
    }
    
    .chatbot-window {
        width: calc(100vw - 30px);
        right: -15px;
        height: 400px;
    }
    
    .chatbot-toggle {
        width: 50px;
        height: 50px;
    }
    
    .chatbot-toggle i {
        font-size: 20px;
    }
    
    .chatbot-messages {
        max-height: 250px;
    }
}

/* Hidden state */
.chatbot-window.closing {
    animation: slideOut 0.3s ease forwards;
}

@keyframes slideOut {
    to {
        transform: translateY(20px);
        opacity: 0;
    }
}
