/* Chatbot Styles */
.chatbot-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 9999;
    font-family: 'Montserrat', sans-serif;
}

.chatbot-toggle {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, #1e40af 0%, #3b82f6 50%, #60a5fa 100%);
    border: none;
    cursor: pointer;
    box-shadow: 0 8px 25px rgba(59, 130, 246, 0.4);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 24px;
    animation: pulse 2s infinite;
}

.chatbot-toggle:hover {
    transform: scale(1.1);
    box-shadow: 0 12px 35px rgba(59, 130, 246, 0.6);
}

.chatbot-toggle.active {
    background: linear-gradient(135deg, #dc2626 0%, #ef4444 50%, #f87171 100%);
    animation: none;
}

@keyframes pulse {
    0% {
        box-shadow: 0 8px 25px rgba(59, 130, 246, 0.4);
    }
    50% {
        box-shadow: 0 8px 25px rgba(59, 130, 246, 0.8);
    }
    100% {
        box-shadow: 0 8px 25px rgba(59, 130, 246, 0.4);
    }
}

.chatbot-window {
    position: absolute;
    bottom: 80px;
    right: 0;
    width: 380px;
    height: 500px;
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
    transform: scale(0) translateY(20px);
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    overflow: hidden;
    border: 1px solid rgba(59, 130, 246, 0.2);
}

.chatbot-window.active {
    transform: scale(1) translateY(0);
    opacity: 1;
}

.chatbot-header {
    background: linear-gradient(135deg, #1e40af 0%, #3b82f6 100%);
    color: white;
    padding: 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.chatbot-header-info {
    display: flex;
    align-items: center;
}

.chatbot-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 12px;
    font-size: 18px;
}

.chatbot-title {
    font-weight: 600;
    font-size: 16px;
    margin: 0;
}

.chatbot-subtitle {
    font-size: 12px;
    opacity: 0.9;
    margin: 0;
}

.chatbot-close {
    background: none;
    border: none;
    color: white;
    font-size: 20px;
    cursor: pointer;
    padding: 5px;
    border-radius: 50%;
    transition: background 0.2s ease;
}

.chatbot-close:hover {
    background: rgba(255, 255, 255, 0.2);
}

.chatbot-messages {
    height: 340px;
    overflow-y: auto;
    padding: 20px;
    background: #f8fafc;
}

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

.chatbot-messages::-webkit-scrollbar-track {
    background: #f1f5f9;
}

.chatbot-messages::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 3px;
}

.message {
    margin-bottom: 15px;
    display: flex;
    align-items: flex-start;
}

.message.user {
    justify-content: flex-end;
}

.message-content {
    max-width: 80%;
    padding: 12px 16px;
    border-radius: 18px;
    font-size: 14px;
    line-height: 1.4;
    word-wrap: break-word;
}

.message.bot .message-content {
    background: white;
    color: #374151;
    border: 1px solid #e5e7eb;
    border-bottom-left-radius: 6px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.message.user .message-content {
    background: linear-gradient(135deg, #3b82f6 0%, #1e40af 100%);
    color: white;
    border-bottom-right-radius: 6px;
}

.message-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: linear-gradient(135deg, #3b82f6 0%, #1e40af 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 12px;
    margin-right: 8px;
    flex-shrink: 0;
}

.typing-indicator {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    background: white;
    border-radius: 18px;
    border-bottom-left-radius: 6px;
    border: 1px solid #e5e7eb;
    max-width: 80%;
}

.typing-dots {
    display: flex;
    gap: 4px;
}

.typing-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #9ca3af;
    animation: typing 1.4s infinite ease-in-out;
}

.typing-dot:nth-child(1) { animation-delay: -0.32s; }
.typing-dot:nth-child(2) { animation-delay: -0.16s; }

@keyframes typing {
    0%, 80%, 100% {
        transform: scale(0.8);
        opacity: 0.5;
    }
    40% {
        transform: scale(1);
        opacity: 1;
    }
}

.chatbot-input-container {
    padding: 20px;
    background: white;
    border-top: 1px solid #e5e7eb;
}

.chatbot-input-wrapper {
    display: flex;
    align-items: center;
    background: #f8fafc;
    border: 2px solid #e5e7eb;
    border-radius: 25px;
    padding: 8px 16px;
    transition: border-color 0.2s ease;
}

.chatbot-input-wrapper:focus-within {
    border-color: #3b82f6;
}

.chatbot-input {
    flex: 1;
    border: none;
    outline: none;
    background: transparent;
    font-size: 14px;
    padding: 6px 0;
    font-family: inherit;
}

.chatbot-send {
    background: linear-gradient(135deg, #3b82f6 0%, #1e40af 100%);
    border: none;
    color: white;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s ease;
    margin-left: 8px;
}

.chatbot-send:hover {
    transform: scale(1.1);
}

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

.quick-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
}

.quick-action {
    background: white;
    border: 1px solid #e5e7eb;
    color: #374151;
    padding: 8px 12px;
    border-radius: 20px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.quick-action:hover {
    background: #3b82f6;
    color: white;
    border-color: #3b82f6;
}

/* Mobile Responsive */
@media (max-width: 480px) {
    .chatbot-container {
        bottom: 15px;
        right: 15px;
    }
    
    .chatbot-window {
        width: calc(100vw - 30px);
        height: 70vh;
        max-height: 500px;
        bottom: 75px;
        right: -15px;
    }
    
    .chatbot-toggle {
        width: 55px;
        height: 55px;
        font-size: 22px;
    }
}

/* Welcome message animation */
.welcome-message {
    animation: slideInUp 0.5s ease-out;
}

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