/* Custom styles for AI Contact Page */

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

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

#chatMessages::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
}

#chatMessages::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.3);
    border-radius: 3px;
}

#chatMessages::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.5);
}

/* Auto-resize textarea */
#userInput {
    min-height: 56px;
    max-height: 150px;
    transition: height 0.2s ease;
}

/* Message animations */
.message-enter {
    animation: messageSlideIn 0.3s ease-out;
}

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

/* Typing indicator animation */
.typing-indicator {
    animation: typingPulse 1.4s infinite ease-in-out;
}

@keyframes typingPulse {
    0%, 80%, 100% {
        opacity: 0.3;
    }
    40% {
        opacity: 1;
    }
}

/* Gradient background animation */
body {
    background: linear-gradient(-45deg, #1a2236, #1c4887, #a6b3ca, #273044);
    background-size: 400% 400%;
    animation: gradientShift 15s ease infinite;
}

@keyframes gradientShift {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

/* Glass morphism effect enhancement */
.glass-effect {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

/* Hover effects for interactive elements */
.hover-lift {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.hover-lift:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
}

/* Focus states for accessibility */
textarea:focus,
button:focus {
    outline: 2px solid #3b82f6;
    outline-offset: 2px;
}

/* Mobile-specific optimizations */
@media (max-width: 768px) {
    #chatMessages {
        height: 330px;
    }
    
    .message-container {
        max-width: 85%;
    }
    
    #userInput {
        font-size: 16px; /* Prevents zoom on iOS */
    }
}

/* Loading animation styles */
.loading-dots {
    display: inline-block;
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background-color: #ffffff;
    animation: loadingDots 1.4s infinite ease-in-out both;
}

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

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

/* Message bubble styles */
.user-message {
    background: linear-gradient(135deg, #bac2e9 0%, #f7f7f8 100%);
    color: rgb(35, 33, 33);
    margin-left: auto;
    border-radius: 20px 20px 4px 20px;
    box-shadow: 0 4px 12px rgba(152, 164, 217, 0.3);
}

.ai-message {
    background: rgba(74, 153, 237, 0.95);
    color: #e6e6eb;
    border-radius: 20px 20px 20px 4px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
}

/* Pulse animation for send button when disabled */
button:disabled {
    animation: none;
}

button:not(:disabled):hover {
    transform: scale(1.05);
    box-shadow: 0 8px 20px rgba(59, 130, 246, 0.4);
}

/* Responsive typography */
@media (max-width: 640px) {
    .hero-title {
        font-size: 2.5rem;
        line-height: 1.2;
    }
    
    .hero-subtitle {
        font-size: 1.125rem;
    }
}

/* Custom animations for features section */
.feature-card {
    transition: all 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-5px);
    background: rgba(255, 255, 255, 0.2);
}

/* Floating label effect for textarea (optional enhancement) */
.input-container {
    position: relative;
}

.floating-label {
    position: absolute;
    top: 16px;
    left: 16px;
    color: #9ca3af;
    transition: all 0.2s ease;
    pointer-events: none;
}

.input-container textarea:focus ~ .floating-label,
.input-container textarea:not(:placeholder-shown) ~ .floating-label {
    transform: translateY(-24px) scale(0.8);
    color: #3b82f6;
}