/**
 * AI Chat System Styles
 *
 * Bu dosya AI Chat floating widget için gerekli tüm CSS stillerini içerir.
 * Component: resources/views/components/ai/floating-widget.blade.php
 *
 * İçerik:
 * 1. Alpine.js x-cloak utility
 * 2. AI Robot Button Animations (wiggle, bounce, pulse)
 * 3. AI Message Bubbles (user/assistant role colors)
 * 4. AI Product/Category Link Styles
 *
 * @version 1.0.0
 * @package AI Content System
 */

/* ========================================
   Alpine.js Utility
   ======================================== */
[x-cloak] {
    display: none !important;
}

/* ========================================
   AI Robot Button Animations
   ======================================== */

/* V1 Classic Pulse Animation */
.v1-classic-button::before {
    content: '';
    position: absolute;
    top: -5px;
    left: -5px;
    right: -5px;
    bottom: -5px;
    border-radius: 50%;
    background: inherit;
    z-index: -1;
    animation: pulse-v1 2s infinite;
}

@keyframes pulse-v1 {
    0%, 100% {
        transform: scale(1);
        opacity: 0.8;
    }
    50% {
        transform: scale(1.15);
        opacity: 0;
    }
}

/* Bubble Fade Animation */
@keyframes bubble-fade {
    0%, 100% {
        opacity: 0;
        transform: translateY(10px) scale(0.85);
    }
    20%, 80% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Wiggle Animation */
@keyframes wiggle {
    0%, 100% { transform: rotate(-5deg); }
    50% { transform: rotate(5deg); }
}

/* Slow Bounce Animation */
@keyframes bounce-slow {
    0%, 100% {
        transform: translateY(0);
        animation-timing-function: cubic-bezier(0.8, 0, 1, 1);
    }
    50% {
        transform: translateY(-15px);
        animation-timing-function: cubic-bezier(0, 0, 0.2, 1);
    }
}

/* Slow Pulse Animation */
@keyframes pulse-slow {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.6;
    }
}

/* Welcome Section Animations */
@keyframes ping-slow {
    0% {
        transform: scale(1);
        opacity: 0.5;
    }
    50% {
        transform: scale(1.3);
        opacity: 0.1;
    }
    100% {
        transform: scale(1.5);
        opacity: 0;
    }
}

@keyframes bounce-subtle {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-8px);
    }
}

@keyframes wiggle-subtle {
    0%, 100% {
        transform: rotate(0deg);
    }
    25% {
        transform: rotate(-3deg);
    }
    75% {
        transform: rotate(3deg);
    }
}

@keyframes fade-in-up {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Animation Utility Classes */
.animate-wiggle {
    animation: wiggle 2s ease-in-out infinite;
}

.animate-bounce-slow {
    animation: bounce-slow 3s ease-in-out infinite;
}

.animate-pulse-slow {
    animation: pulse-slow 4s ease-in-out infinite;
}

.animate-bubble-fade {
    animation: bubble-fade 3s infinite;
}

.animate-ping-slow {
    animation: ping-slow 3s cubic-bezier(0, 0, 0.2, 1) infinite;
}

.animate-bounce-subtle {
    animation: bounce-subtle 2s ease-in-out infinite;
}

.animate-wiggle-subtle {
    animation: wiggle-subtle 2.5s ease-in-out infinite;
}

.animate-fade-in-up {
    animation: fade-in-up 0.6s ease-out forwards;
}

.animation-delay-100 {
    animation-delay: 0.1s;
    opacity: 0;
}

/* Input Animations */
@keyframes input-invite {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(59, 130, 246, 0);
    }
    50% {
        transform: scale(1.02);
        box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.2);
    }
}

@keyframes pulse-glow {
    0%, 100% {
        transform: scale(1);
        opacity: 0.2;
    }
    50% {
        transform: scale(1.05);
        opacity: 0.3;
    }
}

.animate-input-invite {
    animation: input-invite 2s ease-in-out infinite;
}

.animate-pulse-glow {
    animation: pulse-glow 1.5s ease-in-out infinite;
}

/* ========================================
   AI Message Bubble Colors
   ======================================== */

/* USER MESSAGES - Always white text (both light and dark mode) */
.ai-floating-message-content[data-role="user"],
.ai-floating-message-content[data-role="user"] *,
.ai-floating-message-content[data-role="user"] p,
.ai-floating-message-content[data-role="user"] span,
.ai-floating-message-content[data-role="user"] strong,
.ai-floating-message-content[data-role="user"] em,
.ai-floating-message-content[data-role="user"] li,
.ai-floating-message-content[data-role="user"] ul,
.ai-floating-message-content[data-role="user"] ol,
.ai-floating-message-content[data-role="user"] h1,
.ai-floating-message-content[data-role="user"] h2,
.ai-floating-message-content[data-role="user"] h3 {
    color: white !important;
}

/* DARK MODE TEXT FIX - Assistant/System messages white in dark mode */
.dark .ai-floating-message-content[data-role="assistant"],
.dark .ai-floating-message-content[data-role="assistant"] *,
.dark .ai-floating-message-content[data-role="system"],
.dark .ai-floating-message-content[data-role="system"] * {
    color: white !important;
}

/* Links - Special colors */
.ai-floating-message-content[data-role="user"] a {
    color: rgba(255, 255, 255, 0.9) !important;
    text-decoration: underline;
}

.dark .ai-floating-message-content a {
    color: #fb923c !important; /* orange-400 */
}

/* ========================================
   AI Product/Category Link Styles
   ======================================== */

/* Product Links - Blue */
.ai-product-link {
    color: #2563eb !important;
    text-decoration: none !important;
    display: block;
    margin: 6px 0;
    transition: all 0.2s ease;
    line-height: 1.6;
}

.ai-product-link:hover {
    color: #1d4ed8 !important;
    text-decoration: underline !important;
}

/* Category Links - Green */
.ai-category-link {
    color: #059669 !important;
    text-decoration: none !important;
    display: block;
    margin: 6px 0;
    transition: all 0.2s ease;
    line-height: 1.6;
}

.ai-category-link:hover {
    color: #047857 !important;
    text-decoration: underline !important;
}

/* Bold text inside links */
.ai-product-link strong,
.ai-category-link strong {
    font-weight: 700;
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .ai-product-link {
        color: #60a5fa !important;
    }
    .ai-product-link:hover {
        color: #93c5fd !important;
    }
    .ai-category-link {
        color: #34d399 !important;
    }
    .ai-category-link:hover {
        color: #6ee7b7 !important;
    }
}
