/* 
 * Animation styles for the CV Assistant feature
 */

/* Loading spinner animation */
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid #e5e7eb;
    border-top-color: #3b82f6;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

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

/* Typing indicator animation */
.typing-indicator {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 8px 12px;
    width: fit-content;
}

.typing-indicator span {
    width: 8px;
    height: 8px;
    background: #3b82f6;
    border-radius: 50%;
    animation: bounce 1.4s infinite ease-in-out;
}

.typing-indicator span:nth-child(1) { animation-delay: -0.32s; }
.typing-indicator span:nth-child(2) { animation-delay: -0.16s; }

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

/* Loading message styles */
.chat-message.loading {
    background: none;
    border: none;
    box-shadow: none;
}

.chat-message.loading .message-content {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    padding: 0;
}

/* Text typing animation */
.typing-animation {
    position: relative;
}

.typing-animation::after {
    content: '|';
    position: absolute;
    right: -2px;
    animation: blink 0.7s infinite;
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

/* CV change animations */
.highlight-change {
    animation: highlight-pulse 1s ease-in-out;
    background-color: rgba(37, 99, 235, 0.1);
    border-radius: 4px;
}

.cv-updating {
    opacity: 0.6;
    transition: opacity 0.5s ease-out;
}

@keyframes highlight-pulse {
    0% {
        background-color: rgba(37, 99, 235, 0.2);
        transform: scale(1.01);
    }
    50% {
        background-color: rgba(37, 99, 235, 0.1);
        transform: scale(1);
    }
    100% {
        background-color: transparent;
        transform: scale(1);
    }
}

/* Success message animation */
.cv-update-success {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background-color: #10B981;
    color: white;
    padding: 12px 20px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    z-index: 1000;
}

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

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