/* AI Chatbot Animation Styles - Updated with unique class names */

/* Hero Animation Container */
.hero-animation {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    max-width: 550px;
    height: 400px;
    margin-left: 2rem;
}

/* Main AI Chatbot Container */
.ai-chatbot-container {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 500px;
}

/* AI Chatbot Window */
.ai-chatbot-window {
    background: white;
    border-radius: 20px;
    width: 350px;
    height: 500px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    position: relative;
    z-index: 10;
    visibility: visible !important;
    opacity: 1 !important;
}

@keyframes ai-chatbotFloat {

    0%,
    100% {
        transform: translateY(0px) rotate(0deg);
    }

    25% {
        transform: translateY(-10px) rotate(0.5deg);
    }

    50% {
        transform: translateY(-5px) rotate(0deg);
    }

    75% {
        transform: translateY(-15px) rotate(-0.5deg);
    }
}

/* AI Chatbot Header - Removed */



@keyframes ai-avatarPulse {

    0%,
    100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(255, 0, 102, 0.4);
    }

    50% {
        transform: scale(1.05);
        box-shadow: 0 0 0 8px rgba(255, 0, 102, 0);
    }
}

.ai-chatbot-info {
    flex: 1;
}

.ai-chatbot-name {
    color: #1e293b;
    font-weight: 600;
    font-size: 14px;
    margin-bottom: 2px;
}

.ai-chatbot-status {
    color: #10b981;
    font-size: 12px;
    font-weight: 500;
}

.ai-chatbot-controls {
    display: flex;
    gap: 6px;
}

.ai-control-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #cbd5e1;
    animation: ai-controlBlink 2s ease-in-out infinite;
}

.ai-control-dot:nth-child(2) {
    animation-delay: 0.3s;
}

.ai-control-dot:nth-child(3) {
    animation-delay: 0.6s;
}

@keyframes ai-controlBlink {

    0%,
    100% {
        opacity: 0.3;
    }

    50% {
        opacity: 1;
    }
}

/* AI Chatbot Messages */
.ai-chatbot-messages {
    flex: 1;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 15px;
    overflow-y: hidden;
    scrollbar-width: none;
    -ms-overflow-style: none;
    min-height: 200px;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
}

/* Disable scrolling during animation */
.ai-chatbot-messages.animation-in-progress {
    overflow-y: hidden !important;
    pointer-events: none !important;
}

/* Enable scrolling after animation completes */
.ai-chatbot-messages.animation-complete {
    overflow-y: auto !important;
    pointer-events: auto !important;
}

/* Tab chatbot messages - allow scrolling */
.tab-chatbot-messages {
    overflow-y: auto !important;
    pointer-events: auto !important;
}

.ai-chatbot-messages::-webkit-scrollbar {
    display: none;
}

.ai-message {
    max-width: 80%;
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.5s ease-out;
}

/* Show message when it becomes visible */
.ai-message.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Hide user message content initially for typing effect */
.ai-user-message .ai-message-content {
    opacity: 0;
    transition: opacity 0.3s ease;
}

/* Show user message content in tab content (no typing effect) */
.tab-content .ai-user-message .ai-message-content {
    opacity: 1 !important;
}

/* Hide timestamps initially */
.ai-message-time {
    opacity: 0;
    transition: opacity 0.3s ease;
}

/* Show timestamps in tab content */
.tab-content .ai-message-time {
    opacity: 1 !important;
}

/* Show user message content only when typing starts */
.ai-user-message.typing .ai-message-content {
    opacity: 1 !important;
}

/* Keep user message content visible after typing completes */
.ai-user-message.typing-complete .ai-message-content {
    opacity: 1 !important;
}

/* Show timestamp after typing completes */
.ai-message.typing-complete .ai-message-time {
    opacity: 1;
}

/* Remove old animation delays - let JavaScript handle timing */

/* Auto-scroll handled by JavaScript - removed conflicting CSS animation */

@keyframes ai-messageSlideIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Typing effect for user messages only */
.ai-user-message .ai-message-content {
    position: relative;
    min-height: 40px;
    /* Ensure minimum height to prevent size changes */
    display: flex;
    align-items: center;
    width: fit-content;
    /* Allow content to grow naturally */
    max-width: 100%;
    /* But don't exceed container width */
    box-sizing: border-box;
    /* Include padding and border in width calculation */
}

/* Cursor effect removed - no more blinking cursor */

/* Ensure message content grows naturally during typing */
.ai-user-message.typing .ai-message-content {
    min-height: 40px;
    height: auto;
    width: fit-content;
    max-width: 100%;
    box-sizing: border-box;
}

@keyframes ai-cursorBlink {

    0%,
    50% {
        opacity: 1;
    }

    51%,
    100% {
        opacity: 0;
    }
}

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

.ai-user-message {
    align-self: flex-end;
}

.ai-message-content {
    background: #f1f5f9;
    padding: 12px 16px;
    border-radius: 18px;
    color: #1e293b;
    font-size: 14px;
    line-height: 1.4;
    border: 1px solid #e2e8f0;
}

.ai-user-message .ai-message-content {
    background: linear-gradient(135deg, #ff0066, #9900ff);
    border: none;
    color: white;
}

.ai-message-time {
    font-size: 11px;
    color: #64748b;
    margin-top: 4px;
    text-align: right;
}

.ai-bot-message .ai-message-time {
    text-align: left;
}

/* AI Typing Indicator */
.ai-typing-indicator {
    display: flex;
    gap: 4px;
    padding: 12px 16px;
    background: #f1f5f9;
    border-radius: 18px;
    border: 1px solid #e2e8f0;
}

.ai-typing-indicator span {
    width: 8px;
    height: 8px;
    background: #64748b;
    border-radius: 50%;
    animation: ai-typingBounce 1.4s ease-in-out infinite;
}

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

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

@keyframes ai-typingBounce {

    0%,
    60%,
    100% {
        transform: translateY(0);
        opacity: 0.7;
    }

    30% {
        transform: translateY(-10px);
        opacity: 1;
    }
}

/* AI Chatbot Input - Removed */

/* AI Floating Elements */
.ai-floating-elements {
    position: absolute;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.ai-floating-icon {
    position: absolute;
    width: 50px;
    height: 50px;
    animation: ai-floatingMove 8s ease-in-out infinite;
}

.ai-icon-1 {
    top: 10%;
    left: -10%;
    animation-delay: 0s;
}

.ai-icon-2 {
    top: 20%;
    right: -15%;
    animation-delay: 2s;
}

.ai-icon-3 {
    bottom: 30%;
    left: -8%;
    animation-delay: 4s;
}

.ai-icon-4 {
    bottom: 10%;
    right: -12%;
    animation-delay: 6s;
}

@keyframes ai-floatingMove {

    0%,
    100% {
        transform: translateY(0px) rotate(0deg);
        opacity: 0.7;
    }

    25% {
        transform: translateY(-20px) rotate(5deg);
        opacity: 1;
    }

    50% {
        transform: translateY(-10px) rotate(0deg);
        opacity: 0.8;
    }

    75% {
        transform: translateY(-30px) rotate(-5deg);
        opacity: 1;
    }
}

/* AI Data Streams - Full Background Coverage */
.ai-data-streams {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    pointer-events: none;
    overflow: hidden;
    z-index: 1;
}

/* Ensure main content appears above background streams */
.hero,
.advanced-features,
.interactive-features,
.partners-section,
.stats-section,
#demo,
.contact-section {
    position: relative;
    z-index: 10;
}

.ai-data-stream {
    position: absolute;
    height: 2px;
    background: linear-gradient(90deg, transparent, rgba(255, 0, 102, 0.4), transparent);
    animation: ai-dataFlow 6s linear infinite;
}

/* Vary animation durations for more dynamic effect */
.ai-stream-1,
.ai-stream-4,
.ai-stream-7,
.ai-stream-10,
.ai-stream-13,
.ai-stream-16,
.ai-stream-19,
.ai-stream-22 {
    animation-duration: 8s;
}

.ai-stream-2,
.ai-stream-5,
.ai-stream-8,
.ai-stream-11,
.ai-stream-14,
.ai-stream-17,
.ai-stream-20,
.ai-stream-23 {
    animation-duration: 5s;
}

.ai-stream-3,
.ai-stream-6,
.ai-stream-9,
.ai-stream-12,
.ai-stream-15,
.ai-stream-18,
.ai-stream-21,
.ai-stream-24 {
    animation-duration: 7s;
}

.ai-stream-1 {
    top: 15%;
    left: -100%;
    width: 300px;
    animation-delay: 0s;
}

.ai-stream-2 {
    top: 35%;
    left: -100%;
    width: 250px;
    animation-delay: 2s;
    background: linear-gradient(90deg, transparent, rgba(153, 0, 255, 0.4), transparent);
}

.ai-stream-3 {
    top: 55%;
    left: -100%;
    width: 280px;
    animation-delay: 4s;
    background: linear-gradient(90deg, transparent, rgba(50, 221, 227, 0.4), transparent);
}

/* Additional streams for better coverage */
.ai-stream-4 {
    top: 75%;
    left: -100%;
    width: 200px;
    animation-delay: 1s;
    background: linear-gradient(90deg, transparent, rgba(255, 165, 0, 0.4), transparent);
}

.ai-stream-5 {
    top: 25%;
    left: -100%;
    width: 320px;
    animation-delay: 3.5s;
    background: linear-gradient(90deg, transparent, rgba(34, 197, 94, 0.4), transparent);
}

.ai-stream-6 {
    top: 45%;
    left: -100%;
    width: 180px;
    animation-delay: 0.5s;
    background: linear-gradient(90deg, transparent, rgba(236, 72, 153, 0.3), transparent);
}

.ai-stream-7 {
    top: 65%;
    left: -100%;
    width: 350px;
    animation-delay: 2.5s;
    background: linear-gradient(90deg, transparent, rgba(59, 130, 246, 0.3), transparent);
}

.ai-stream-8 {
    top: 5%;
    left: -100%;
    width: 150px;
    animation-delay: 4.5s;
    background: linear-gradient(90deg, transparent, rgba(168, 85, 247, 0.3), transparent);
}

.ai-stream-9 {
    top: 85%;
    left: -100%;
    width: 280px;
    animation-delay: 1.8s;
    background: linear-gradient(90deg, transparent, rgba(245, 158, 11, 0.3), transparent);
}

.ai-stream-10 {
    top: 12%;
    left: -100%;
    width: 220px;
    animation-delay: 3.2s;
    background: linear-gradient(90deg, transparent, rgba(16, 185, 129, 0.3), transparent);
}

.ai-stream-11 {
    top: 38%;
    left: -100%;
    width: 190px;
    animation-delay: 0.8s;
    background: linear-gradient(90deg, transparent, rgba(239, 68, 68, 0.3), transparent);
}

.ai-stream-12 {
    top: 68%;
    left: -100%;
    width: 260px;
    animation-delay: 4.2s;
    background: linear-gradient(90deg, transparent, rgba(139, 92, 246, 0.3), transparent);
}

/* Additional streams for enhanced coverage */
.ai-stream-13 {
    top: 8%;
    left: -100%;
    width: 180px;
    animation: ai-dataPulse 8s linear infinite;
    animation-delay: 1.2s;
    background: linear-gradient(90deg, transparent, rgba(255, 99, 132, 0.4), transparent);
}

.ai-stream-14 {
    top: 22%;
    right: -100%;
    left: auto;
    width: 320px;
    animation: ai-dataFlowReverse 5s linear infinite;
    animation-delay: 3.8s;
    background: linear-gradient(90deg, transparent, rgba(99, 102, 241, 0.3), transparent);
}

.ai-stream-15 {
    top: 42%;
    left: -100%;
    width: 140px;
    animation-delay: 0.3s;
    background: linear-gradient(90deg, transparent, rgba(34, 197, 94, 0.4), transparent);
}

.ai-stream-16 {
    top: 58%;
    right: -100%;
    left: auto;
    width: 290px;
    animation: ai-dataFlowReverse 8s linear infinite;
    animation-delay: 2.7s;
    background: linear-gradient(90deg, transparent, rgba(251, 146, 60, 0.3), transparent);
}

.ai-stream-17 {
    top: 78%;
    left: -100%;
    width: 210px;
    animation-delay: 4.8s;
    background: linear-gradient(90deg, transparent, rgba(168, 85, 247, 0.4), transparent);
}

.ai-stream-18 {
    top: 18%;
    left: -100%;
    width: 160px;
    animation-delay: 1.7s;
    background: linear-gradient(90deg, transparent, rgba(6, 182, 212, 0.3), transparent);
}

.ai-stream-19 {
    top: 32%;
    left: -100%;
    width: 340px;
    animation: ai-dataPulse 8s linear infinite;
    animation-delay: 0.9s;
    background: linear-gradient(90deg, transparent, rgba(245, 101, 101, 0.3), transparent);
}

.ai-stream-20 {
    top: 48%;
    left: -100%;
    width: 170px;
    animation-delay: 3.1s;
    background: linear-gradient(90deg, transparent, rgba(16, 185, 129, 0.4), transparent);
}

.ai-stream-21 {
    top: 62%;
    left: -100%;
    width: 300px;
    animation-delay: 2.1s;
    background: linear-gradient(90deg, transparent, rgba(139, 69, 19, 0.3), transparent);
}

.ai-stream-22 {
    top: 82%;
    right: -100%;
    left: auto;
    width: 190px;
    animation: ai-dataFlowReverse 5s linear infinite;
    animation-delay: 4.1s;
    background: linear-gradient(90deg, transparent, rgba(147, 51, 234, 0.3), transparent);
}

.ai-stream-23 {
    top: 12%;
    left: -100%;
    width: 250px;
    animation-delay: 0.6s;
    background: linear-gradient(90deg, transparent, rgba(59, 130, 246, 0.4), transparent);
}

.ai-stream-24 {
    top: 72%;
    left: -100%;
    width: 220px;
    animation-delay: 3.4s;
    background: linear-gradient(90deg, transparent, rgba(236, 72, 153, 0.4), transparent);
}

@keyframes ai-dataFlow {
    0% {
        left: -100%;
        opacity: 0;
    }

    10% {
        opacity: 1;
    }

    90% {
        opacity: 1;
    }

    100% {
        left: 100%;
        opacity: 0;
    }
}

/* Reverse flow animation for some streams */
@keyframes ai-dataFlowReverse {
    0% {
        right: -100%;
        left: auto;
        opacity: 0;
    }

    10% {
        opacity: 1;
    }

    90% {
        opacity: 1;
    }

    100% {
        right: 100%;
        left: auto;
        opacity: 0;
    }
}

/* Pulsing animation for some streams */
@keyframes ai-dataPulse {
    0% {
        left: -100%;
        opacity: 0;
        transform: scaleY(1);
    }

    10% {
        opacity: 1;
    }

    50% {
        transform: scaleY(1.5);
    }

    90% {
        opacity: 1;
        transform: scaleY(1);
    }

    100% {
        left: 100%;
        opacity: 0;
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .hero-animation {
        margin-left: 0;
        margin-top: 0;
        max-width: 100%;
        height: 350px;
        padding: 0 1rem;
        display: flex;
        justify-content: center;
        align-items: center;
    }

    .ai-chatbot-container {
        min-height: 350px;
        width: 100%;
        justify-content: center;
        align-items: center;
        display: flex;
    }

    .ai-chatbot-window {
        width: 350px;
        height: 420px;
        margin: 0 auto;
        flex-shrink: 0;
    }

    .ai-chatbot-messages {
        padding: 15px;
        gap: 12px;
        height: calc(100% - 0px);
        display: flex;
        flex-direction: column;
        overflow-y: hidden;
        pointer-events: none;
    }

    /* Disable scrolling during animation on mobile */
    .ai-chatbot-messages.animation-in-progress {
        overflow-y: hidden !important;
        pointer-events: none !important;
    }

    /* Enable scrolling after animation completes on mobile */
    .ai-chatbot-messages.animation-complete {
        overflow-y: auto !important;
        pointer-events: auto !important;
    }

    /* Keep tab chatbot scrollable on mobile */
    .tab-chatbot-messages {
        overflow-y: auto !important;
        pointer-events: auto !important;
    }

    .ai-message {
        max-width: 85%;
    }

    .ai-message-content {
        font-size: 14px;
        padding: 12px 16px;
        line-height: 1.4;
    }

    .ai-message-time {
        font-size: 11px;
    }

    .ai-floating-icon {
        width: 40px;
        height: 40px;
    }
}

@media (max-width: 480px) {
    .hero-animation {
        height: 300px;
        padding: 0 0.5rem;
        display: flex;
        justify-content: center;
        align-items: center;
    }

    .ai-chatbot-container {
        min-height: 300px;
        align-items: center;
        justify-content: center;
        display: flex;
    }

    .ai-chatbot-window {
        width: 300px;
        height: 380px;
        margin: 0 auto;
        flex-shrink: 0;
    }

    .ai-chatbot-messages {
        padding: 12px;
        gap: 10px;
        height: calc(100% - 0px);
        overflow-y: hidden;
        pointer-events: none;
    }

    /* Disable scrolling during animation on small mobile */
    .ai-chatbot-messages.animation-in-progress {
        overflow-y: hidden !important;
        pointer-events: none !important;
    }

    /* Enable scrolling after animation completes on small mobile */
    .ai-chatbot-messages.animation-complete {
        overflow-y: auto !important;
        pointer-events: auto !important;
    }

    /* Keep tab chatbot scrollable on small mobile */
    .tab-chatbot-messages {
        overflow-y: auto !important;
        pointer-events: auto !important;
    }

    .ai-message {
        max-width: 90%;
    }

    .ai-message-content {
        font-size: 13px;
        padding: 10px 14px;
        line-height: 1.4;
    }

    .ai-message-time {
        font-size: 10px;
    }
}

/* Additional Animation Effects */
.ai-chatbot-window::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, transparent 30%, rgba(255, 255, 255, 0.05) 50%, transparent 70%);
    pointer-events: none;
}

@keyframes ai-shimmer {
    0% {
        transform: translateX(-100%);
    }

    100% {
        transform: translateX(100%);
    }
}

/* Remove old message animation overrides - using new sequential system */