/* Exercise Animation Styles - Consistent across all interfaces */

/* Animation Preview for Exercise Cards */
.exercise-animation-preview {
    margin-top: 10px;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.exercise-animation-preview:hover {
    transform: scale(1.02);
}

.animation-placeholder {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 15px;
    border-radius: 8px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
}

.animation-placeholder:hover {
    background: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.animation-placeholder i {
    font-size: 2rem;
}

.animation-placeholder span {
    font-size: 0.9rem;
    font-weight: 500;
}

/* Animation Button Styles */
.animation-btn {
    background: #667eea;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.2s ease;
    min-height: 36px;
}

.animation-btn:hover:not(:disabled) {
    background: #5a67d8;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

.animation-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.animation-btn i {
    font-size: 1rem;
}

/* Exercise Card Animation Button */
.btn-animation-exercise {
    background: transparent;
    border: 2px solid #667eea;
    color: #667eea;
    padding: 8px;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-animation-exercise:hover {
    background: #667eea;
    color: white;
    transform: scale(1.1);
}

/* Animation Container in Modals */
.exercise-animation-button-container {
    margin-top: 10px;
}

/* Action Bar Animation Button */
.action-bar .animation-btn {
    background: white;
    color: #667eea;
    border: 1px solid #667eea;
    padding: 8px 16px;
    font-size: 0.85rem;
}

.action-bar .animation-btn:hover {
    background: #667eea;
    color: white;
}

/* Mobile Optimizations */
@media (max-width: 768px) {
    .exercise-animation-preview {
        margin-top: 15px;
    }
    
    .animation-placeholder {
        padding: 12px;
        flex-direction: row;
        justify-content: center;
    }
    
    .animation-placeholder i {
        font-size: 1.5rem;
    }
    
    .animation-placeholder span {
        font-size: 1rem;
    }
    
    .btn-animation-exercise {
        width: 44px;
        height: 44px;
    }
}

/* Dark Mode Support */
[data-theme="dark"] .animation-placeholder {
    background: linear-gradient(135deg, #4c1d95 0%, #5b21b6 100%);
}

[data-theme="dark"] .animation-placeholder:hover {
    background: linear-gradient(135deg, #5b21b6 0%, #4c1d95 100%);
    box-shadow: 0 4px 15px rgba(139, 92, 246, 0.4);
}

[data-theme="dark"] .btn-animation-exercise {
    border-color: #8b5cf6;
    color: #8b5cf6;
}

[data-theme="dark"] .btn-animation-exercise:hover {
    background: #8b5cf6;
    color: white;
}

[data-theme="dark"] .action-bar .animation-btn {
    background: #1f2937;
    color: #8b5cf6;
    border-color: #8b5cf6;
}

[data-theme="dark"] .action-bar .animation-btn:hover {
    background: #8b5cf6;
    color: white;
}

/* Loading States */
.animation-loading {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #667eea;
    font-size: 0.9rem;
}

.animation-loading i {
    animation: spin 1s linear infinite;
}

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

/* Error States */
.animation-error {
    color: #dc2626;
    font-size: 0.85rem;
    margin-top: 5px;
    display: flex;
    align-items: center;
    gap: 5px;
}

.animation-error i {
    font-size: 1rem;
}

/* Integration with Existing Styles */
.exercise-card-actions {
    gap: 8px;
}

.modern-workout-modal .animation-btn {
    margin-left: 8px;
}

/* Ensure consistent spacing in workout builder */
.workout-builder .exercise-card-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px;
}

/* Animation badge for exercises with available animations */
.has-animation-badge {
    position: absolute;
    top: 5px;
    right: 5px;
    background: #667eea;
    color: white;
    padding: 2px 6px;
    border-radius: 12px;
    font-size: 0.7rem;
    font-weight: 600;
}