/* Custom styles for the chatbot */

/* Smooth transitions */
* {
    transition: all 0.3s ease;
}

/* Custom scrollbar for chat */
#chatMessages::-webkit-scrollbar {
    width: 6px;
}

#chatMessages::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

#chatMessages::-webkit-scrollbar-thumb {
    background: #cd0313;
    border-radius: 3px;
}

#chatMessages::-webkit-scrollbar-thumb:hover {
    background: #a00210;
}

/* Message animations */
.message-bubble {
    animation: slideInUp 0.4s ease-out;
}

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

/* Typing indicator animation */
.typing-indicator .animate-bounce {
    animation: bounce 1.4s infinite;
}

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

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

@keyframes bounce {
    0%, 80%, 100% {
        transform: scale(0);
    }
    40% {
        transform: scale(1);
    }
}

/* Button hover effects */
.btn-hover {
    transition: all 0.3s ease;
}

.btn-hover:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(205, 3, 19, 0.3);
}

/* Input focus effects */
#messageInput {
    transition: all 0.3s ease;
}

#messageInput:focus {
    transform: scale(1.02);
    box-shadow: 0 0 0 3px rgba(205, 3, 19, 0.1);
}

/* Chat container styling */
.chat-container {
    background: linear-gradient(135deg, #f9f9f9 0%, #ffffff 50%, #f5f5f5 100%);
    min-height: 100vh;
}

/* Welcome section styling */
.welcome-section {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    border: 1px solid #e9ecef;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

/* Chat header gradient */
.chat-header {
    background: linear-gradient(135deg, #cd0313 0%, #a00210 100%);
}

/* Message styling */
.bot-message {
    background: #F02323;
    color: white!important;
    border: 1px solid #F02323;
}

.user-message {
    background: linear-gradient(135deg, #fef2f2 0%, #fee2e2 100%);
    border: 1px solid #fecaca;
}

/* Avatar styling */
.avatar {
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Responsive design */
@media (max-width: 768px) {
    .chat-container {
        padding: 1rem;
    }
    
    .message-bubble {
        max-width: 85%;
    }
    
    #messageInput {
        font-size: 16px; /* Prevents zoom on iOS */
    }
}

@media (max-width: 480px) {
    .welcome-section {
        padding: 1rem;
    }
    
    .chat-header h1 {
        font-size: 1rem;
    }
    
    .message-bubble {
        max-width: 90%;
    }
}

/* Loading animation for images */
.recipe-image {
    opacity: 0;
    transition: opacity 0.5s ease;
}

.recipe-image.loaded {
    opacity: 1;
}

/* Pulse animation for send button */
.send-button {
    transition: all 0.3s ease;
}

.send-button:hover {
    background-color: #fef2f2;
    transform: scale(1.1);
}

.send-button:active {
    transform: scale(0.95);
}

/* Custom focus styles */
.focus\:ring-red-500:focus {
    --tw-ring-color: rgba(239, 68, 68, 0.5);
}

/* Gradient text for special messages */
.gradient-text {
    background: linear-gradient(135deg, #cd0313 0%, #ef4444 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Shadow effects */
.shadow-custom {
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

.shadow-custom-lg {
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

/* Backdrop blur effect */
.backdrop-blur {
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

/* Custom border radius */
.rounded-custom {
    border-radius: 1.5rem;
}

/* Elefante brand colors */
.bg-elefante-red {
    background-color: #cd0313;
}

.text-elefante-red {
    color: #cd0313;
}

.border-elefante-red {
    border-color: #cd0313;
}

/* Smooth page transitions */
body {
    opacity: 0;
    animation: fadeIn 0.5s ease-in forwards;
}

@keyframes fadeIn {
    to {
        opacity: 1;
    }
}

/* Print styles */
@media print {
    .no-print {
        display: none;
    }
    
    body {
        background: white;
    }
    
    .chat-container {
        background: white;
    }
}