/**
 * CODDB Chat System - Animations and Transitions
 * Handles all animations, keyframes, and visual effects
 */

/* ================================
   MAIN ANIMATIONS
   ================================ */

@keyframes coddb_pulse {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.7;
        transform: scale(0.9);
    }
}

@keyframes coddb_typing {
    0%, 60%, 100% {
        transform: translateY(0);
        opacity: 0.4;
    }
    30% {
        transform: translateY(-10px);
        opacity: 1;
    }
}

@keyframes coddb_slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes coddb_fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes coddb_rotate {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

@keyframes coddb_shimmer {
    0% {
        left: -100%;
    }
    100% {
        left: 100%;
    }
}

/* ================================
   ACCESSIBILITY SETTINGS
   ================================ */

/* Dark mode optimizations */
@media (prefers-color-scheme: dark) {
    /* Theme is already optimized for dark mode */
    .coddb-chat-container {
        filter: brightness(1);
    }
}

/* High contrast mode */
@media (prefers-contrast: high) {
    .coddb-chat-channel,
    .coddb-chat-message,
    .coddb-chat-user-item {
        border-width: 2px;
    }
    
    .coddb-chat-status-indicator,
    .coddb-chat-user-status {
        box-shadow: none;
        border: 2px solid var(--bg-medium);
    }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    .coddb-chat-channel,
    .coddb-chat-message,
    .coddb-chat-user-item,
    .coddb-chat-btn,
    .coddb-chat-input-action {
        transition: none;
    }
    
    .coddb-chat-status-indicator,
    .coddb-chat-typing-dot {
        animation: none;
    }
    
    @keyframes coddb_pulse {
        0%, 100% {
            opacity: 1;
            transform: scale(1);
        }
    }
    
    @keyframes coddb_typing {
        0%, 100% {
            transform: translateY(0);
            opacity: 0.4;
        }
    }
}
