/* AI Chatbot Styles */
.chatbot-toggle {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #4CAF50, #2196F3);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    z-index: 9999;
    transition: all 0.3s ease;
    color: white;
    font-size: 1.5rem;
}

.chatbot-toggle:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 6px 25px rgba(0, 0, 0, 0.2);
}

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

.chatbot-notification {
    position: absolute;
    top: -5px;
    right: -5px;
    width: 20px;
    height: 20px;
    background: #ff4444;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: bold;
    color: white;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

.chatbot-container {
    position: fixed;
    bottom: 100px;
    right: 30px;
    width: 350px;
    height: 500px;
    background: white;
    border-radius: 15px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    z-index: 9998;
    display: flex;
    flex-direction: column;
    transform: translateY(100%) scale(0.8);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0.0, 0.2, 1);
    border: 1px solid #e0e0e0;
}

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

.chatbot-header {
    background: linear-gradient(135deg, #4CAF50, #2196F3);
    color: white;
    padding: 20px;
    border-radius: 15px 15px 0 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

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

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

.chatbot-header-text h3 {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 600;
}

.chatbot-status {
    margin: 0;
    font-size: 0.85rem;
    opacity: 0.9;
    display: flex;
    align-items: center;
    gap: 5px;
}

.chatbot-status::before {
    content: '';
    width: 8px;
    height: 8px;
    background: #4CAF50;
    border-radius: 50%;
    display: inline-block;
}

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

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

.chatbot-messages {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 15px;
    background: #f8f9fa;
}

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

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

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

.chatbot-message {
    display: flex;
    align-items: flex-end;
    gap: 10px;
    max-width: 85%;
    animation: slideIn 0.3s ease;
}

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

.user-message {
    align-self: flex-end;
    flex-direction: row-reverse;
}

.bot-message {
    align-self: flex-start;
}

.message-avatar {
    width: 30px;
    height: 30px;
    background: linear-gradient(135deg, #4CAF50, #2196F3);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 0.8rem;
    flex-shrink: 0;
}

.message-content {
    padding: 12px 16px;
    border-radius: 18px;
    font-size: 0.9rem;
    line-height: 1.4;
    word-wrap: break-word;
}

.user-message .message-content {
    background: linear-gradient(135deg, #4CAF50, #2196F3);
    color: white;
    margin-right: 0;
}

.bot-message .message-content {
    background: white;
    color: #333;
    border: 1px solid #e0e0e0;
    margin-left: 0;
}

.message-timestamp {
    font-size: 0.7rem;
    color: #999;
    margin-top: 2px;
    align-self: flex-end;
}

.chatbot-typing {
    padding: 10px 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    background: #f8f9fa;
    border-top: 1px solid #e0e0e0;
}

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

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

.typing-indicator span:nth-child(1) { animation-delay: -0.32s; }
.typing-indicator span: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-typing p {
    margin: 0;
    font-size: 0.8rem;
    color: #666;
    font-style: italic;
}

.chatbot-input-container {
    border-top: 1px solid #e0e0e0;
    background: white;
    border-radius: 0 0 15px 15px;
}

.chatbot-quick-buttons {
    padding: 15px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    border-bottom: 1px solid #e0e0e0;
}

.quick-button {
    padding: 6px 12px;
    background: #f0f0f0;
    border: 1px solid #ddd;
    border-radius: 15px;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.3s ease;
    color: #555;
}

.quick-button:hover {
    background: linear-gradient(135deg, #4CAF50, #2196F3);
    color: white;
    border-color: transparent;
    transform: translateY(-1px);
}

.chatbot-input {
    display: flex;
    padding: 15px;
    gap: 10px;
    align-items: center;
}

.chatbot-input input {
    flex: 1;
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 25px;
    outline: none;
    font-size: 0.9rem;
    transition: border-color 0.3s ease;
}

.chatbot-input input:focus {
    border-color: #4CAF50;
}

.chatbot-send {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #4CAF50, #2196F3);
    border: none;
    border-radius: 50%;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    font-size: 0.9rem;
}

.chatbot-send:hover {
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.chatbot-footer {
    padding: 10px;
    text-align: center;
    background: #f8f9fa;
    border-top: 1px solid #e0e0e0;
    border-radius: 0 0 15px 15px;
}

.chatbot-footer p {
    margin: 0;
    font-size: 0.7rem;
    color: #999;
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .chatbot-container {
        width: calc(100vw - 20px);
        height: calc(100vh - 120px);
        right: 10px;
        bottom: 80px;
        max-width: none;
        max-height: none;
    }
    
    .chatbot-toggle {
        bottom: 20px;
        right: 20px;
        width: 55px;
        height: 55px;
    }
    
    .chatbot-messages {
        padding: 15px;
    }
    
    .chatbot-message {
        max-width: 90%;
    }
    
    .quick-button {
        font-size: 0.75rem;
        padding: 5px 10px;
    }
}

@media (max-width: 480px) {
    .chatbot-container {
        width: calc(100vw - 10px);
        height: calc(100vh - 100px);
        right: 5px;
        bottom: 70px;
        border-radius: 10px;
    }
    
    .chatbot-header {
        padding: 15px;
        border-radius: 10px 10px 0 0;
    }
    
    .chatbot-input-container {
        border-radius: 0 0 10px 10px;
    }
}