/**
 * Rizomas Conversational Flow - Animations & Styles
 * Animações para interações conversacionais automáticas
 */

/* ========================================
   MODAL ANIMATIONS
   ======================================== */

.modal-enter-active {
    animation: modalFadeIn 0.3s ease-out;
}

.modal-leave-active {
    animation: modalFadeOut 0.3s ease-in;
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes modalFadeOut {
    from {
        opacity: 1;
        transform: scale(1);
    }
    to {
        opacity: 0;
        transform: scale(0.95);
    }
}

/* ========================================
   HIGHLIGHT ANIMATIONS
   ======================================== */

.conversational-highlight {
    position: relative;
    animation: highlightPulse 2s ease-in-out;
}

@keyframes highlightPulse {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(59, 130, 246, 0);
    }
    50% {
        box-shadow: 0 0 0 8px rgba(59, 130, 246, 0.4),
                    0 0 20px rgba(59, 130, 246, 0.2);
    }
}

/* Highlight específico para inputs */
input.conversational-highlight,
select.conversational-highlight,
textarea.conversational-highlight {
    border-color: #3b82f6 !important;
    animation: inputHighlight 2s ease-in-out;
}

@keyframes inputHighlight {
    0%, 100% {
        background-color: transparent;
        box-shadow: 0 0 0 0 rgba(59, 130, 246, 0);
    }
    50% {
        background-color: rgba(59, 130, 246, 0.05);
        box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
    }
}

/* ========================================
   CARD/ITEM SELECTION ANIMATIONS
   ======================================== */

.conversational-selecting {
    animation: cardSelect 0.5s ease-out;
    border: 2px solid #3b82f6 !important;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.05), rgba(59, 130, 246, 0.1)) !important;
}

@keyframes cardSelect {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
    100% {
        transform: scale(1);
    }
}

/* ========================================
   AUTO-FILL ANIMATIONS
   ======================================== */

.conversational-filling {
    animation: fillAnimation 1s ease-out;
}

@keyframes fillAnimation {
    0% {
        opacity: 0.5;
    }
    50% {
        opacity: 1;
        background-color: rgba(34, 197, 94, 0.1);
    }
    100% {
        opacity: 1;
        background-color: transparent;
    }
}

/* ========================================
   TYPING INDICATOR
   ======================================== */

.conversational-typing {
    display: inline-flex;
    gap: 4px;
    padding: 8px 12px;
    background: rgba(59, 130, 246, 0.1);
    border-radius: 16px;
}

.conversational-typing span {
    width: 8px;
    height: 8px;
    background: #3b82f6;
    border-radius: 50%;
    animation: typingDot 1.4s infinite;
}

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

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

@keyframes typingDot {
    0%, 60%, 100% {
        transform: translateY(0);
        opacity: 0.7;
    }
    30% {
        transform: translateY(-10px);
        opacity: 1;
    }
}

/* ========================================
   PROGRESS INDICATOR
   ======================================== */

.conversational-progress {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 12px 20px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 9999;
    animation: slideInRight 0.3s ease-out;
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.conversational-progress-bar {
    height: 4px;
    background: #e5e7eb;
    border-radius: 2px;
    overflow: hidden;
    margin-top: 8px;
}

.conversational-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #3b82f6, #8b5cf6);
    border-radius: 2px;
    transition: width 0.3s ease;
    animation: progressShimmer 2s infinite;
}

@keyframes progressShimmer {
    0% {
        background-position: -200% 0;
    }
    100% {
        background-position: 200% 0;
    }
}

/* ========================================
   STEP INDICATOR
   ======================================== */

.conversational-steps {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 20px 0;
}

.conversational-step {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #e5e7eb;
    color: #6b7280;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.3s ease;
}

.conversational-step.active {
    background: #3b82f6;
    color: white;
    animation: stepPulse 1.5s infinite;
}

.conversational-step.completed {
    background: #10b981;
    color: white;
}

.conversational-step.completed::after {
    content: '✓';
}

@keyframes stepPulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
}

/* ========================================
   TOOLTIP/HINT ANIMATIONS
   ======================================== */

.conversational-hint {
    position: absolute;
    padding: 8px 12px;
    background: #1f2937;
    color: white;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 500;
    white-space: nowrap;
    z-index: 10000;
    animation: hintFadeIn 0.3s ease-out;
    pointer-events: none;
}

.conversational-hint::before {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 6px solid transparent;
    border-top-color: #1f2937;
}

@keyframes hintFadeIn {
    from {
        opacity: 0;
        transform: translateY(-5px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ========================================
   SUCCESS/ERROR BADGES
   ======================================== */

.conversational-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    animation: badgeSlideIn 0.3s ease-out;
}

.conversational-badge.success {
    background: #dcfce7;
    color: #15803d;
}

.conversational-badge.error {
    background: #fee2e2;
    color: #991b1b;
}

.conversational-badge.info {
    background: #dbeafe;
    color: #1e40af;
}

@keyframes badgeSlideIn {
    from {
        transform: translateX(-20px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* ========================================
   SMOOTH SCROLL INDICATOR
   ======================================== */

.conversational-scroll-indicator {
    position: fixed;
    right: 30px;
    padding: 12px;
    background: #3b82f6;
    border-radius: 50%;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4);
    cursor: pointer;
    animation: scrollIndicatorBounce 2s infinite;
    z-index: 9998;
}

@keyframes scrollIndicatorBounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

/* ========================================
   LOADING OVERLAY
   ======================================== */

.conversational-loading-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    animation: overlayFadeIn 0.3s ease;
}

@keyframes overlayFadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.conversational-loading-spinner {
    width: 48px;
    height: 48px;
    border: 4px solid #e5e7eb;
    border-top-color: #3b82f6;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* ========================================
   RESPONSIVE
   ======================================== */

@media (max-width: 768px) {
    .conversational-progress {
        top: 10px;
        right: 10px;
        padding: 10px 16px;
        font-size: 13px;
    }
    
    .conversational-hint {
        font-size: 11px;
        padding: 6px 10px;
    }
    
    .conversational-step {
        width: 28px;
        height: 28px;
        font-size: 12px;
    }
}

/* ========================================
   UTILITIES
   ======================================== */

.conversational-fade-in {
    animation: fadeIn 0.3s ease;
}

.conversational-fade-out {
    animation: fadeOut 0.3s ease;
}

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

@keyframes fadeOut {
    from { opacity: 1; }
    to { opacity: 0; }
}

.conversational-slide-up {
    animation: slideUp 0.3s ease;
}

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